Skip to main content
POST

Authorizations

Authorization
string
header
required

An API key in the Authorization header, for example Authorization: Bearer rk_test_. Test keys start with rk_test; the key is shown once, when it is created or rotated.

Headers

Idempotency-Key
string
required

A client-chosen key, 1 to 255 printable ASCII characters with no spaces, that makes a retry of this request return the first response instead of running it again.

Required string length: 1 - 255
Pattern: ^[\x21-\x7E]+$

Body

application/json
pay_from
enum<string>
required

The wallet that pays, one of usd_wallet (the USD price from the USD wallet) or ngn_wallet (from the NGN wallet, through a conversion an admin approves). Any other value is 400 validation_failed.

Available options:
usd_wallet,
ngn_wallet
product_id
string
required

The product to buy, prefixed prd_.

quantity
integer<int32>
required

The number of cards, 1 to Orders:MaxQuantity (100 by default).

client_reference
null | string

The business's own reference for the order: 1 to 64 letters, digits, _, ., : or -, unique within the business and mode. Set it to retry safely with a new Idempotency-Key.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9_.:-]{1,64}$
sandbox_amount_minor
integer<int32>

Optional Test scenario in minor units. Omit for success. 1001 rejects all cards, 1002 times out then delivers on lookup, and 1003 delivers unit zero only for a quantity of at least two.

Response

A new USD-wallet order in a final state. Location is the public order detail. New Test orders return 409 while sandbox admission is closed.

id
string
required

The order's id, prefixed ord_.

status
enum<string>
required

Where the order is; completed, partially_completed, failed and cancelled are final.

Available options:
pending,
awaiting_fx_approval,
converting,
fulfilling,
awaiting_supplier,
completed,
partially_completed,
failed,
cancelled
failure_reason
null | enum<string>
required

Why the order failed or was cancelled; null otherwise.

Available options:
fx_denied,
customer_cancelled,
approval_expired,
price_changed,
all_rejected,
hold_expired,
supplier_unavailable,
insufficient_float,
treasury_backing_breached,
account_frozen
channel
enum<string>
required

Where the order came from.

Available options:
api,
dashboard,
marketplace
pay_from
enum<string>
required

The wallet that pays for the order.

Available options:
usd_wallet,
ngn_wallet
total
object
required

The order's total in USD: the unit price times the quantity, held when the order was accepted.

quantity
integer<int32>
required

The number of cards ordered.

display_name
string
required

The product's name when the order was created.

client_reference
null | string
required

The business's own reference for the order, unique within the business and mode. Null when none was given.

created_at
string<date-time>
required

When the order was created.

settled_at
null | string<date-time>
required

When the order reached a final status; null until then.

product_id
string
required

The product bought, prefixed prd_. The order keeps its own copy of what was bought, so a later change to the product does not change it.

brand
string
required

The brand's key, such as playstation, when the order was created.

country
string
required

The country the card is for: an ISO 3166-1 alpha-2 code, EU or GLOBAL.

face_value
string
required

The card's face value, as a decimal string with two places.

face_unit
string
required

The face value's currency or unit, such as USD.

unit_price
object
required

The price of one card in USD, fixed when the order was created.

pricing_tier
string
required

The pricing tier the order was priced at.

supplier
string
required

The supplier the cards are bought from.

supplier_mode
enum<string>
required

The supplier environment the cards are bought in.

Available options:
sandbox,
live
cards
object
required

The cards by where each stands.

captured
null | object
required

The USD charged for the delivered cards; null until the order is settled.

conversion
null | object
required

The conversion paying for an order paid from the NGN wallet; null for one paid from the USD wallet.

refunded
object
required

The USD returned for refunded cards; zero when none were refunded.