Skip to main content
You always need one session to create a payment link. You need a second session only if you want Meridian to send the buyer back to your site after paying. Both come from Create a Session, and the fields you send decide what each one can do.
Without a redirect, skip step 3 and send the buyer to the link URL with no sessionKey. The payment page creates its own 15-minute session.
Make every call from your backend, signed as described in Authentication.

Why two sessions

You put the buyer session key in the URL you send the buyer to. That puts it in the buyer’s browser, so Meridian limits what it can do:
  • It pays one link only. The session is tied to the paymentLinkId you set. It cannot create payment links or pay a different link.
  • It expires after 15 minutes. The buyer must pay within that time. A copied or leaked key stops working soon after.
The creation session stays on your backend, so it is the only one that can create links. This is also why redirectUrl cannot go on the creation session. redirectUrl requires paymentLinkId, and the link does not exist until you create it.
1

Create a session

Call Create a Session with your operator details only.
The key lasts 15 minutes. You can create more than one link with it before it expires.
2

Create the link

Call Create a Payment Link with the creation session’s sessionKey in the body.
Store the link’s id and linkToken. You need both in the next steps.
Create a Payment Link does not take redirectUrl. You set it on the buyer session in the next step.
3

Create a buyer session (optional)

Skip this step if you do not need a redirect.When the buyer clicks Pay on your site, call Create a Session again. Set paymentLinkId to the link’s id, and redirectUrl to the page the buyer returns to.
redirectUrl must be an https URL of at most 2048 characters. It is optional.Meridian checks paymentLinkId only when the buyer opens the payment page. A wrong or inactive link ID still returns 201, and the payment page then rejects the session.Create the buyer session at the moment the buyer clicks Pay, not when you create the link. The 15 minutes start when you create the session.
4

Send the buyer to pay

Build the payment URL from your payment domain and the link’s linkToken. Your Solutions Engineer gives you the payment domain for Sandbox and production.
5

Confirm the payment

The redirect does not mean the payment completed. Wait for the payment_link_transaction_succeeded webhook before you mark the order paid. See Track payments.

Session expiry

If the buyer does not pay within 15 minutes of you creating the buyer session, the payment page rejects it. The payment link is not affected. When the buyer clicks Pay again, create a new buyer session for the same link and send them to the new URL.