Documentation Index
Fetch the complete documentation index at: https://docs.fype.dev/llms.txt
Use this file to discover all available pages before exploring further.
Checkout Implementation
Fype provides a managed, hosted checkout page that simplifies the payment process for both developers and customers.How it Works
- Initiation: Your server creates a payment via
POST /v1/payments. - Redirection: You receive a
checkout_url. Redirect your customer to this URL. - Interactions: On the checkout page, Fype handles:
- Displaying order details (Amount, Merchant Name).
- Providing the appropriate payment methods for the selected gateway.
- Handling the gateway’s client-side SDK (e.g., Razorpay Checkout).
- Managing 3D Secure / OTP redirects.
- Completion: Once the payment is processed, Fype redirects the customer back to your
success_urlorcancel_url.
Success & Cancel URLs
When creating a payment, you must providesuccess_url and cancel_url. Fype allows you to use placeholders in these URLs which will be dynamically replaced upon redirection.
Supported Placeholders
| Placeholder | Replaced With |
|---|---|
{CHECKOUT_SESSION_ID} | The UUID of the checkout session. |
{PAYMENT_ID} | The UUID of the Fype payment record. |
success_url is https://example.com/thanks?order={PAYMENT_ID}, the customer will be redirected to:
https://example.com/thanks?order=550e8400-e29b-41d4-a716-446655440000
Customizing the Checkout Experience
Fype is designed for zero-configuration checkout. The merchant name and logo (if configured) are automatically pulled from your account settings.Security
Thecheckout_url is a public URL. However, the data returned by the checkout session endpoint is strictly limited to public identifiers (like your Gateway Public Key ID and Order Reference). Sensitive data like your Gateway Secret Key never leaves Fype’s backend.
The Simulator (Test Mode)
When using afype_test_ key, the checkout page enters Simulator Mode. Instead of loading a real gateway, it displays two buttons:
- Simulate Success: Instantly transitions the payment to
succeededand triggers apayment.succeededwebhook. - Simulate Failure: Transitions the payment to
failedand triggers apayment.failedwebhook.