Skip to main content
This guide takes you from zero to a completed test payment using the Hosted Payment Page — the integration path that requires no PCI compliance on your side.

Prerequisites

  • A Flowlix merchant account with access to the Merchant Portal.
  • Your test secret key (api_test_sk_...) from the Developers section of the Merchant Portal.
  • curl or any HTTP client.
Secret keys must only be used from your servers. Never embed them in mobile apps, browsers, or public repositories.

1. Create a hosted payment page payment

Call POST /v1/payments/hpp with the amount (in minor units), the customer’s billing details, and a return_url — the page on your site where the customer lands after paying.
merchant_reference is optional and must be an integer with exactly 10 digits (from 1000000000 to 9999999999). The API responds with 201 Created and a Payment object:

2. Redirect your customer

Send the customer to next_action.redirect_url when next_action.reason is hosted_payment_page. Flowlix renders a secure, mobile-friendly payment page where they enter their card details. In test mode, pay with a test card, for example 4111 1111 1111 1111 with any future expiry date and any CVC.

3. Handle the return

After the customer completes (or abandons) the page, Flowlix redirects them to your return_url.
The redirect to return_url is a UX signal only — it does not confirm payment. The customer may close the browser before the redirect, or the payment may still be waiting for provider reconciliation. Always confirm the outcome with the API.

4. Confirm the payment status

Retrieve the payment and check its status:
SUCCEEDED means the funds were collected — you can fulfil the order. See Payment lifecycle for every status and how to react to it. For real-time updates without polling, subscribe to webhooks.

Next steps

Hosted Payment Page in depth

Prefilling, return URL semantics, expiry, and edge cases.

Direct API integration

Charge cards from your own checkout UI (PCI DSS required).

Webhooks

Get notified the moment a payment succeeds or fails.

Refunds

Return funds to your customers, fully or partially.