/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
- Send a
POSTrequest to/payment-linkswith the amount, your internal reference, acallbackUrl, and any optional defaults for the checkout flow. - HelloPay returns a
paymentLinkUrl— the full URL to redirect the payer to. - Redirect the payer to the
paymentLinkUrl. - The payer selects their preferred payment method and completes the flow on the HelloPay-hosted page.
- HelloPay fires a webhook event when the payment link is completed or expires.
- Once the flow ends (whether successful or not), the payer is redirected to the
callbackUrlyou provided.
Redirecting the payer
ThepaymentLinkUrl in the response is the full URL of the hosted payment page. Redirect the payer to this URL as soon as you receive it.
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:
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:Sample paymentlink.completed payload
Sample paymentlink.expired payload
Correlating a webhook event to a payment link
Each webhook event payload includes adata object with the payment link details. Use either of these two fields to identify which payment link the event belongs to:
data.reference— matches thereferenceyou passed when creating the payment link.data.paymentLinkId— matches thepaymentLinkIdreturned 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 thecallbackUrl 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
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
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.
