Skip to main content
POST
Create payment

Authorizations

Authorization
string
header
required

Workspace API key. Send it as Authorization: Bearer <api_key>.

Query Parameters

environment
enum<string>
default:sandbox

Environment scope for environment-partitioned resources. Defaults to sandbox when omitted.

Available options:
sandbox,
live

Body

application/json

Direct payment: Onstacks selects the provider. Use the quote flow when you want to show options first.

direction
enum<string>
required
Available options:
on_ramp,
off_ramp
source_asset
string
required
Example:

"USDC"

source_amount
string
required
Example:

"1000000"

destination_asset
string
required
Example:

"NGN"

country_code
string
required
Example:

"NG"

rail
enum<string>
required
Available options:
bank,
mobile_money,
wallet,
ach,
wire,
sepa,
faster_payments,
interac
destination
object
required

Exactly one of the destination types must be set, matching the rail.

source_network
string

Optional. When omitted Onstacks chooses the network for the transaction.

Example:

"base"

destination_network
string

For on-ramps, the network to deliver the stablecoin on. Optional.

metadata
object
idempotency_key
string

Response

Payment created

data
object
required
error
null
required
request_id
string
required