Skip to main content

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

  1. Initiation: Your server creates a payment via POST /v1/payments.
  2. Redirection: You receive a checkout_url. Redirect your customer to this URL.
  3. 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.
  4. Completion: Once the payment is processed, Fype redirects the customer back to your success_url or cancel_url.

Success & Cancel URLs

When creating a payment, you must provide success_url and cancel_url. Fype allows you to use placeholders in these URLs which will be dynamically replaced upon redirection.

Supported Placeholders

PlaceholderReplaced With
{CHECKOUT_SESSION_ID}The UUID of the checkout session.
{PAYMENT_ID}The UUID of the Fype payment record.
Example: If your 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

The checkout_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 a fype_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 succeeded and triggers a payment.succeeded webhook.
  • Simulate Failure: Transitions the payment to failed and triggers a payment.failed webhook.
This allows you to test your entire integration lifecycle without configuring a gateway or using real payment cards.