Environments
Base URLs
Section titled “Base URLs”| Environment | API Base URL |
|---|---|
| Live (prod) | https://api.lydiagate.com |
| Test | provided at onboarding |
API prefix
Section titled “API prefix”All endpoints are versioned with the /v1 prefix. Example full address:
https://api.lydiagate.com/v1/paymentsThe API surface (api.lydiagate.com) is for server-to-server calls (with the API key). Lydia Gate 3DS Relay, which the buyer’s browser/WebView talks to, is a separate origin (pay.*), described below.
Lydia Gate 3DS Relay and return
Section titled “Lydia Gate 3DS Relay and return”You collect the card on your own checkout, then redirect the buyer to Lydia Gate 3DS Relay. The POST /v1/payments request body contains no card, and its response returns a handoffUrl: this is the Lydia Gate 3DS Relay address (the pay.* origin) you redirect the buyer’s browser/WebView to, with the card + paymentRef. Use the handoffUrl as-is from the response; do not assume a fixed value. The bank’s 3D Secure relay runs on that surface.
After 3D completes, Lydia Gate 3DS Relay redirects the buyer’s browser/WebView to the returnUrl you supplied in the POST /v1/payments request via 303. The result carried over the returnUrl is not authoritative; always obtain the definitive result via GET /v1/payments and webhook.
There is no difference on Lydia Gate’s side between web and mobile (web: native browser 303; mobile: the WebView lands on the same 303); on mobile deep links are not used. Detail: Card Handoff.
The payment’s window to complete 3D is 30 minutes; if it is not completed within that time, the payment moves to expired.
Next step
Section titled “Next step”- Quickstart: create your first payment
- Test Cards: the cards and scenarios to use in the test environment