Skip to content

makecryptoio/makepay-gamemaker

Repository files navigation

MakePay GameMaker Integration

Drop-in GameMaker Language scripts plus a server relay for MakePay hosted checkout links.

Features

  • GML helpers for async checkout creation.
  • Relay-first architecture so MakePay API keys never ship with the game.
  • Product IDs are sent from the game, while pricing and entitlements stay on the relay.
  • MakePay webhook verification in the relay.
  • Small in-memory entitlement example for prototypes.

GameMaker Usage

Import the scripts in gml/scripts into your GameMaker project.

Create event:

makepay_init("https://payments.example.com", player_id);

Button or purchase action:

makepay_create_checkout("supporter_pack");

Async - HTTP event:

var result = makepay_handle_http(async_load);
if (is_struct(result) && result.type == "checkout_created") {
    makepay_open_checkout(result.data.url);
}

Relay

npm start

Environment:

MAKEPAY_KEY_ID=...
MAKEPAY_KEY_SECRET=...
MAKEPAY_WEBHOOK_SECRET=...
MAKEPAY_BASE_URL=https://www.makecrypto.io
MAKEPAY_PRODUCTS_JSON='{"supporter_pack":{"title":"Supporter Pack","amount":"4.99","currency":"USD","entitlement":"supporter"}}'

Routes:

  • POST /checkout
  • GET /entitlements/:playerId
  • POST /makepay/webhooks

GameMaker Direction

The GML helpers use GameMaker's current async HTTP APIs:

Development

npm test
npm run validate

About

GameMaker GML helpers and relay for MakePay hosted checkout links. 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