v1

latestOpenAPI 3.1.02026-07-2469193340.0 KB
Refunds (Beta)

create refund

post/payto/refunds

Request body

uidstring required

Supplied unique identifier for refund, maximum 64 characters containing only unreserved characters as defined in RFC3986. This identifier ensures refund uniqueness between integrator systems and Zepto.

original_payment_uidstring required

The supplied UID related to the PayTo Payment to be refunded

metadataPaytoMetadata nullable

Use for your custom data. A place to store any miscellaneous information your system may need in regards to the record you are creating. This will be included in associated webhook payloads under the resource_metadata key. Nested values (i.e., objects and arrays) are not allowed. The maximum size of this parameter is 2kb.

Example request

{
  "uid": "biz_refund_20221231_G7MQWwkQZIP8vbfH",
  "original_payment_uid": "Payment_00012345",
  "refund_payment": {
    "amount": 2495,
    "description": "REFUND: 1 of 6 for Zeptinghouse Smart Fridge 300L"
  },
  "metadata": {
    "custom_key": "custom_value"
  }
}

Response

successful

Example response

{
  "data": {
    "uid": "biz_refund_20221231_G7MQWwkQZIP8vbfH",
    "original_payment_uid": "Payment_00012345",
    "refund_payment": {
      "amount": 2495,
      "description": "REFUND: 1 of 6 for Zeptinghouse Smart Fridge 300L"
    },
    "metadata": {
      "custom_key": "custom_value"
    },
    "failure": {
      "title": "The provided fund source has insufficient funds",
      "detail": "The provided fund source has insufficient funds to process this refund",
      "code": "ZPREF07"
    },
    "links": {
      "self": "https://api.zeptopayments.com/payto/refunds/biz_refund_G7MQWwkQZIP8vbfH",
      "original_payment": "https://api.zeptopayments.com/payto/payments/biz_payment_G7MQWwkQZIP8vbfH"
    }
  }
}