The Transfer Reversal object
Attributes
- id string Unique identifier for the object.
- amount integer Amount, in the smallest currency unit.
- currency enum Three-letter ISO currency code, in lowercase. Must be a supported currency.
- metadata nullable map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- transfer string Expandable ID of the transfer that was reversed.
More attributes
- object string, value is "transfer_reversal"
- balance _ transaction nullable string Expandable
- created timestamp
- destination _ payment _ refund nullable string Expandable
- source _ refund nullable string Expandable
The Transfer Reversal object
{ "id": "trr_1Mio2eLkdIwHu7ixN5LPJS4a", "object": "transfer_reversal", "amount": 400, "balance_transaction": "txn_1Mio2eLkdIwHu7ixosfrbjhW", "created": 1678147568, "currency": "usd", "destination_payment_refund": "pyr_1Mio2eQ9PRzxEwkZYewpaIFB", "metadata": {}, "source_refund": null, "transfer": "tr_1Mio2dLkdIwHu7ixsUuCxJpu"}
Create a transfer reversal
POST / v1 / transfers /:id / reversals
When you create a new reversal, you must specify a transfer to create it on.
When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed.
Once entirely reversed, a transfer can’t be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer.
Parameters
- amount integer A positive integer in the smallest currency unit representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount.
- description string An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value.
- metadata map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.
More parameters
- refund _ application _ fee boolean
Returns
Returns a transfer reversal object if the reversal succeeded. Raises an error if the transfer has already been reversed or an invalid transfer identifier was provided.
Response
{ "id": "trr_1Mio2eLkdIwHu7ixN5LPJS4a", "object": "transfer_reversal", "amount": 400, "balance_transaction": "txn_1Mio2eLkdIwHu7ixosfrbjhW", "created": 1678147568, "currency": "usd", "destination_payment_refund": "pyr_1Mio2eQ9PRzxEwkZYewpaIFB", "metadata": {}, "source_refund": null, "transfer": "tr_1Mio2dLkdIwHu7ixsUuCxJpu"}
Update a reversal
POST / v1 / transfers /:id / reversals /:id
Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
This request only accepts metadata and description as arguments.
Parameters
- metadata map Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.
Returns
Returns the reversal object if the update succeeded. This call will raise an error if update parameters are invalid.
Response
{ "id": "trr_1Mio2eLkdIwHu7ixN5LPJS4a", "object": "transfer_reversal", "amount": 400, "balance_transaction": "txn_1Mio2eLkdIwHu7ixosfrbjhW", "created": 1678147568, "currency": "usd", "destination_payment_refund": "pyr_1Mio2eQ9PRzxEwkZYewpaIFB", "metadata": { "order_id": "6735" }, "source_refund": null, "transfer": "tr_1Mio2dLkdIwHu7ixsUuCxJpu"}
