pay
method.Key | Value |
---|---|
Authorization | <prefix> <base64 encoded(hostapp_client_id:hostapp_secret_key)> or token from Get access token can be used instead |
Content-type | application/json |
X-User-ID | <Hostapp user reference> |
<prefix>
: Token
. Access token prefix can be set in Boxo Connect.Use access token
in Dashboard.hostapp_client_id
and hostapp_secret_key
must be provided in DashboardField | Data type | Description |
---|---|---|
app_id | String | Miniapp identifier |
order | OrderDetails | Order info (amount, currency and etc.) |
Field | Data type | Optional | Description |
---|---|---|---|
currency | String(20) | No | Currency code for the order (e.g., ‘USD’) |
amount | Decimal | No | Total order amount (decimal with 2 decimal places) |
subtotal_amount | Decimal | Yes | Subtotal before taxes and shipping (decimal with 2 decimal places) |
shipping_amount | Decimal | Yes | Shipping cost (decimal with 2 decimal places) |
discount_amount | Decimal | Yes | Total discount applied (decimal with 2 decimal places) |
tax_title | String(250) | Yes | Title/name of the tax |
tax_amount | Decimal | Yes | Tax amount (decimal with 2 decimal places) |
taxes_included | Boolean | Yes | Boolean indicating if taxes are included in the price |
note | Text | Yes | Additional notes for the order |
custom_attributes | JSON | Yes | JSON field for custom order attributes |
miniapp_order_id | String(255) | Yes | Order ID from the miniapp side |
hostapp_user_id | String(255) | Yes | User ID from the host app |
items | OrderItem[] | Yes | List of order items (see OrderItem below) |
shipping_address | Object | Yes | Shipping address details (see OrderShippingAddress below) |
Field | Data type | Optional | Description |
---|---|---|---|
product_name | String(250) | No | Name of the product |
product_variant_name | String(250) | No | Product variant name |
product_sku | String(250) | No | Product SKU/identifier |
product_image_url | String(500) | No | URL to product image |
quantity | Integer | No | Quantity of the product (positive integer) |
price | Decimal | No | Price per item (decimal with 2 decimal places) |
discount | Decimal | No | Discount per item (decimal with 2 decimal places) |
Field | Data type | Optional | Description |
---|---|---|---|
address1 | String(1000) | Yes | Primary address line |
address2 | String(1000) | Yes | Secondary address line |
first_name | String(250) | Yes | First name |
last_name | String(250) | Yes | Last name |
phone | String(250) | Yes | Phone number |
region_name | String(100) | Yes | Region/state name |
region_code | String(100) | Yes | Region/state code |
province_name | String(250) | Yes | Province name |
province_code | String(250) | Yes | Province code |
city | String(250) | Yes | City name |
country | String(250) | Yes | Country name |
postal_code | String(250) | Yes | Postal/ZIP code |
latitude | Decimal | Yes | Geographic latitude (-90 to 90, 15 decimal places) |
longitude | Decimal | Yes | Geographic longitude (-180 to 180, 15 decimal places) |
200
in all casesField | Data type | Optional | Description |
---|---|---|---|
order_payment_id | String(250) | No, except error_code provided | Order payment identifier |
error_code | String | Yes | If some error is occured error code should be provided. Example: {"error_code": "INVALID_ORDER_DATA"} All error codes can be found here |
custom_attributes | JSON | Yes | JSON field for custom order attributes |
Key | Value |
---|---|
Authorization | <prefix> <base64 encoded(hostapp_client_id:hostapp_secret_key)> or token from Get access token can be used instead |
Content-type | application/json |
X-User-ID | <Hostapp user reference> |
<prefix>
: Token
. Access token prefix can be set in Boxo Connect.
To use user access token from Boxo Connect as authorization token enable Use access token
in Dashboard.
hostapp_client_id
and hostapp_secret_key
must be provided in Dashboard
Body
Field | Data type | Description |
---|---|---|
app_id | String | Miniapp identifier |
client_id | String | Hostapp identifier |
order_payment_id | String | Order payment identifier |
200
in all casesField | Data type | Optional | Description |
---|---|---|---|
app_id | String | No, except error_code provided | Miniapp identifier |
client_id | String | No, except error_code provided | Hostapp identifier |
order_payment_id | String | No, except error_code provided | Order payment identifier |
payment_status | String(100) | No, except error_code provided | Order payment status: in_process , paid , cancelled , failed |
payment_fail_reason | String | Yes | Order payment fail reason |
custom_attributes | JSON | Yes | JSON field for custom order attributes |
error_code | String | Yes | If some error is occured error code should be provided. Example: {"error_code": "ORDER_NOT_FOUND"} All error codes can be found here |
/api/v1/orders/complete-order/
endpoint
IP address of requesting services must be provided in Dashboard for whitelisting or Request Signaturing must be enabled
Headers
Key | Value |
---|---|
Content-type | application/json |
Field | Data type | Optional | Description |
---|---|---|---|
order_payment_id | String(250) | No | Order payment identifier |
app_id | String | No | Miniapp identifier |
client_id | String | No | Hostapp identifier |
payment_status | String(100) | No | Order payment status: in_process , paid , cancelled , failed |
payment_fail_reason | String | Yes | Order payment fail reason |
custom_attributes | JSON | Yes | Order custom attributes |
400
in case there is error_codeField | Data type | Description |
---|---|---|
code | String | Request result code example: SUCCESS |
message | String | Result message |
error_code | String | Error code |
error_message | String | Result error message. All error codes can be found here |
Boxo.setConfig('[CLIENT_ID]', multitaskMode: true);
Boxo.setConfig('[CLIENT_ID]', { enableMultitaskMode: true })
Boxo.setConfig('[CLIENT_ID]', { enableMultitaskMode: true })