Integration Guide#
Initiating a Payment#
1. Create a Transaction (Server-side)#
From your server, call the Flashpay API with the payment details. You'll receive a transactionId in the response.2. Redirect the Customer (Primary)#
Redirect the customer to the Flashpay checkout page using the transactionId:The Flashpay checkout handles all payment UI, bank selection, and status updates. When the payment is complete, the customer is redirected to the redirectUrl you provided.
Alternative: Embed In-Page (SDK)#
If you prefer an in-page checkout without a full redirect, use the Flashpay SDK. Create the transaction the same way (step 1 above), then embed using one of the options below.Vanilla JS#
React#
import { FlashpayCheckout } from "@flash-pay/react";
<FlashpayCheckout
transactionId="txn_xxx"
onSuccess={(data) => console.log(data)}
onFailure={(data) => console.log(data)}
/>
Vue#
<script setup>
import { FlashpayCheckout } from "@flash-pay/vue";
</script>
<template>
<FlashpayCheckout
transactionId="txn_xxx"
@success="(data) => console.log(data)"
@failure="(data) => console.log(data)"
/>
</template>
Payment Status#
Once a payment reaches a terminal state, Flashpay will:Redirect flow: redirect the customer to your redirectUrl
SDK/embed flow: fire the onSuccess or onFailure callback
| Status | Terminal |
|---|
SUCCESSFUL | Yes |
COMPLETED | Yes |
FAILED | Yes |
CANCELLED | Yes |
EXPIRED | Yes |
For server-side verification, listen for webhook events or poll the transaction status endpoint using your secret key.Modified at 2026-05-27 09:06:57