Skip to main content
POST
Create a new payment

Authorizations

Api-Key
string
header
required

Headers

Api-Key
string
required
Merchant-Id
string
required
WCP-Version
string | null
Sdk-Name
string | null
Sdk-Version
string | null
Sdk-Platform
string | null
Idempotency-Key
string | null

Body

application/json
amount
object
required

Amount to be paid

Example:
referenceId
string
required

Merchant/PSP order ID

checkout
null | object
Example:
expiresAt
integer<int64> | null

Optional custom expiration timestamp (Unix seconds since epoch). Must be in the future if provided. If not provided, defaults to 15 minutes from now.

Response

Payment created successfully

expiresAt
integer<int64>
required

Payment expiration timestamp, in seconds since epoch

Required range: x >= 0
gatewayUrl
string
required

Gateway URL to redirect the user to for payment

isFinal
boolean
required

True if the payment is in a final state and no longer requires polling

paymentId
string
required

Payment ID

Example:

"pay_7fa2ecc101ARZ3NDEKTSV4RRFFQ69G5FAV"

status
enum<string>
required

Payment status

Available options:
requires_action,
processing,
succeeded,
failed,
expired,
cancelled
pollInMs
integer<int64> | null

Time to poll for payment status, in milliseconds. Not present if the payment is in a final state.

Required range: x >= 0