logo
When an app's Google Pay or Apple Pay configuration sets its gateway to External Provider, nandbox does not charge the card itself. Instead it hands the tokenized card data to your API (bot), which charges it through your own payment service provider and reports the outcome back.
This makes your bot the payment gateway for that app.

The flow

  1. The app is configured with Google Pay or Apple Pay, the gateway is set to External Provider, and the configuration names your API as the handler.
  1. A user pays inside the app. Google or Apple returns a payment token to the nandbox server.
  1. The server sends your bot a paymentAuthorizationRequest containing the token, the order, the amount, and a per-request secret.
  1. Your bot charges the card with its own provider.
  1. Your bot reports the outcome with submitPaymentResult.
plain text
user pays in app β”‚ β–Ό nandbox server ── paymentAuthorizationRequest ──► your bot β–² β”‚ β”‚ charges via your PSP β”‚ β”‚ └──────── submitPaymentResult β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Preconditions for API Functionality

The following tables outline the preconditions that must be met for the API to function correctly. Failure to meet these conditions may result in errors or unexpected behavior.
Action
Requirement
Description
Receive authorization requests
External Provider gateway
The app's Google Pay or Apple Pay configuration must set the gateway to External Provider. With any other gateway the server settles the payment itself and your bot is never called.
Receive authorization requests
API named in the configuration
The payment configuration must reference your API. Requests are delivered only to that API.
⚠️ Card data reaches your bot as a provider token, not as raw card numbers. Handle it, and the secret, as sensitive material β€” never log the payload.

Methods

Method
Direction
Purpose
paymentAuthorizationRequest
Server β†’ API
Delivers the payment token and order details for you to charge.
submitPaymentResult
API β†’ Server
Reports the outcome of the charge.
paymentAuthorizationRequestsubmitPaymentResult