Flashpay API
  1. Quick Start
Flashpay API
  • Quick Start
    • Overview
    • Configuring the Server
    • Integrating Flashpay in Your Frontend 
  • Payments
    • New payment request
      POST
    • List payments
      GET
    • Payment details
      GET
  • Beneficiaries
    • Eligible beneficiaries list
      GET
  • Payouts
    • New payout request
      POST
    • Payout details
      GET
  1. Quick Start

Configuring the Server

Set up your server to handle payment creation and callbacks. Here is a general outline:

Creating a Payment#

Endpoint: Set up an endpoint to handle payment creation requests.
Request Data: Collect payment details such as amount, currency, description, and redirect URL.
API Request: Make a POST request to the Flashpay Payment API to create a payment.
endpoint: /payment/payments

Response handling#

Parse the response and construct a payment url based on selected bank. Bank selection is handled in the frontend and data sent to the backend.
{
    "paymentUrl": "https://<bank-url>/pay/b1fzc3ph9866zj4neyzrrq1f"
}

Node.js express example#

Setting Up a Webhook for Payment Response#

Webhook Endpoint: Set up an endpoint to receive webhook notifications from Flashpay.
Request Data: Extract relevant payment information from the webhook payload.
Response Handling: Update your application's records based on the webhook data.
endpoint: /payment/webhook
{
    "paymentId": "b1fzc3ph9866zj4neyzrrq1f",
    "status": "SUCCESS",
    "amount": 100000,
    "reference": "example-ref",
    "currency": "NGN",
    "updatedAt": "2024-06-01T12:00:00Z"
}
Previous
Overview
Next
Integrating Flashpay in Your Frontend 
Built with