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
- 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.
- A user pays inside the app. Google or Apple returns a payment token to the nandbox server.
- The server sends your bot a
paymentAuthorizationRequestcontaining the token, the order, the amount, and a per-requestsecret.
- Your bot charges the card with its own provider.
- Your bot reports the outcome with
submitPaymentResult.
plain textuser 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. |