Skip to main content

The API surface

Four endpoints, all under /merchant/dropInLinks. There is no update endpoint. Links cannot be edited after creation—to change any field, delete the link and create a new one.

Request fields

description is displayed on the payment page, so anyone with the link can read it. Never put personal data, account numbers, or internal identifiers there. Use merchantReference for internal identifiers.

Response codes

Every endpoint returns the same shape.
The API returns amount and paidAmount, but no remaining balance. See Payment modes for how to calculate it.
Store dropInLinkUrl and merchantReference on your side. You will need both to reconcile.

Verify end to end in test

Run the full loop once before going live.
  1. Create the link using the request above against your test credentials. See Set up your Payrails account and environment if you have not configured test credentials yet.
  2. Open the returned dropInLinkUrl in a browser and confirm the amount, the description, and your branding all render correctly
  3. Submit a test payment. This creates the execution on first use. The payment is linked to that execution, and after a successful single payment, the link status changes to closed.
  4. Confirm the webhook arrived. Check that the event reached your endpoint, that merchantReference matches, and that your system updated only after processing it.
If the webhook does not arrive, stop and fix the issue before going live. A link can look fine to your customer even when your records are not being updated.
Returns a paginated list. Useful for reconciliation sweeps and for building your own internal views.

Filters

Pagination

Cursor-based, using page[after], page[before], and page[size]. The response includes a links object with self, prev, next, first, and last, and a results array of link objects. Follow links.next rather than incrementing offsets.
Returns the current state of a single link. Read-only. Use it to check status and paid amount, or to recover after a missed webhook. Do not poll it as your primary state mechanism.
Marks the link as deleted and returns the updated link object with status set to deleted. This is a soft delete. The record remains readable, payments already completed are unaffected, and no new payment can be started. It cannot be undone.

Create in the Portal

Payrails Portal Operations page showing the Create test payment link action
  1. In the Portal, go to Operations → Payment Links
  2. Select Create test payment link
  3. Copy or open the generated URL
The Portal action uses predefined values. For control over metadata and payment mode, use the API.

Next steps

Last modified on September 28, 2026