Create a Payment Session
Creates a payment session. ON_RAMP returns a hosted widget link; OFF_RAMP is accepted in the contract but returns 501 in Phase 1. country and currency_id are always mandatory. For ON_RAMP, amount, fiat_currency and redirect_url are also mandatory and are locked into the hosted widget. custom_wallet_address requires the merchant's allow_custom_external_wallet flag.
Request to create a payment session (ON_RAMP today; OFF_RAMP returns 501)
Required for ON_RAMP; locked in the widget.
ISO 3166-1 alpha-2 country code. REQUIRED — no default.
Target currency id.
Self-custody destination. Only honoured when the merchant flag is on.
ISO 4217 fiat currency (3-letter). Required for ON_RAMP; locked in the widget.
Free-form merchant metadata.
ON_RAMP returns a hosted widget link. OFF_RAMP is accepted but returns 501 in Phase 1.
URL the hosted widget redirects the user to on completion. Required for ON_RAMP; must start with http:// or https://.
Merchant's own id for this session; echoed back in webhooks.
Widget theme. Optional; defaults to dark.
darkPossible values: Merchant's stable player id. Required unless custom_wallet_address is supplied.
Created payment session
A created payment session
Server-generated key, also the provider's externalSessionId.
Link expiry. Null until a self-imposed TTL is introduced.
Provider-hosted URL the user is sent to.
Custom wallet not allowed for merchant
Validation error
Payment type not available in Phase 1
POST /v1/user/payments HTTP/1.1
Host: gateway.stage.pay.io
Content-Type: application/json
Accept: */*
Content-Length: 235
{
"amount": "250",
"country": "US",
"currency_id": "c872e749-fd56-533e-b01f-de87ae38e7f1",
"fiat_currency": "EUR",
"payment_type": "ON_RAMP",
"redirect_url": "https://example.com/deposit-complete",
"theme": "dark",
"user_reference_id": "hub_player_2"
}{
"correlation_key": "f47ac10b-58cc-4372-a567-0e02b2c3d479:order_9981",
"expires_at": null,
"link": "https://onramp.example.com/session/abc123..."
}Last updated