curl --request POST \
--url https://api.enterprise.sandbox.uphold.com/on-off-ramp/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quoteId": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
"metadata": {
"externalId": 123
}
}
'{
"order": {
"id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
"type": "on-ramp",
"pricing": "locked",
"origin": {
"asset": "USD",
"amount": "100.00",
"rate": "2.07021435361804542440",
"node": {
"type": "external-account",
"id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
"ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
"via": "card",
"network": "visa",
"confirmationUrl": "https://authentication-devices.sandbox.checkout.com/sessions-interceptor/sid_zrih63pnk6ietkpuerqiyd5zga"
}
},
"destination": {
"asset": "XRP",
"amount": "46.125658",
"rate": "0.48304176727029881912",
"node": {
"type": "crypto-address",
"network": "xrp-ledger",
"address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
"reference": "67809592"
}
},
"denomination": {
"asset": "USD",
"amount": "100.00",
"rate": "1.00000000000000000000",
"target": "origin"
},
"fees": [
{
"type": "deposit",
"code": "credit-card-deposit",
"asset": "USD",
"amount": "1.00",
"percentage": "1",
"beneficiary": "uphold"
},
{
"type": "network",
"code": "crypto-network",
"asset": "USD",
"amount": "3.51"
}
],
"status": "processing",
"timeline": [],
"quotedAt": "2024-07-24T15:02:39.000Z",
"createdAt": "2024-07-24T15:03:39.000Z",
"updatedAt": "2024-07-24T15:03:39.000Z"
}
}Orders
Create order
Create an on-ramp or off-ramp order from a quote.
POST
/
on-off-ramp
/
orders
curl --request POST \
--url https://api.enterprise.sandbox.uphold.com/on-off-ramp/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quoteId": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
"metadata": {
"externalId": 123
}
}
'{
"order": {
"id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
"type": "on-ramp",
"pricing": "locked",
"origin": {
"asset": "USD",
"amount": "100.00",
"rate": "2.07021435361804542440",
"node": {
"type": "external-account",
"id": "7dc5c846-5ac2-4853-b67f-005cb83d4017",
"ownerId": "cd21b26d-35d2-408a-9201-b8fdbef7a604",
"via": "card",
"network": "visa",
"confirmationUrl": "https://authentication-devices.sandbox.checkout.com/sessions-interceptor/sid_zrih63pnk6ietkpuerqiyd5zga"
}
},
"destination": {
"asset": "XRP",
"amount": "46.125658",
"rate": "0.48304176727029881912",
"node": {
"type": "crypto-address",
"network": "xrp-ledger",
"address": "rfBtmHiLwwWH5maH2PT78GxubrSydRF9aY",
"reference": "67809592"
}
},
"denomination": {
"asset": "USD",
"amount": "100.00",
"rate": "1.00000000000000000000",
"target": "origin"
},
"fees": [
{
"type": "deposit",
"code": "credit-card-deposit",
"asset": "USD",
"amount": "1.00",
"percentage": "1",
"beneficiary": "uphold"
},
{
"type": "network",
"code": "crypto-network",
"asset": "USD",
"amount": "3.51"
}
],
"status": "processing",
"timeline": [],
"quotedAt": "2024-07-24T15:02:39.000Z",
"createdAt": "2024-07-24T15:03:39.000Z",
"updatedAt": "2024-07-24T15:03:39.000Z"
}
}
The order ID will be the same as the quote ID to allow for easy tracking and correlation.
Requirements
If the quote lists requirements, provide the data for each of them inparams.requirements, such as authorize:3ds with a returnUrl. A travel-rule requirement must be resolved before creating the order.
When the user must confirm the payment, such as with a 3DS challenge, the origin node of the created order carries a confirmationUrl to send the user to.
Orders that send the
authorize:3ds requirement need the user context headers, X-Uphold-User-Ip and X-Uphold-User-Agent.Metadata
You can optionally include custom entity metadata in themetadata field to store your own business data (e.g., reference numbers, categorization, reconciliation data), which needs the on-off-ramp.orders.metadata:write scope. If not provided during creation, you can add it later using Set metadata.
If saving the metadata fails, the order is still created and the response includes an
errors.metadata property. See Entity metadata for details.Body
application/json
Was this page helpful?