Create a v2 payment order (off-ramp or on-ramp)
Changed onCreates a new payment order.
- Off-ramp (stablecoin → fiat): set source.type = "crypto" and destination.type = "fiat". The response providerAccount contains a receiveAddress to send tokens to.
- On-ramp (fiat → stablecoin): set source.type = "fiat" and destination.type = "crypto". The response providerAccount contains a virtual bank account for the user to deposit fiat into.
Off-ramp deposit. Send exactly providerAccount.amountToTransfer of providerAccount.currency: that is amount + senderFee + transactionFee. When providerAccount.memo is present, include it with the deposit or the deposit cannot be credited.
Transaction fee. By default the sender pays the transaction fee out of their sender fee, so the returned senderFee is what the sender earns and the customer only tops up a shortfall. Set transactionFeePayer: "customer" (or change the token's setting in the dashboard) to add the transaction fee on top of the full sender fee instead.
Solana (solana) is available through this endpoint only; v1 order endpoints reject it. For on-ramp to Solana, the recipient wallet must already have a token account for the stablecoin's mint.
Provider routing. On off-ramp, leave destination.providerIds unset and the API resolves a ranked queue of up to 3 providers at creation; assignment walks it in order. Set destination.providerIds to supply your own queue — typically the ids from a rate quote — or a one-entry queue to route to a single provider. Queue exhaustion is not an immediate refund: Paycrest may still route the order elsewhere before refunding it.
On on-ramp, the provider is selected when the order is created, so destination.providerIds accepts at most one entry and acts as a pin.
The singular destination.providerId is retained for backward compatibility on both flows and is mutually exclusive with providerIds. Routing validation failures return 400 with data as a single { field, message } object rather than an array.
Request
- Base URLhttps://api.paycrest.io/v2
- URLhttps://api.paycrest.io/v2/sender/orders
- AuthAPI key in header API-Key
Request body
Example request
{
"amount": "100",
"senderFee": "0.5",
"senderFeePercent": "1",
"senderFeeAddress": "0xYourFeeRecipientAddress",
"transactionFeePayer": "sender",
"source": {
"kyc": {
"organizationDetails": {
"directors": [
{
"role": "Director"
}
]
}
}
},
"destination": {
"kyc": {
"organizationDetails": {
"directors": [
{
"role": "Director"
}
]
}
}
}
}Response
Order created
Changes
- breaking
added the new required request property
///// - breaking
added to the
/////request propertyallOflist - breaking
removed the enum value
liskof the request property////// - breaking
removed the enum value
liskof the request property///// - breaking
removed the enum value
scrollof the request property////// - breaking
removed the enum value
scrollof the request property///// - breaking
the
/////request property type changed fromobjectto no type - breaking
the
//////response's property type changed fromobjectto no type for status - warning
added the new
solanaenum value to the///////response property for the response status - warning
added the new
solanaenum value to the//////response property for the response status - warning
added the new
starknetenum value to the///////response property for the response status - warning
added the new
starknetenum value to the//////response property for the response status - warning
added the new
tronenum value to the///////response property for the response status - warning
added the new
tronenum value to the//////response property for the response status - info
added the new optional request property
///// - info
added the new optional request property
///// - info
added the new optional request property
///// - info
added the new optional request property
- info
added the new optional request property
///// - info
added the new optional request property
- info
added
cryptofiatdiscriminator mapping keys to therequest property - info
added
fiatcryptodiscriminator mapping keys to therequest property - info
added the new
solanaenum value to the request property////// - info
added the new
solanaenum value to the request property///// - info
added the new
starknetenum value to the request property////// - info
added the new
starknetenum value to the request property///// - info
added the new
tronenum value to the request property////// - info
added the new
tronenum value to the request property///// - info
added the optional property
//////to the response with the status - info
added the optional property
//////to the response with the status - info
added the optional property
//////to the response with the status - info
added the optional write-only property
data/destination/oneOf[V2CryptoDestination]/kycto the response with the status - info
added the optional write-only property
data/destination/oneOf[V2CryptoDestination]/providerIdsto the response with the status - info
added the optional write-only property
data/destination/oneOf[V2FiatDestination]/providerIdsto the response with the status - info
added the optional write-only property
data/source/oneOf[V2CryptoSource]/kycto the response with the status - info
added to the
//////response propertyallOflist for the response status - info
removed the
liskenum value from the///////response property for the response status - info
removed the
liskenum value from the//////response property for the response status - info
removed the
otcenum value from the/response property for the response status - info
removed the
scrollenum value from the///////response property for the response status - info
removed the
scrollenum value from the//////response property for the response status - info
added the required write-only property
data/source/oneOf[V2FiatSource]/kycto the response with the status
- breaking