Redirect checkout
Redirect checkout overview
Accept payments through OmniPay's hosted checkout with bearer authentication.
Redirect checkout is the fastest way to accept a deposit with OmniPay. Your backend creates a deposit, your frontend sends the payer to the returned hosted checkout URL, and your backend confirms the final result through an authenticated status request or verified webhook.
It does not require H2H signing credentials or manual transaction-ID verification.
Integration sequence
- Create an API key in the OmniPay dashboard.
- Create a deposit from your backend with bearer authentication.
- Persist your
merchant_idand the returned OmniPay depositid. - Send the payer to the
redirect_urlreturned in the response. - Receive the payer on the return URL you supplied in the request.
- Show a processing state while your backend reads status or waits for a webhook.
- Fulfill only after the deposit status is
succeeded.
Your backend Your frontend Hosted checkout OmniPay
| | | |
|-- create deposit -------------------------------------------->|
|<---------------- deposit ID + redirect_url -------------------|
| | | |
| |-- redirect payer ---->| |
| |<-- return to your URL | |
| | | |
|-- read status / receive verified webhook -------------------->|API surface
| Operation | Endpoint | Authentication |
|---|---|---|
| Create deposit | POST /api/v1/deposits | Bearer API key |
| Read deposit | GET /api/v1/deposits/:id | Bearer API key |
| Receive events | Your webhook endpoint | Svix webhook signature |
Omit checkout_mode or send checkout_mode: "redirect". Both select redirect
checkout.
When to choose redirect checkout
Redirect checkout is a good fit when:
- you want the shortest path to production;
- a hosted payment experience is acceptable;
- you do not need to render payment instructions yourself;
- you want bearer-only API authentication.
If your application needs to handle a typed payment action and control more of the payer experience, compare H2H checkout.