Skip to main content
Use the /payment-links endpoint to generate a hosted payment page. Instead of building a custom checkout UI, you redirect the payer to a HelloPay-hosted URL where they choose from the payment methods enabled for your account. You can keep the link fully open, or optionally send defaults such as rail, inlineCustomer, or pse.bank when your flow already knows the payer, preferred payment method, or selected PSE bank.

How it works

  1. Send a POST request to /payment-links with the amount, your internal reference, a callbackUrl, and any optional defaults for the checkout flow.
  2. HelloPay returns a paymentLinkUrl — the full URL to redirect the payer to.
  3. Redirect the payer to the paymentLinkUrl.
  4. The payer selects their preferred payment method and completes the flow on the HelloPay-hosted page.
  5. HelloPay fires a webhook event when the payment link is completed or expires.
  6. Once the flow ends (whether successful or not), the payer is redirected to the callbackUrl you provided.

Redirecting the payer

The paymentLinkUrl in the response is the full URL of the hosted payment page. Redirect the payer to this URL as soon as you receive it.
The page will display the payment methods enabled for your merchant account. If you send rail, the payment link is restricted to that method and the payer cannot choose a different one. If you send inlineCustomer, HelloPay attaches that customer data to the payin created from the link.

Choosing the right flow

rail and inlineCustomer are optional. Include them only when they match the experience you want to build:
When rail is set, it restricts the payment link to that rail only. The payer cannot select a different payment method. Omit rail if you want the payer to choose from all payment methods enabled for your account.
Payment links expire after 1 hour. The expiresAt field tells you exactly when. Do not attempt to reuse a link after it has expired — create a new one instead.

Handling webhook events

HelloPay fires payment-link webhook events when a link is completed or expires. You must have a webhook configured to receive these — see Webhooks for setup instructions. Listen for the following events:
Payins created through a payment link do not fire payin.* webhook events. Use paymentlink.completed as the sole authoritative signal that a payment was collected. Do not rely on your existing payin webhook handlers to detect payment link payments — they will not be triggered.
Each webhook event payload includes a data object with the payment link details. Use either of these two fields to identify which payment link the event belongs to:
  • data.reference — matches the reference you passed when creating the payment link.
  • data.paymentLinkId — matches the paymentLinkId returned in the creation response.

Callback redirect

After the payment flow ends — regardless of whether the payment succeeded or failed — HelloPay redirects the payer back to the callbackUrl you provided when creating the link. Use this URL to send the payer to a confirmation, error, or status page in your application.
The redirect to callbackUrl happens on the client side at the end of the payment flow. It is not a substitute for webhook events — always rely on webhooks for authoritative payment status updates.

Request fields

amountType currently only supports FIXED. Additional amount-handling modes may be introduced in the future.

Sample request

In this example, rail, pse.bank, and inlineCustomer are included to preconfigure the checkout. You can omit any optional field depending on your flow. Only send pse when rail is PSE.

Sample response

Use GET /payment-links/{paymentLinkId} to retrieve the current state of a link at any time — for example, to check whether a link has expired or been completed before deciding to create a new one.