For banks · Docs
Let your customers pay from your own app.
When a customer picks your bank at a Flashpay checkout, your banking app opens with the payment already filled in. They confirm, you move the money, and you tell Flashpay how it went.
The flow
How it works
- 01
Customer picks your bank
On a Flashpay checkout (online, QR, or a tap on a POS), the customer chooses your bank.
- 02
Your app opens
The browser opens your app link with the payment ID: …://confirmpayment?paymentId=…
- 03
You load the payment
Your app calls get-update with the customer's account. Flashpay returns the amount, payee and reference, and reserves the payment for your bank.
- 04
Customer authorises
The customer confirms inside your app, with your own login and security checks.
- 05
You move the money
Your bank makes the transfer to the payee's account. Flashpay never holds the funds.
- 06
You report the result
Your app calls update-status. The checkout updates straight away, and you send the customer back to the callback URL.
Before you start
Sandbox and production
Build against sandbox first. Each environment has its own bank API key and its own payments: a sandbox key is rejected by production, and the other way round. All paths below are relative to the API base URL.
| Sandbox | Production | |
|---|---|---|
| API base URL | https://api.sandbox.flashpayweb.com/api/v1 | https://api.flashpayweb.com/api/v1 |
| Checkout | https://pay.sandbox.flashpayweb.com | https://pay.flashpayweb.com |
Bank API key
Flashpay sets your bank up during onboarding: your bank's profile, your app link and an admin account for your team. Your admin then issues a bank API key. The secret is shown once, so store it straight away. To rotate it, revoke the old key and issue a new one.
Send the key as a Bearer token on every request. The key identifies your bank, so you never send a bank ID.
Authorization: Bearer YOUR_BANK_API_KEYKeep the key on your servers or in secure app config. It acts as your bank: anyone holding it can claim and settle payments in your name.
Open from checkout
You give Flashpay one app link during onboarding. When a customer picks your bank, the checkout adds confirmpayment and the payment ID to it and opens it:
| Your app link | What the checkout opens |
|---|---|
| flashpay-yourbank | flashpay-yourbank://confirmpayment?paymentId=… |
| https://links.yourbank.com/fp | https://links.yourbank.com/fp/confirmpayment?paymentId=… |
Register the link in your app so Android routes it to you, then read paymentId from the URL. If the checkout runs inside a merchant's iframe, it opens the link in a new window instead of the current one.
<activity
android:name=".MainActivity"
android:launchMode="singleTask"
android:exported="true">
<intent-filter android:autoVerify="false">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="flashpay-yourbank" android:host="confirmpayment" />
<data android:scheme="com.yourbank.app" />
</intent-filter>
</activity>App link setup
Your app can open from a normal https link, like iDEAL: the customer taps Pay and your app opens on the payment, with no prompt. Your link is https://open.flashpayweb.com/<slug>/confirmpayment?paymentId=…, shown on the App links page of your bank workspace.
Fill in the App links page so Apple and Google can check that your app owns the link:
| Field | What it is |
|---|---|
| Team ID and bundle ID | Your Apple developer Team ID and the app's bundle identifier. |
| Package name | Your Android application ID. |
| SHA-256 fingerprints | The certificate that signs the app installed on phones. With Play App Signing, copy the app signing key from Play Console, not your upload key. |
| App Store and Play Store URLs | Where a customer without your app is sent. |
iOS: add the Associated Domains capability with applinks:open.flashpayweb.com. Android: add an intent filter with android:autoVerify="true", scheme https, host open.flashpayweb.com and pathPrefix /<slug>/confirmpayment.
Read paymentId from the link's query and continue with get-update, exactly as with your custom scheme. If your app is not installed, Flashpay sends an iPhone to your App Store URL, an Android phone to your Play Store URL, and anything else back to the checkout.
Testing: on Android, run adb shell pm verify-app-links --re-verify <package> after installing. On iOS, test on a real device. Apple caches the association file on its CDN, so a change on the App links page can take up to a day to reach phones.
Testing with unpublished builds
Your app doesn't need to be in a store: the phone fetches our files when the app is installed.
- iOS: Xcode, TestFlight, ad hoc and enterprise builds all work. Add every test bundle ID you use. For changes to show at once, a development build can declare
applinks:open.sandbox.flashpayweb.com?mode=developer, with Developer Mode on the device; otherwise Apple's CDN can take up to a day. - Android: any install works, on Android 12 or later. The fingerprint must match the certificate that signed the installed build: the debug keystore for debug builds, your release key, or the Play App Signing key for Play installs. Add each one; the workspace takes a list.
- Without a store link, a customer without the app goes back to the checkout.
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="open.flashpayweb.com"
android:pathPrefix="/yourbank/confirmpayment" />
</intent-filter>- The production app claims only
open.flashpayweb.com, as above. - Test builds claim
open.sandbox.flashpayweb.cominstead. Enter their App links details in your sandbox bank workspace, and your production details in your production workspace. - Each environment's verification files list only the apps entered in that environment's workspace.
Keep your custom scheme for now. Flashpay switches your checkout link to the open. link only once your updated app is live. Until then the checkout still opens your current link, and customers on an older app version still need it.
Load the payment
Once the customer has signed in and picked the account they will pay from, call get-update with that account. It returns the payment and reserves it for your bank, so no other bank can take it.
- Send both fields. An unknown field is rejected with
400. - An open payment moves to
IN_PROGRESS. Calling again for the same payment returns it unchanged, so a retry is safe. - A payment already taken by another bank, or already finished, returns
404.
Then show the customer the amount and payee, and let them authorise in your app. Moving the money is your bank's own transfer: Flashpay is not in the money path.
curl -X PATCH https://api.flashpayweb.com/api/v1/payment/PAYMENT_ID/get-update \
-H "Authorization: Bearer YOUR_BANK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"originAccount": "0123456789",
"originAccountName": "Ada Obi"
}'| Field | Meaning |
|---|---|
| amount | In minor units of currency (kobo for NGN) |
| currency | e.g. NGN |
| destinationAccountName | Who is being paid |
| destinationAccount | Payee account number |
| destinationBankId | Payee bank (an ID; look it up in GET /banks) |
| description, reference | What the payment is for |
| callbackUrl | Where to send the customer when you're done |
| status | IN_PROGRESS once your bank has it |
Report the result
As soon as you know the outcome, send it with update-status. The checkout updates straight away. On SUCCESSFUL, Flashpay notifies the merchant's status webhook, if they set one. A successful call returns 200 and echoes your request. Only the bank that holds the payment can update it.
sessionId is optional, accepted only with SUCCESSFUL, and must be exactly 30 digits: the NIP session ID of your transfer. Spell CANCELLED with two Ls.
Which statuses are allowed depends on where the payment is now:
| Current | You can send |
|---|---|
| IN_PROGRESS | PENDING, SUCCESSFUL, FAILED, CANCELLED, OPEN (release) |
| PENDING | SUCCESSFUL, FAILED, CANCELLED |
| SUCCESSFUL | REVERSED |
Banks never send COMPLETED: it follows SUCCESSFUL once the merchant confirms they received the money, and sending it is rejected with 400. Any other status, or a change the table doesn't allow, is a 400 too.
FAILED, CANCELLED, REVERSED and COMPLETED are final. After you report the result, open the payment's callbackUrl so the customer lands back on the merchant.
curl -X PATCH https://api.flashpayweb.com/api/v1/payment/PAYMENT_ID/update-status \
-H "Authorization: Bearer YOUR_BANK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "SUCCESSFUL",
"sessionId": "000015251127093012345678901234"
}'| Status | Send it when |
|---|---|
| PENDING | The transfer is under way but not settled; send the final status later |
| SUCCESSFUL | The money moved. Add the transfer's 30-digit NIP sessionId if you have it |
| FAILED | The transfer failed (declined, insufficient funds) |
| CANCELLED | The customer cancelled in your app |
| REVERSED | A SUCCESSFUL transfer was reversed |
| OPEN | Release: the customer abandoned the payment and you won't move money |
Customer walked away
Release a payment
If the customer abandons the payment in your app and you will not move money for it, send { "status": "OPEN" }. The payment goes back to OPEN with no bank: your bank and the payer's account details are cleared, and the customer can pay with any bank, yours included.
- Release only from
IN_PROGRESS. APENDINGpayment can't be released (400): money may already be moving, so sendFAILEDorSUCCESSFULonce you know. - After a release you no longer hold the payment, so don't send a later status for it. It is rejected and changes nothing:
400while the payment isOPEN,404once another bank holds it. - Releasing a payment that is already
OPENand held by nobody returns200and does nothing, so a retry is safe.
Errors
Most errors are JSON with a message. A 403 returns { "error": "GEO_BLOCKED", "reason": … }. Use GET /banks (with your key) to check your setup: it lists the banks on Flashpay, yours included.
| Code | Meaning | What to do |
|---|---|---|
| 400 | Invalid JSON, an unknown field, an unknown status, a bad or misplaced sessionId, or a status change the table doesn't allow (including any change to a final or OPEN payment; releasing a final one returns 409) | Fix the request; don't retry it unchanged |
| 401 | The key is missing or invalid, or isn't a bank key | Check the Authorization header |
| 403 | GEO_BLOCKED: the location check blocked loading the payment or a SUCCESSFUL update | Show the customer the reason |
| 404 | The payment doesn't exist, or your bank doesn't hold it | Don't retry; show an error |
| 409 | OPEN (release) sent for a payment you don't hold in IN_PROGRESS | Don't retry; the payment has moved on |
| 500 | Something failed on our side | Retry once, then contact Flashpay |
| 503 | The identity service is unavailable | Retry later |