Drop-in GameMaker Language scripts plus a server relay for MakePay hosted checkout links.
- 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.
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);
}npm startEnvironment:
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 /checkoutGET /entitlements/:playerIdPOST /makepay/webhooks
The GML helpers use GameMaker's current async HTTP APIs:
npm test
npm run validate