Orders
Merchant API
Create order
POST
https://sandbox.ca.swapple.io/public/api/orders/
Generates cryptocurrency payment methods
Headers
timestamp*
String
Current timestamp that was used to generate the signature in milliseconds.
signature*
String
HMAC SHA512 key/value signature.
Request Body
amount*
String
<decimal> | price in account currency
domainUrl*
String
<uri> | [ 1 .. 255 ] characters
lang
String
Enum: ["eu", "ua"]
String
<email> | <= 255 characters | customer email
firstName
String
<= 50 characters | customer first name
redirectUrl*
<uri> | [ 1 .. 255 ] characters
lastName
String
<= 50 characters | customer last name
phoneNumber
String
<= 15 characters | customer phone number
merchantOrderId*
String
[ 1 .. 255 ] characters
{
"products": [
{
"id": 0,
"name": "string",
"price": "861241",
"count": 2147483647
}
],
"amount": "-07152594",
"currency": "CARDUAH",
"redirectUrl": "string",
"domainUrl": "string",
"lang": "en",
"email": "[email protected]",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"status": "pending",
"createdAt": "2023-11-02T15:48:27.504Z",
"payedAt": "2023-11-02T15:48:27.505Z",
"merchantOrderId": "string",
"payUrl": "string"
}
Product body
name
string | <= 255 characters
price (required)
string <decimal> | product price in fiat
count
integer | number of objects
List orders
GET
https://sandbox.ca.swapple.io/public/api/orders/
Merchant list of orders.
Query Parameters
merchantOrderId
String
filter by merchant order id
Headers
timestamp*
String
Current timestamp that was used to generate the signature in millisecond.
signature*
String
HMAC SHA512 key/value signature.
[
{
"products": [
{
"id": 0,
"name": "string",
"price": "41572627.",
"count": 2147483647
}
],
"amount": "-4129988",
"currency": "CARDUAH",
"redirectUrl": "string",
"domainUrl": "string",
"lang": "en",
"email": "[email protected]",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"status": "pending",
"createdAt": "2023-11-02T15:47:56.733Z",
"payedAt": "2023-11-02T15:47:56.733Z",
"merchantOrderId": "string",
"payUrl": "string"
}
]
User API
Retrieve order
GET
https://sandbox.ca.swapple.io/public/api/orders/{slug}/
Retrieve a specific order by its slug.
Path Parameters
slug*
String
{
"products": [
{
"id": 0,
"name": "string",
"price": "-55",
"count": 2147483647
}
],
"amount": "053",
"currency": "CARDUAH",
"redirectUrl": "string",
"domainUrl": "string",
"lang": "en",
"email": "[email protected]",
"firstName": "string",
"lastName": "string",
"phoneNumber": "string",
"status": "pending",
"createdAt": "2023-11-02T15:44:17.204Z",
"payedAt": "2023-11-02T15:44:17.204Z",
"merchantOrderId": "string",
"payUrl": "string",
"cryptoCurrencies": [
{
"id": 0,
"name": "string",
"networkName": "string",
"amount": "2616225",
"payingAddress": "string",
"cpOrderId": "string"
}
]
}
Order pay
PATCH
https://ca.swapple.org/public/api/orders/{slug}/pay/
Indicates whether user has paid the order.
Path Parameters
slug*
String
Request Body
isUserPayed*
Boolean
Indicates that user payed
{
"isUserPayed": true,
"amount": "3000.00",
"currency": "CARDUAH",
"email": "[email protected]"
}
Last updated