Create an idempotent settlement order
curl --request POST \
--url https://api.copby.digitalcop.shop/api/integrations/settlements/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"quoteId": "qst_example"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({quoteId: 'qst_example'})
};
fetch('https://api.copby.digitalcop.shop/api/integrations/settlements/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.copby.digitalcop.shop/api/integrations/settlements/orders"
payload = { "quoteId": "qst_example" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"orderId": "ord_example",
"status": "CREATED",
"health": "HEALTHY",
"fundsStatus": "IN_USER_WALLET",
"execution": {
"chain": "Arc",
"estimatedUserConfirmations": 1,
"mode": "pending_burn_plan"
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"stage": "<string>",
"fundsStatus": "<string>",
"fundsMoved": true,
"retryable": true,
"nextAction": "<string>",
"requestId": "<string>"
}
}{
"error": "<string>"
}{
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"stage": "<string>",
"fundsStatus": "<string>",
"fundsMoved": true,
"retryable": true,
"nextAction": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"stage": "<string>",
"fundsStatus": "<string>",
"fundsMoved": true,
"retryable": true,
"nextAction": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"stage": "<string>",
"fundsStatus": "<string>",
"fundsMoved": true,
"retryable": true,
"nextAction": "<string>",
"requestId": "<string>"
}
}Settlement
Create an idempotent settlement order
Reserves an unexpired quote for this organization. Creating the order does not move funds. Live burn execution is not enabled yet.
POST
https://api.copby.digitalcop.shop
/
api
/
integrations
/
settlements
/
orders
Create an idempotent settlement order
curl --request POST \
--url https://api.copby.digitalcop.shop/api/integrations/settlements/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"quoteId": "qst_example"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({quoteId: 'qst_example'})
};
fetch('https://api.copby.digitalcop.shop/api/integrations/settlements/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.copby.digitalcop.shop/api/integrations/settlements/orders"
payload = { "quoteId": "qst_example" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"orderId": "ord_example",
"status": "CREATED",
"health": "HEALTHY",
"fundsStatus": "IN_USER_WALLET",
"execution": {
"chain": "Arc",
"estimatedUserConfirmations": 1,
"mode": "pending_burn_plan"
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"stage": "<string>",
"fundsStatus": "<string>",
"fundsMoved": true,
"retryable": true,
"nextAction": "<string>",
"requestId": "<string>"
}
}{
"error": "<string>"
}{
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"stage": "<string>",
"fundsStatus": "<string>",
"fundsMoved": true,
"retryable": true,
"nextAction": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"stage": "<string>",
"fundsStatus": "<string>",
"fundsMoved": true,
"retryable": true,
"nextAction": "<string>",
"requestId": "<string>"
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "<string>",
"stage": "<string>",
"fundsStatus": "<string>",
"fundsMoved": true,
"retryable": true,
"nextAction": "<string>",
"requestId": "<string>"
}
}Authorizations
Integration API key. Send as Bearer copby_live_pk_….
Headers
Unique key for one logical order
Maximum string length:
200Body
application/json
Response
Settlement order created
Example:
"ord_example"
Available options:
CREATED Available options:
HEALTHY Available options:
IN_USER_WALLET