When you refund a payment, a refund object is created. You can retrieve information about the refunds you've issued.
Issue a refund for a payment. You may refund the full payment amount or just a portion. When refunding a portion, multiple refunds are supported up until the full payment amount has been refunded.
Note: For platforms, if the seller account status is not enabled
, 400
will be returned.
Idempotency-Key required | string <uuid> a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests Example: my-request-123abc |
Authorization required | string the Example: Bearer {access_token} |
Refund was created successfully
{- "amount": 10000,
- "description": "string",
- "reason": "duplicate",
- "metadata": { }
}
{- "id": 1,
- "type": "refund",
- "data": {
- "id": "re_xyz",
- "payment_id": "py_xyz",
- "amount": 100,
- "description": "customer canceled their order",
- "reason": "duplicate",
- "status": "succeeded",
- "metadata": { },
- "created_at": "2021-01-01T12:00:00Z",
- "updated_at": "2021-01-01T12:00:00Z"
}, - "page_info": "string"
}
List the refunds for your account. This endpoint supports pagination.
Authorization required | string the Example: Bearer {access_token} |
Sub-Account | string for platforms, the id of the sub account that this request applies to Example: acc_2IdMEOjIG6lJAncakgdBF2 |
Seller-Account | string Deprecated for platforms, the id of the seller account that this request applies to |
Successfully list refunds
{- "id": 1,
- "type": "array",
- "data": [
- {
- "id": "re_xyz",
- "payment_id": "py_xyz",
- "amount": 100,
- "description": "customer canceled their order",
- "reason": "duplicate",
- "status": "succeeded",
- "metadata": { },
- "created_at": "2021-01-01T12:00:00Z",
- "updated_at": "2021-01-01T12:00:00Z"
}
], - "page_info": {
- "end_cursor": "WyIyMDIyLTAyLTA4IDE5OjUyOjM3LjEwNDE3MzAwMCIsIjY4MDliYTU5LTYxYjctNDg3MS05YWFiLWE2Y2MyNmY3M2M1ZCJd",
- "has_next": false,
- "has_previous": false,
- "start_cursor": "WyIyMDIyLTAyLTA4IDIwOjAxOjU4LjEyMDIzMjAwMCIsIjU5ZTFjNGI1LWFlOWQtNDIyZC04MTVkLWNjNzQ5NzdlYmFjYSJd"
}
}
{- "id": 1,
- "type": "refund",
- "data": {
- "id": "re_xyz",
- "payment_id": "py_xyz",
- "amount": 100,
- "description": "customer canceled their order",
- "reason": "duplicate",
- "status": "succeeded",
- "metadata": { },
- "created_at": "2021-01-01T12:00:00Z",
- "updated_at": "2021-01-01T12:00:00Z"
}, - "page_info": "string"
}
Update the refund metadata.
Idempotency-Key required | string <uuid> a string to identify your request (we recommend using a generated uuid, but you may use any unique string) see Idempotent Requests Example: my-request-123abc |
Authorization required | string the Example: Bearer {access_token} |
Refund update was successful
{- "metadata": { }
}
{- "id": 1,
- "type": "refund",
- "data": {
- "id": "re_xyz",
- "payment_id": "py_xyz",
- "amount": 100,
- "description": "customer canceled their order",
- "reason": "duplicate",
- "status": "succeeded",
- "metadata": { },
- "created_at": "2021-01-01T12:00:00Z",
- "updated_at": "2021-01-01T12:00:00Z"
}, - "page_info": "string"
}