Initialize a Payment
Send aPOST request to /payments/initialize from your server. Never call this endpoint from client-side code — your secret key must stay private.
Request
A successful response returns an
authorization_url that you use to redirect the customer:
Response
Redirect the Customer to Checkout
Redirect the customer’s browser to theauthorization_url from the response. The customer completes payment on the Paylink-hosted checkout page and is then sent back to your callback_url.
Example redirect (HTTP response header)
Use Sandbox Test Cards
Use the following cards on the sandbox checkout page to simulate different payment outcomes:Handle the Callback
When the customer returns to yourcallback_url, Paylink appends the reference as a query parameter:
Verify Payment Status
CallGET /payments/verify/{reference} from your server immediately after receiving the callback:
Request
Response
status is success.
Payment Statuses
Use Webhooks for Reliable Delivery
Callbacks depend on the customer’s browser returning to your site, which can fail if they close the tab or lose connectivity. Webhooks are server-to-server notifications sent directly to yourwebhook_url, making them the most reliable way to track payment outcomes.
Always set a webhook_url when you initialize a payment:
Webhook event payload (example)
View Transaction History
Retrieve a paginated list of all your transactions atGET /merchants/transactions. Use the query parameters below to filter results:
Example request
Payments API Reference
Full parameter list and response schema for the payments endpoints.
Webhooks Guide
Learn how to verify webhook signatures and handle events securely.