Introduction
Boxo Payments is an in-app payment functionality that enables host app users to complete payments for orders within the miniapp.Boxo Payments flow
Boxo Payments flow
Here is a diagram illustrating the payment process for a miniapp order using the host app’s payment system.

1
User initiates payment
The user navigates to the payment page in the miniapp and initiates the creation of an order.
2
Miniapp creates order request
The miniapp server creates the order and sends a createOrderPayment request to the Boxo Platform.
3
Platform initiates payment process
The Boxo Platform initiates the order payment process on the host app server.
4
Host app returns payment ID
The host app server returns an orderPaymentID to the Boxo Platform.
5
Platform forwards payment ID
The Boxo Platform then forwards the orderPaymentID to the miniapp server.
6
Miniapp receives payment ID
The miniapp server passes the orderPaymentID to the miniapp.
7
SDK receives payment request
The miniapp forwards the orderPaymentID to the Boxo JS SDK’s
pay method.8
Native SDK displays confirmation
The Boxo Native SDK captures the Boxo JS SDK’s pay event (with the orderPaymentID) and displays a payment confirmation page to the user.
9
User confirms payment
The user confirms the payment.
10
Host app processes payment
The host app processes the payment and sends the payment status as a response to the Boxo JS SDK pay event.
- During this process, the host app server sends a callback to the Boxo Platform, which updates the order status in the miniapp backend.
11
Miniapp processes payment status
The miniapp processes the payment status received from the Boxo JS SDK event and confirms the order payment status on its server.
12
Payment status finalized
The miniapp finalizes the order payment status.
- If the order is still processing at this stage, the miniapp will request the payment status from the Boxo Platform, which, in turn, will query the host app server for an update.
13
Display payment result
Finally, the miniapp displays the order payment status page to the user.
Setting up the backend
Setting up the backend
*Note: Feature must be enabled in Dashboard Partnership
Data formatCurrently, JSON is used for data exchange. Decimal values can be represented as floats, numbers, or strings, with a maximum of 20 digits in total and up to 2 digits after the decimal point. String size limits are defined within the data type specifications.

1. Create Order Payment Endpoint
1. Create Order Payment Endpoint
This endpoint allows the Boxo Platform to create an order payment (refer to Step 3 in the diagram).URL and METHOD:This endpoint must handle a HTTPS POST request
URL to endpoint must be provided in Dashboard
Headers:

- Default
<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 tokenin Dashboard. hostapp_client_idandhostapp_secret_keymust be provided in Dashboard
OrderDetails:
OrderItem:
OrderShippingAddress:
Response:
- Response status must be
200in all cases - Response body:
Request Example:
2. Get Order Payment Status Endpoint
2. Get Order Payment Status Endpoint
This endpoint is for Boxo platform to get order payment statusURL and METHODThis endpoint must handle a HTTPS POST request
Can be configured to be a GET method
URL to endpoint must be provided in Dashboard
Headers

Default
<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 DashboardBodyResponse
- Response status must be
200in all cases - Response body
Request Example
3. Webhook Complete Order Payment
3. Webhook Complete Order Payment
This endpoint is part of the Boxo Platform. It sends a request to the miniapp server to complete the order payment after the payment has been processed (refer to the step after 10 in the diagram).URL and METHODThis is HTTPS POST Response Example
/api/v1/orders/complete-order/ endpoint
IP address of requesting services must be provided in Dashboard for whitelisting or Request Signaturing must be enabledHeadersBody
Response:
- Response status will be
400in case there is error_code - Response body:
Request Example
Pre-paid model
Platform partners can operate on a pre-paid basis. The partner team keeps a pre-paid balance with Boxo (topped up via wire transfer or crypto payment), and each paid order settles against that balance:- The pre-paid model is enabled for the partner team’s organization (managed by Boxo).
- Miniapps include
wholesale_total(and optionallywholesale_total_currency) in each create order payment request. The platform rejects orders without it (WHOLESALE_TOTAL_REQUIRED) and orders exceeding the remaining balance (INSUFFICIENT_BALANCE). - When an order reaches the
paidstatus,wholesale_totalis deducted from the team balance.
Free orders without confirmation
Separately from the balance flow, a team-level settingfree_orders_without_confirmation is available (managed by Boxo). It is a requirement for the pre-paid model:
- When enabled, orders created with
amount=0.00are marked aspaidon creation. - Your create order payment endpoint is still called as usual and must return an
order_payment_id, but the platform does not wait for your payment confirmation (webhook or status poll) for these orders. - The pre-paid balance deduction of
wholesale_totalstill applies to such orders.
Setting up the SDK
Setting up the SDK
Listening for Payment event
- iOS
- Android
- Flutter
- React Native
- Capacitor
- Expo