Acquiring HTTP API
[POST] Create New Crypto Order
/private-api/crypto-orders/{slug}
Attribute | Type | Required | Description |
---|---|---|---|
slug | string | Y | unique instance name defined for payment page. Can be found on each payment page settings page in CRM. |
Request Payload
{
"amount": "300",
"currency": "USDT",
"external_order_id": "INV-123",
"successful_link": "https://merchant.website.com",
"failure_link": "https://merchant.website.com"
}
Attribute | Type | Required | Description |
---|---|---|---|
amount | decimal | Y | min value depends on currency / max 10000000 |
currency | string | Y | Currency ticker |
external_order_id | string | N | unique order identifier in client Database (usually Internal Payment or Order ID used). Number of characters: min 1, max 255. Allowed symbols: aA-zZ, 0-9. Special characters: “-“, “_“. |
successful_link | string | N | link used to redirect user from payment form after order completion. Has to be URL |
failure_link | string | N | link used to redirect user from payment form after order failure. Has to be URL |
Response Payload
{
"order": {
"id": "hgue758d-88r7-vjf7-9en3-avr18afdfg87",
"currency": "EUR",
"order_number": "84703458",
"value": "30",
"expected_amount": null,
"received_total": "0",
"exchange_rate": null,
"clean_exchange_rate": null,
"is_internal": null,
"deposited_currency": null,
"received_currency": null,
"status": "INIT",
"external_order_id": "9830403490340",
"created_at": "2023-09-18 10:34:09",
"completed_at": null,
"acquiring_url": "https://merchant.pay.whitepay.com/crypto-orders/hgue758d-88r7-vjf7-9en3-avr18afdfg87",
"successful_link": null,
"failure_link": null,
"transactions": []
}
}
Check out order entity reference for detailed description.
[GET] Show Crypto Order Details
/private-api/crypto-orders/{slug}/{orderId}
Attribute | Type | Required | Description |
---|---|---|---|
slug | string | Y | unique instance name defined for payment page. Can be found on each payment page settings page in CRM. |
orderId | string | Y | unique identifier of order |
Response Payload
{
"order": {
"id": "96252a4f-01cc-4fd1-93e7-b8997651ae58",
"currency": "UAH",
"value": "1000",
"expected_amount": "26.43",
"received_total": "0",
"exchange_rate": "37.83",
"is_internal": true,
"deposited_currency": "USDT",
"received_currency": "UAH",
"status": "PARTIALLY_FULFILLED",
"external_order_id": null,
"created_at": "2022-03-23 14:37:06",
"completed_at": null,
"acquiring_url": "https://merchant.pay.whitepay.com/crypto-orders/96252a4f-01cc-4fd1-93e7-b8997651ae58",
"successful_link": null,
"failure_link": null,
"order_number": "000000001",
"transactions": [
{
"id": "23d2ca58-20bf-416f-960b-8eae02224653",
"currency": "USDT",
"value": "10",
"status": "COMPLETE",
"hash": "internal_transaction_b3f79c32-525f-46ea-848e-ae172c13697d",
"is_internal": true,
"created_at": "2022-03-23 14:40:53",
"completed_at": "2022-03-23 14:40:53"
}
]
}
}
Check out order entity reference for detailed description.
[GET] Show Crypto Orders List
/private-api/crypto-orders/{slug}
Attribute | Type | Required | Description |
---|---|---|---|
slug | string | Y | unique instance name defined for payment page. Can be found on each payment page settings page in CRM. |
Response Payload
{
"orders": [
{
"id": "fb6d3059-ca3d-4dfc-a338-cdf457f5e1b1",
"currency": "UAH",
"expected_amount": "3.44124",
"received_total": "0",
"exchange_rate": "37.83",
"received_currency": "USDT",
"deposited_currency": "USDT",
"value": "15500.50",
"status": "COMPLETE",
"external_order_id": "INV-123",
"created_at": "2022-03-23 09:25:18",
"completed_at": "2022-03-23 09:35:16",
"acquiring_url": "https://merchant.pay.whitepay.com/crypto-orders/fb6d3059-ca3d-4dfc-a338-cdf457f5e1b1",
"order_number": "000000001"
},
{
"id": "08d585b1-86c6-496d-b413-ab17aa74fdd6",
"currency": "UAH",
"expected_amount": "0.22",
"received_total": "0",
"exchange_rate": "37.83",
"received_currency": "USDT",
"deposited_currency": "USDT",
"value": "200",
"status": "COMPLETE",
"external_order_id": "INV-123",
"created_at": "2022-03-22 23:46:12",
"completed_at": "2022-03-22 23:55:01",
"acquiring_url": "https://merchant.pay.whitepay.com/crypto-orders/08d585b1-86c6-496d-b413-ab17aa74fdd6",
"order_number": "000000002"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"total": 2
}
}
Check out pagination entity reference for detailed description.
Filters
Param | Type | Required | Description |
---|---|---|---|
page | int | N | Page number |
per_page | int | N | Count of items per page |
date_from | date | N | Format: 2022-06-01+00:00:00 |
date_to | date | N | Format: 2022-06-01+00:00:00 |
completed_at_from | date | N | Format: 2022-06-01+00:00:00 |
completed_at_to | date | N | Format: 2022-06-01+00:00:00 |
order_status_id | uuid | N | Ref. Order Status ID |
external_order_id | string | N | Ref. External Order ID |
[GET] Show Invoice Currencies For Crypto Order Creation
/currencies/crypto-order-target-currencies
Response Payload
{
"currencies": [
{
"id": "3366a58a-451b-4ec3-91fb-9091671a2e92",
"ticker": "UAH",
"is_fiat": true,
"title": null,
"min_amount": "200",
"max_amount": "10000000",
"precision": 2,
"icon": "https://media.whitepay.com/currency-default-icon.svg"
},
{
"id": "25f16a7b-593c-4cfb-a7c9-f98674050496",
"ticker": "USD",
"is_fiat": true,
"title": "United States Dollar",
"min_amount": "8",
"max_amount": "10000000",
"precision": 2,
"icon": "https://media.whitepay.com/currency-default-icon.svg"
},
{
"id": "f5d61716-c428-428e-823a-1df68a9f7234",
"ticker": "EUR",
"is_fiat": true,
"title": "Euro",
"min_amount": "8",
"max_amount": "10000000",
"precision": 2,
"icon": "https://media.whitepay.com/4a8552d8-5546-4b86-a183-6467ede1d395/eur.svg"
},
{
"id": "9c1e4a6f-7a2b-4edf-b6e7-75ba24ec2f84",
"ticker": "USDT",
"is_fiat": false,
"title": "Tether",
"min_amount": "8",
"max_amount": "10000000",
"precision": 4,
"icon": "https://media.whitepay.com/currency-default-icon.svg"
}
]
}
Check out invoice currencies entity reference for detailed description.
[POST] Complete Crypto Order
/private-api/crypto-orders/{slug}/{orderId}/complete
Attribute | Type | Required | Description |
---|---|---|---|
slug | string | Y | unique instance name defined for payment page. Can be found on each payment page settings page in CRM. |
orderId | string | Y | Whitepay internal order identifier |
You should know!
This method allows to complete order in PARTIALLY_FULFILLED
or DECLINED
status in case if this order has at least one complete transaction.
Response Payload
{
"order": {
"id": "96252a4f-01cc-4fd1-93e7-b8997651ae58",
"currency": "UAH",
"value": "1000",
"expected_amount": "26.43",
"received_total": "10",
"exchange_rate": "37.83",
"is_internal": true,
"deposited_currency": "USDT",
"received_currency": "UAH",
"status": "COMPLETE",
"external_order_id": null,
"created_at": "2022-03-23 14:37:06",
"completed_at": null,
"acquiring_url": "https://merchant.pay.whitepay.com/crypto-orders/96252a4f-01cc-4fd1-93e7-b8997651ae58",
"successful_link": null,
"failure_link": null,
"order_number": "000000001",
"transactions": [
{
"id": "23d2ca58-20bf-416f-960b-8eae02224653",
"currency": "USDT",
"value": "10",
"status": "COMPLETE",
"hash": "internal_transaction_b3f79c32-525f-46ea-848e-ae172c13697d",
"is_internal": true,
"created_at": "2022-03-23 14:40:53",
"completed_at": "2022-03-23 14:40:53"
}
]
}
}
Check out order entity reference for detailed description.