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>"
  }'
{
  "result": {
    "success": True,
    "payment_id": "FoPKKHqfQIKfBqhEj8M47A",
    "link": "https://flouci.com/pay/FoPKKHqfQIKfBqhEj8M47A",
    "developer_tracking_id": "<DEVELOPER_TRACKING_ID>
  },
  "name": "developers",
  "code": 0,
  "version": "v2"
}
This endpoint creates a new payment and returns a URL to redirect the user to for completing the 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>"
  }'

Body

amount
integer
required
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.
webhook
string
The webhook URL you want to receive payment confirmation on.
developer_tracking_id
string
A unique ID for you to track the payment.
session_timeout_secs
integer
default:"1200"
The session timeout in seconds.
accept_card
boolean
default:"true"
Whether to accept card payments.
{
  "result": {
    "success": True,
    "payment_id": "FoPKKHqfQIKfBqhEj8M47A",
    "link": "https://flouci.com/pay/FoPKKHqfQIKfBqhEj8M47A",
    "developer_tracking_id": "<DEVELOPER_TRACKING_ID>
  },
  "name": "developers",
  "code": 0,
  "version": "v2"
}