Documentation Index
Fetch the complete documentation index at: https://docs-alpha.pepay.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This sets the merchant-level default return URL for hosted checkout. It is used when an invoice does not supply payment_return_url.
Authentication
Requires merchant auth:
x-api-key (server-to-server), or
Authorization: Bearer <jwt> (dashboard session)
Request
Get the default return URL
const current = await pepay.merchantSettings.getPaymentReturnUrl();
Update the default return URL
await pepay.merchantSettings.updatePaymentReturnUrl({
payment_return_url: 'https://merchant.example.com/checkout/complete'
});
Clear the default return URL
await pepay.merchantSettings.updatePaymentReturnUrl({
payment_return_url: null
});
Response
{
"payment_return_url": "https://merchant.example.com/checkout/complete",
"payment_return_url_enabled": true
}
Errors
400 invalid return URL (must be HTTPS)
401 missing/invalid dashboard bearer token
404 merchant not found
Examples
const current = await pepay.merchantSettings.getPaymentReturnUrl();
if (!current?.payment_return_url_enabled) {
await pepay.merchantSettings.updatePaymentReturnUrl({
payment_return_url: 'https://merchant.example.com/checkout/complete'
});
}
Next: Settlement