Redirect Checkout
Redirect mode is the simplest integration: create a Checkout Session server-side, then redirect the buyer to the Sangho session URL. Sangho handles the entire payment page.
Complete flow
- 1. Server: Create a Checkout Session with
success_url,currency, andline_items - 2. Server: Return the session URL to the client
- 3. Client: Redirect to session.url
- 4. Buyer: Pay on the Sangho-hosted page
- 5. Sangho: Redirect to
success_urlafter payment - 6. Server: Listen for the
checkout.session.completedevent via webhook
Advantages
- No complex frontend code
- Responsive and secure payment page maintained by Sangho
- Automatic support for all enabled payment methods
- 3D Secure handled automatically for cards
- PCI-DSS compliant with no effort
Note
Redirect mode is recommended for the majority of e-commerce integrations. Use Embedded mode only if you need full control over the UX.