Skip to content

makecryptoio/makepay-godot

Repository files navigation

MakePay Godot Plugin

Godot 4 add-on for launching MakePay hosted checkout from games while keeping merchant secrets on a backend server.

The add-on provides an autoload singleton named MakePay with helpers to call a backend payment-link endpoint and open the returned hosted checkout URL with OS.shell_open(). A Node backend example is included for creating MakePay payment links and verifying webhooks.

Features

  • Godot 4 plugin.cfg and EditorPlugin autoload installer.
  • Runtime MakePay singleton for payment-link creation.
  • Hosted checkout opener for desktop, mobile, and web exports.
  • Signals for success and failure.
  • Backend example that keeps MakePay API credentials server-side.
  • Webhook signature verification helper.

Install

Copy addons/makepay into your Godot project and enable the plugin:

Project -> Project Settings -> Plugins -> MakePay -> Enable

Then configure the singleton at game startup:

MakePay.configure("https://your-game-backend.example")

Usage

func _ready() -> void:
    MakePay.payment_link_created.connect(_on_payment_link_created)
    MakePay.payment_failed.connect(_on_payment_failed)

func buy_credits() -> void:
    MakePay.create_payment_link({
        "sku": "credits_1000",
        "title": "1000 Credits",
        "amount": "9.99",
        "currency": "USD",
        "player_id": "player-123"
    })

func _on_payment_link_created(payment_link: Dictionary) -> void:
    MakePay.open_checkout(payment_link.get("checkoutUrl", ""))

func _on_payment_failed(message: String) -> void:
    push_error(message)

Do not put MAKEPAY_KEY_SECRET into a Godot project or export template. Use the backend example under examples/node-backend.

Development

npm test
npm run validate

About

Godot 4 add-on for MakePay hosted checkout helpers. Cryptocurrency payment gateway for direct self-custody merchant-wallet settlement, decentralized swaps, and 70+ coin/20+ chain auto-conversion.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors