Skip to main content
Custom gateways let a store route checkout to a seller-owned payment provider. Gamecart creates the order, calls your payment creation endpoint, redirects the buyer to your 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.
Configuration fields:

Storefront checkout request

When a buyer selects a custom gateway, checkout uses the public storefront checkout endpoint:
Relevant request fields:
Rules:
  • gatewayType: "CUSTOM" requires customGatewayId.
  • 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.
Checkout response:

Gamecart to your payment creation URL

Gamecart sends a signed request:
Request body:
Verify Gamecart-Signature with the shared secret before creating a payment. See Webhook signatures for the canonical string. Your response must be 2xx JSON:
Rules:
  • paymentUrl is required.
  • paymentUrl must be an absolute public HTTPS URL.
  • externalPaymentId is optional and must be at most 255 characters.
  • 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 exact callbackUrl from the create-payment request:
Callback body:
Rules:
  • eventId in the body must match Gamecart-Event-Id.
  • status must not be PENDING.
  • Allowed status values are APPROVED, REJECTED, CANCELLED, REFUNDED, and DISPUTE.
  • amount must match the order total exactly.
  • currency must 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.
Gamecart returns 202 Accepted when the callback is accepted. Duplicate successful callback eventId values for the same custom gateway are idempotent.