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.

API Reference

The Fype API is organized around REST. All requests should be made to https://api.fype.dev/v1.

Payments

Create a Payment

POST /payments Create a new payment and generate a hosted checkout URL. Request Body
FieldTypeRequiredDescription
amountintegerYesAmount in subunits (e.g., 50000 for ₹500.00). Min 100.
currencystringYes3-letter ISO currency code. Default INR.
customer_emailstringYesEmail address of the customer.
customer_phonestringNoPhone number of the customer.
customer_namestringNoFull name of the customer.
reference_idstringNoYour internal order/transaction ID.
success_urlstringYesURL to redirect to after successful payment. Supports {CHECKOUT_SESSION_ID} and {PAYMENT_ID} placeholders.
cancel_urlstringYesURL to redirect to if the customer cancels.
metadataobjectNoKey-value pairs for your own tracking.
Headers
  • Authorization: Bearer <API_KEY>
  • Idempotency-Key: <UNIQUE_STRING> (Optional but recommended)

Retrieve a Payment

GET /payments/{payment_id} Get the current status and details of a payment.

List Payments

GET /payments List all payments for your merchant account. Query Parameters
ParameterTypeDefaultDescription
limitinteger20Number of results to return.
cursorstringnullCursor for pagination.

Refunds

Create a Refund

POST /payments/{payment_id}/refund Initiate a full or partial refund for a successful payment. Request Body
FieldTypeRequiredDescription
amountintegerNoAmount to refund. If omitted, a full refund is processed.

Webhook Endpoints

Create Endpoint

POST /webhooks/endpoints Request Body
FieldTypeRequiredDescription
urlstringYesThe URL where Fype should send events.
modestringYestest or live.

List Endpoints

GET /webhooks/endpoints

Delete Endpoint

DELETE /webhooks/endpoints/{endpoint_id}