paymentUrl, and waits for your signed callback.
This guide documents the current contract implemented by Gamecart.
Flow
1
Configure the gateway
Add a custom gateway in the dashboard with a public HTTPS payment creation URL. Gamecart generates a shared secret.
2
Buyer selects the gateway
The storefront sends checkout with
gatewayType: "CUSTOM" and the selected customGatewayId.3
Gamecart creates a payment
Gamecart persists a pending order, then sends a signed
payment.create request to your payment creation URL.4
You return a payment URL
Your service returns a public HTTPS
paymentUrl. Gamecart redirects the buyer there.5
You confirm the result
After payment, your service sends a signed callback to the Gamecart
callbackUrl from the create-payment payload.Configure a custom gateway in the dashboard
1
Open payment settings
In the dashboard, select your store and open Settings. Then open Gateways.
2
Create a custom gateway
In the custom gateways area, click Create custom gateway.
3
Fill in display details
Add the gateway name, optional description, sort order, and optional icon URL. These values help buyers recognize the payment method at checkout.
4
Enter the payment creation URL
Paste the public HTTPS URL where your service receives Gamecart payment creation requests.
5
Choose the timeout and enabled state
Pick a request timeout between
1000 and 30000 milliseconds. Keep the gateway disabled until your endpoint is ready.6
Save and copy the shared secret
After saving, copy the shared secret and store it securely. Gamecart shows it only once.
7
Enable and test checkout
Enable the gateway, place a controlled checkout order, verify the signed
payment.create request, and send a callback for the test order.Storefront checkout request
When a buyer selects a custom gateway, checkout uses the public storefront checkout endpoint:gatewayType: "CUSTOM"requirescustomGatewayId.- Native gateways reject
customGatewayId. - The custom gateway must belong to the store, be enabled, not deleted, allowed by plan, and have a safe public payment creation URL.
- Gamecart revalidates the cart and totals before it calls your gateway.
Gamecart to your payment creation URL
Gamecart sends a signed request:Gamecart-Signature with the shared secret before creating a payment. See Webhook signatures for the canonical string.
Your response must be 2xx JSON:
paymentUrlis required.paymentUrlmust be an absolute public HTTPS URL.externalPaymentIdis optional and must be at most255characters.- Gamecart does not follow redirects when calling your payment creation URL.
- If payment creation fails, Gamecart cancels the pending order and releases coupon reservations.
Your callback to Gamecart
Send the result to the exactcallbackUrl from the create-payment request:
eventIdin the body must matchGamecart-Event-Id.statusmust not bePENDING.- Allowed status values are
APPROVED,REJECTED,CANCELLED,REFUNDED, andDISPUTE. amountmust match the order total exactly.currencymust match the order currency, case-insensitively.- The order must belong to the store and custom gateway in the URL.
- Sign the raw JSON body with the shared secret and the same canonical payload format.
202 Accepted when the callback is accepted. Duplicate successful callback eventId values for the same custom gateway are idempotent.