createOrderPayment
request to the Boxo Platform.
orderPaymentID
to the Boxo Platform.
orderPaymentID
to the Miniapp server.
orderPaymentID
to the Miniapp.
orderPaymentID
to the Boxo JS SDK pay
method.
pay
event triggered by the Boxo JS SDK and displays the payment confirmation page to the user.
pay
event.
/api/v1/orders/create-order-payment/
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 |
---|---|---|---|
app_id | String | No | Miniapp identifier |
client_id | String | No | Hostapp identifier |
order | OrderDetails | No | Order info (amount, currency and etc.) |
Field | Data Type | Optional | Description |
---|---|---|---|
currency | String(20) | No | Order amount currency |
amount | Decimal | No | Order amount |
subtotal_amount | Decimal | Yes | Subtotal amount of the order |
shipping_amount | Decimal | Yes | Shipping cost |
discount_amount | Decimal | Yes | Discount applied on the order |
tax_title | String(250) | Yes | Title of the tax applied |
tax_amount | Decimal | Yes | Tax amount |
taxes_included | Bool | Yes | Indicates whether taxes are included |
note | String | Yes | Additional notes for the order |
miniapp_order_id | String(250) | Yes | Order reference in the miniapp |
hostapp_user_id | String(250) | Yes | User reference in the host app |
items | OrderItem[] | Yes | List of items purchased in the order |
shipping_address | OrderShippingAddress | Yes | Shipping address information |
custom_attributes | JSON | Yes | Custom attributes for the order |
Field | Data Type | Optional | Description |
---|---|---|---|
product_name | String(250) | Yes | Name of the product |
product_variant_name | String(250) | Yes | Name of the product variant |
product_sku | String(250) | Yes | Product SKU |
product_image_url | String(250) | Yes | URL of the product image |
quantity | Integer | Yes | Quantity of the product in the order |
price | Decimal | Yes | Price of the product |
discount | Decimal | Yes | Discount applied to the product |
Field | Data Type | Optional | Description |
---|---|---|---|
address1 | String(1000) | Yes | Address line 1 |
address2 | String(1000) | Yes | Address line 2 |
first_name | String(250) | Yes | First name of the recipient |
last_name | String(250) | Yes | Last name of the recipient |
phone | String(250) | Yes | Phone number of the recipient |
region_name | String(100) | Yes | Name of the region or state |
region_code | String(100) | Yes | Code of the region or state |
province_name | String(250) | Yes | Name of the province |
province_code | String(250) | Yes | Code of the province |
city | String(250) | Yes | City of the recipient |
country | String(250) | Yes | Country of the recipient |
postal_code | String(250) | Yes | Postal code of the recipient |
latitude | Decimal | Yes | Latitude of the shipping address (up to 15 digits after the decimal) |
longitude | Decimal | Yes | Longitude of the shipping address (up to 15 digits after the decimal) |
400
in case there is error_code
Field | Data type | Optional | Description |
---|---|---|---|
order_payment_id | String(250) | Yes | 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 |
/api/v1/orders/get-payment-status/
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 |
---|---|---|---|
app_id | String | No | Miniapp identifier |
client_id | String | No | Hostapp identifier |
order_payment_id | String(250) | No | Order payment identifier |
400
in case there is error_code
Field | Data type | Description |
---|---|---|
order_payment_id | String | Order payment identifier |
app_id | String | Miniapp identifier |
client_id | String | Hostapp identifier |
payment_status | String | Order payment status: in_process| paid| cancelled |failed |
payment_fail_reason | String | Order payment fail reason |
error_code | String | Error code. Example: {"error_code": "ORDER_NOT_FOUND"} All error codes can be found here |
Key | Value |
---|---|
Authorization | Basic <base64 encoded(app_id:secret_key)> |
Content-type | application/json |
app_id
and secret_key
will be provided in Dashboard
Body:
Field | Data type | Description |
---|---|---|
miniapp_order_id | String(250) | Miniapp order indentifier |
hostapp_order_payment_id | String(250) | Order payment identifier |
hostapp_client_id | String(250) | Hostapp identifier |
payment_status | String | Order payment status: in_process| paid| cancelled| failed |
payment_fail_reason | String | Order payment fail reason |
custom_attributes | JSON | Order custom attributes |
200
in all cases
Field | Data type | Description |
---|---|---|
code | String | Request result code example: SUCCESS |
error_code | String | Error code |
appboxoSdk.pay
method as in example to open payment pages on host app.