Skip to main content

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
Next: Settlement