Flashpay docs home

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

  1. 01

    Customer picks your bank

    On a Flashpay checkout (online, QR, or a tap on a POS), the customer chooses your bank.

  2. 02

    Your app opens

    The browser opens your app link with the payment ID: …://confirmpayment?paymentId=…

  3. 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.

  4. 04

    Customer authorises

    The customer confirms inside your app, with your own login and security checks.

  5. 05

    You move the money

    Your bank makes the transfer to the payee's account. Flashpay never holds the funds.

  6. 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.

SandboxProduction
API base URLhttps://api.sandbox.flashpayweb.com/api/v1https://api.flashpayweb.com/api/v1
Checkouthttps://pay.sandbox.flashpayweb.comhttps://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.

Header
Authorization: Bearer YOUR_BANK_API_KEY

Keep 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.

02

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.

PATCH /payment/{paymentId}/get-update
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"
  }'
Fields to show the customer
FieldMeaning
amountIn minor units of currency (kobo for NGN)
currencye.g. NGN
destinationAccountNameWho is being paid
destinationAccountPayee account number
destinationBankIdPayee bank (an ID; look it up in GET /banks)
description, referenceWhat the payment is for
callbackUrlWhere to send the customer when you're done
statusIN_PROGRESS once your bank has it
03

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:

CurrentYou can send
IN_PROGRESSPENDING, SUCCESSFUL, FAILED, CANCELLED, OPEN (release)
PENDINGSUCCESSFUL, FAILED, CANCELLED
SUCCESSFULREVERSED

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.

PATCH /payment/{paymentId}/update-status
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"
  }'
Statuses you can send
StatusSend it when
PENDINGThe transfer is under way but not settled; send the final status later
SUCCESSFULThe money moved. Add the transfer's 30-digit NIP sessionId if you have it
FAILEDThe transfer failed (declined, insufficient funds)
CANCELLEDThe customer cancelled in your app
REVERSEDA SUCCESSFUL transfer was reversed
OPENRelease: 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. A PENDING payment can't be released (400): money may already be moving, so send FAILED or SUCCESSFUL once 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: 400 while the payment is OPEN, 404 once another bank holds it.
  • Releasing a payment that is already OPEN and held by nobody returns 200 and 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.

CodeMeaningWhat to do
400Invalid 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
401The key is missing or invalid, or isn't a bank keyCheck the Authorization header
403GEO_BLOCKED: the location check blocked loading the payment or a SUCCESSFUL updateShow the customer the reason
404The payment doesn't exist, or your bank doesn't hold itDon't retry; show an error
409OPEN (release) sent for a payment you don't hold in IN_PROGRESSDon't retry; the payment has moved on
500Something failed on our sideRetry once, then contact Flashpay
503The identity service is unavailableRetry later