Pre-Authorization is a payment process where a cardholder’s funds are temporarily held to ensure the availability of the specified amount for a future transaction. This process involves verifying the card details and reserving the funds without actually transferring them, allowing merchants to confirm the card’s validity and the customer’s ability to pay.
Once the pre-authorization is approved, the funds are earmarked and can be captured later when the final transaction is completed, providing flexibility and security for both merchants and customers in managing payments.
Initiate Pre-Authorization
This endpoint initiates a pre-authorization for a payment.
curl -X POST 'https://developers.flouci.com/api/v2/generate_payment' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <PUBLIC_KEY>:<PRIVATE_KEY>' \
-d '{
"amount": 1000,
"success_link": "https://your-website.com/success",
"fail_link": "https://your-website.com/fail",
"webhook": "https://your-website.com/webhook",
"developer_tracking_id": "YOUR_TRACKING_ID",
"pre_auth": true
}'
Body
The amount to be paid in millimes.
The URL to redirect the user to after a successful payment.
The URL to redirect the user to after a failed payment.
The webhook URL you want to receive payment confirmation on.
A unique ID for you to track the payment.
Whether to create a pre-authorization.
{
"result": {
"payment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"link": "https://flouci.com/pay/a1b2c3d4-e5f6-7890-1234-567890abcdef"
}
}
Confirm Payment
This endpoint confirms a pre-authorized payment.
curl -X POST 'https://developers.flouci.com/api/v2/confirm_payment' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <PUBLIC_KEY>:<PRIVATE_KEY>' \
-d '{
"payment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
}'
Body
The ID of the payment to confirm.
{
"result": {
"status": "SUCCESS"
}
}
Cancel Payment
This endpoint cancels a pre-authorized payment.
curl -X POST 'https://developers.flouci.com/api/v2/cancel_payment' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <PUBLIC_KEY>:<PRIVATE_KEY>' \
-d '{
"payment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
}'
Body
The ID of the payment to cancel.
{
"result": {
"status": "SUCCESS"
}
}