Uprails

Refunds

Return funds to your customers for completed payments.

Overview

The Refunds API allows you to return funds to customers for payments that have been successfully processed. You can create full or partial refunds, and track their status throughout the refund lifecycle.

Key concepts:

  • Refunds can only be created for payments with status succeeded
  • You can create multiple partial refunds up to the original payment amount
  • Refund processing time depends on the payment method and bank
  • Some payment methods don't support refunds (check processor documentation)

Refund Object

Refund Objectjson
{
  "refund_id": "ref_1234567890abcdef",
  "payment_id": "pay_abcdef1234567890",
  "merchant_id": "mer_xyz789",
  "status": "succeeded",
  "amount": 500,
  "currency": "USD",
  "reason": "requested_by_customer",
  "metadata": {
    "order_id": "12345",
    "reason_detail": "Product returned"
  },
  "created": "2024-01-15T14:30:00Z",
  "updated": "2024-01-15T14:30:05Z"
}

API Endpoints

Refund Status

A refund can have the following statuses:

StatusDescription
pendingRefund has been created and is being processed
succeededRefund was successful and funds have been returned
failedRefund failed (check error details)
cancelledRefund was cancelled before processing
manual_reviewRefund requires manual review

Refund Reasons

When creating a refund, you can specify a reason:

ReasonDescription
requested_by_customerCustomer requested the refund
duplicatePayment was made in error (duplicate)
fraudulentPayment was fraudulent
Processing Time
Refund processing time varies by payment method:
  • Card payments: 5-10 business days
  • Bank transfers: 3-5 business days
  • Digital wallets: 1-3 business days

Next Steps