Creates a Hosted Payment Page (HPP) session. Instead of collecting card details directly, you redirect the customer to a Flowlix-hosted payment page where they securely enter their card information.
The response includes a redirect_url that you should redirect the
customer to. After the customer completes (or abandons) the payment,
they are redirected back to your redirect_url with the payment result
appended as query parameters.
Use the Idempotency-Key header to safely retry requests.
Use your secret API key as the Bearer token. Test mode keys start with
fl_test_sk_ and live mode keys start with fl_live_sk_.
Authorization: Bearer fl_test_sk_abc123def456A unique key to ensure the request is processed only once. If a request with the same idempotency key has already been processed, the original response is returned. Keys expire after 24 hours. We recommend UUIDv4 values.
255The API version to use for this request. Defaults to your account's
default version if not specified. Format: YYYY-MM-DD.
^\d{4}-\d{2}-\d{2}$The payment amount in minor units. For EUR, 2500 means EUR 25.00.
x >= 12500
Three-letter ISO 4217 currency code in lowercase.
3^[a-z]{3}$"eur"
The URL to redirect the customer to after payment completion or
abandonment. Flowlix appends ?payment_id={id}&status={status} as
query parameters.
"https://shop.example.com/checkout/complete"
An arbitrary string to attach to the payment for your records.
500"Order #5678"
A set of key-value pairs for storing additional information about the payment. Keys and values are strings. Maximum 50 keys.
{ "order_id": "ord_5678" }An optional server-to-server callback URL. Flowlix will POST the payment result to this URL when the payment completes.
null
HPP payment session created.
A Payment object represents a single attempt to move money. It is created when you submit a payment request and is updated as the payment progresses through its lifecycle.
Unique identifier for the payment.
^pay_[a-zA-Z0-9-]+$"pay_1N3fKx2eZvKYlo2C0XjMr8pV"
Object type; always payment.
payment "payment"
The payment amount in minor units.
4999
Three-letter ISO 4217 currency code.
"eur"
The current status of the payment.
pending -- The payment has been created but not yet completed (HPP flow).succeeded -- The payment was successful.failed -- The payment was declined or failed.refunded -- The payment was refunded.pending, succeeded, failed, refunded "succeeded"
The description attached to the payment.
"Order #1234"
The masked card details. null for HPP payments that have not
yet been completed.
The customer associated with the payment.
Arbitrary key-value metadata attached to the payment.
{ "order_id": "ord_1234" }If the payment was declined, the decline code indicating the reason. See the decline codes reference for details.
null
If the payment was declined, a human-readable message explaining why.
null
For HPP payments, the URL of the hosted payment page to redirect the
customer to. null for direct API payments.
null
Unix timestamp when the payment was refunded, or null if not refunded.
null
Unix timestamp when the payment succeeded, or null if not yet succeeded.
1719792000
Unix timestamp when the payment failed, or null if not failed.
null
Unix timestamp when the payment was created.
1719792000
Whether this payment was created using a live API key (true) or
a test API key (false).
false