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.

Refunds

Fype allows you to issue full or partial refunds for any payment that has reached the succeeded status.

Initiating a Refund

You can initiate a refund through the Fype API or directly from the Dashboard.

Via Dashboard

  1. Go to the Payments section.
  2. Click on the successful payment you want to refund.
  3. Click the Refund button.
  4. Enter the amount to refund (defaults to the full amount).
  5. Confirm the refund.

Via API

POST /v1/payments/{payment_id}/refund
curl -X POST https://api.fype.dev/v1/payments/PAY_ID/refund \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25000
  }'

Refund Statuses

StatusDescription
pendingThe refund request has been sent to the gateway.
processedThe gateway has successfully processed the refund.
failedThe refund attempt was rejected by the gateway.

Refund Notifications

Fype will send webhooks for refund events:
  • refund.processed: When the refund is successful.
  • refund.failed: If the refund cannot be completed.

Limits and Constraints

  • Amount: You cannot refund more than the original amount of the payment.
  • Status: Only payments with a status of succeeded can be refunded.
  • Gateway Support: Refunds are processed by the underlying payment gateway. Fype propagates the request and normalizes the response.
  • Processing Time: While Fype processes the request instantly, it may take 5-7 business days for the funds to appear in the customer’s bank account, depending on the gateway and bank.