Skip to main content

Introduction

Boxo Payments is an integrated in-app payment solution that enables users of host apps to securely make payments for orders directly within a miniapp. By leveraging the Boxo platform, it simplifies the payment process, allowing users to complete transactions seamlessly without leaving the host app environment. This functionality ensures a smooth and secure payment experience for users, while providing miniapp developers with an easy-to-integrate solution for handling payments within their services.
Here is diagram showcasing the payment of miniapp’s order with the host app’s payment systemPaymentsHere is the streamlined process for handling payment in a Boxo Miniapp:
1

User reaches payment page

User reaches the payment page in the Miniapp and proceeds to create an order.
2

Miniapp creates order request

Miniapp server creates the order and sends a createOrderPayment request to the Boxo Platform.
3

Platform initiates payment

Boxo Platform initiates the payment request on the Host app server.
4

Host app returns payment ID

Host app server returns the orderPaymentID to the Boxo Platform.
5

Platform forwards payment ID

Boxo Platform returns the orderPaymentID to the Miniapp server.
6

Miniapp receives payment ID

Miniapp server sends the orderPaymentID to the Miniapp.
7

SDK processes payment

The Miniapp passes the orderPaymentID to the Boxo JS SDK pay method.
8

Native SDK displays confirmation

The Boxo Native SDK listens for the pay event triggered by the Boxo JS SDK and displays the payment confirmation page to the user.
9

User confirms payment

User confirms the payment on the payment confirmation page.
10

Host app processes payment

The Host app handles the payment and sends the payment status back to the Boxo JS SDK pay event.
  • During payment processing, the Host app server sends a callback to the Boxo Platform to update the order in the Miniapp backend.
11

Miniapp handles payment status

The Miniapp handles the payment status event from the Boxo JS SDK and updates the order payment status in the Miniapp server.
12

Payment status confirmation

Miniapp confirms the order payment status.
  • If the order is still processing, the Miniapp will request the payment status from the Boxo Platform, which in turn will request the payment status from the Host app server.
13

Display payment result

Finally, the Miniapp shows the order payment status page to the user.
Note: Feature must be enabled in Dashboard PartnershipPaymentEnabledData format Currently, the Boxo platform uses JSON format for data exchange. When working with decimals, they are represented as either float, number, or string, with a maximum of 20 digits and 2 digits after the decimal point. Additionally, the data type definitions include limits on the size of strings, ensuring consistent and manageable data structures across systems.
This endpoint is on Boxo platform. Send request to create order payment (see step 2 in diagram).URL and METHOD:This is HTTPS POST /api/v1/orders/create-order-payment/ endpoint IP address of requesting services must be provided in Dashboard for whitelisting or Request Signaturing must be enabledHeadersBody:Here is the data for OrderDetails, OrderItem, and OrderShippingAddress in a clean, well-structured format:OrderDetails
OrderItem
OrderShippingAddress
Decimal Limits for Coordinates:
  • Latitude: Max value: 90, Min value: -90, max 17 digits with 15 digits after the decimal point.
  • Longitude: Max value: 180, Min value: -180, max 18 digits with 15 digits after the decimal point.
Response:
  • Response status will be 400 in case there is error_code
  • Response body:
Request Example:
Response Example:
This endpoint is on Boxo platform. Send request to get order payment status (see “Check order status” step in diagram).URL and METHOD: This is HTTPS POST /api/v1/orders/get-payment-status/ endpoint IP address of requesting services must be provided in Dashboard for whitelisting or Request Signaturing must be enabledHeaders:Body:Response:
  • Response status will be 400 in case there is error_code
  • Response body:
Request Example
Setup this endpoint for Boxo platform to complete order payment(see step after 10 in diagram).URL and METHOD: This endpoint must handle a HTTPS POST request URL to endpoint must be provided in DashboardPayments_miniApp
  • We suggest to whitelist our IP addresses for this endpoint.
Headers:app_id and secret_key will be provided in DashboardBody:Response:
  • Response status must be 200 in all cases
  • Response body:
Request Example:
Response Example:
When the order is created payment should be handled on host app’s side. Use appboxoSdk.pay method as in example to open payment pages on host app.