Skip to main content

Introduction

Boxo Payments is an in-app payment functionality that enables host app users to complete payments for orders within the miniapp.
Here is a diagram illustrating the payment process for a miniapp order using the host app’s payment system.AuthDiagram
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.
*Note: Feature must be enabled in Dashboard PartnershipAuthDiagramData 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.
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 DashboardAuthDiagramHeaders:
  • 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 Dashboard
BodyOrderDetails:OrderItem:OrderShippingAddress:Response:
  • Response status must be 200 in all cases
  • Response body:
Request Example:
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 DashboardAuthDiagramHeadersDefault <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 200 in all cases
  • Response body
Request Example
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 /api/v1/orders/complete-order/ endpoint IP address of requesting services must be provided in Dashboard for whitelisting or Request Signaturing must be enabledHeadersBodyResponse:
  • Response status will be 400 in case there is error_code
  • Response body:
Request Example
Response 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:
  1. The pre-paid model is enabled for the partner team’s organization (managed by Boxo).
  2. Miniapps include wholesale_total (and optionally wholesale_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).
  3. When an order reaches the paid status, wholesale_total is deducted from the team balance.
The balance is deducted only for orders created by Boxo miniapps on production host apps — staging host apps never deduct the balance.

Free orders without confirmation

Separately from the balance flow, a team-level setting free_orders_without_confirmation is available (managed by Boxo). It is a requirement for the pre-paid model:
  • When enabled, orders created with amount = 0.00 are marked as paid on 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_total still applies to such orders.
Listening for Payment event