You can reverse some ReceivedDebits depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal.

Attributes

  • idstring

    Unique identifier for the object.

  • objectstring

    String representing the object’s type. Objects of the same type share the same value.

  • amountinteger

    Amount (in cents) transferred.

  • createdtimestamp

    Time at which the object was created. Measured in seconds since the Unix epoch.

  • currencyenum

    Three-letter ISO currency code, in lowercase. Must be a supported currency.

  • financial_accountnullable string

    The FinancialAccount to reverse funds from.

  • hosted_regulatory_receipt_urlnullable string

    A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe’s money transmission licenses.

  • linked_flowsnullable object

    Other flows linked to a DebitReversal.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • metadataobject

    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.

  • networkenum

    The rails used to reverse the funds.

  • received_debitstring

    The ReceivedDebit being reversed.

  • statusenum

    Status of the DebitReversal

    Possible enum values
    failed

    The network has resolved the DebitReversal against the user.

    processing

    The DebitReversal starting state.

    succeeded

    The network has resolved the DebitReversal in the users favour. A crediting Transaction is created.

  • status_transitionsobject

    Hash containing timestamps of when the object transitioned to a particular status.

  • transactionnullable stringExpandable

    The Transaction associated with this object.

The DebitReversal object
{
"id": "debrev_1MtkMLLkdIwHu7ixIcVctOKK",
"object": "treasury.debit_reversal",
"amount": 1000,
"created": 1680755021,
"currency": "usd",
"financial_account": "fa_1MtkMLLkdIwHu7ixrkGP4bqB",
"hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xTTJKVGtMa2RJd0h1N2l4KM6SuaEGMgaqNYp8YbE6NpNWYhI1PSbr_jlZwdPHUJHYBRG6-5T1Bmpq4GkpUhVvzLMDWZWkMVIveXHgiVwLUgpMM4Jx8w",
"linked_flows": null,
"livemode": false,
"metadata": {},
"network": "ach",
"received_debit": "rd_1MtkMLLkdIwHu7ixoiUFN4qd",
"status": "processing",
"status_transitions": {
"completed_at": null
},
"transaction": "trxn_1MtkMLLkdIwHu7ix2BG3LwWW"
}

Reverses a ReceivedDebit and creates a DebitReversal object.

Parameters

  • received_debitstringRequired

    The ReceivedDebit to reverse.

  • metadataobject

    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 a DebitReversal object.

POST /v1/treasury/debit_reversals
curl https://api.stripe.com/v1/treasury/debit_reversals \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d received_debit=rd_1MtkMLLkdIwHu7ixoiUFN4qd
Response
{
"id": "debrev_1MtkMLLkdIwHu7ixIcVctOKK",
"object": "treasury.debit_reversal",
"amount": 1000,
"created": 1680755021,
"currency": "usd",
"financial_account": "fa_1MtkMLLkdIwHu7ixrkGP4bqB",
"hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xTTJKVGtMa2RJd0h1N2l4KM6SuaEGMgaqNYp8YbE6NpNWYhI1PSbr_jlZwdPHUJHYBRG6-5T1Bmpq4GkpUhVvzLMDWZWkMVIveXHgiVwLUgpMM4Jx8w",
"linked_flows": null,
"livemode": false,
"metadata": {},
"network": "ach",
"received_debit": "rd_1MtkMLLkdIwHu7ixoiUFN4qd",
"status": "processing",
"status_transitions": {
"completed_at": null
},
"transaction": "trxn_1MtkMLLkdIwHu7ix2BG3LwWW"
}

Retrieves a DebitReversal object.

Parameters

No parameters.

Returns

Returns a DebitReversal object.

GET /v1/treasury/debit_reversals/:id
curl https://api.stripe.com/v1/treasury/debit_reversals/debrev_1MtkMLLkdIwHu7ixIcVctOKK \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "debrev_1MtkMLLkdIwHu7ixIcVctOKK",
"object": "treasury.debit_reversal",
"amount": 1000,
"created": 1680755021,
"currency": "usd",
"financial_account": "fa_1MtkMLLkdIwHu7ixrkGP4bqB",
"hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xTTJKVGtMa2RJd0h1N2l4KM6SuaEGMgaqNYp8YbE6NpNWYhI1PSbr_jlZwdPHUJHYBRG6-5T1Bmpq4GkpUhVvzLMDWZWkMVIveXHgiVwLUgpMM4Jx8w",
"linked_flows": null,
"livemode": false,
"metadata": {},
"network": "ach",
"received_debit": "rd_1MtkMLLkdIwHu7ixoiUFN4qd",
"status": "processing",
"status_transitions": {
"completed_at": null
},
"transaction": "trxn_1MtkMLLkdIwHu7ix2BG3LwWW"
}

Returns a list of DebitReversals.

Parameters

  • financial_accountstringRequired

    Returns objects associated with this FinancialAccount.

  • received_debitstring

    Only return DebitReversals for the ReceivedDebit ID.

  • resolutionenum

    Only return DebitReversals for a given resolution.

    Possible enum values
    lost

    DebitReversal was lost, and no Transactions will be created.

    won

    DebitReversal was won, and a crediting Transaction will be created.

  • statusenum

    Only return DebitReversals for a given status.

    Possible enum values
    canceled

    The DebitReversal has been canceled before it has been sent to the network and no funds have been returned to the account. (Currently not supported).

    completed

    The network has provided a resolution for the DebitReversal. If won, a crediting Transaction is created.

    processing

    The DebitReversal starting state.

More parameters

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A dictionary with a data property that contains an array of up to limit DebitReversals, starting after DebitReversal starting_after. Each entry in the array is a separate DebitReversal object. If no more DebitReversals are available, the resulting array will be empty.

GET /v1/treasury/debit_reversals
curl -G https://api.stripe.com/v1/treasury/debit_reversals \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d financial_account=fa_1MtkMLLkdIwHu7ixrkGP4bqB \
-d limit=3
Response
{
"object": "list",
"url": "/v1/treasury/debit_reversals",
"has_more": false,
"data": [
{
"id": "debrev_1MtkMLLkdIwHu7ixIcVctOKK",
"object": "treasury.debit_reversal",
"amount": 1000,
"created": 1680755021,
"currency": "usd",
"financial_account": "fa_1MtkMLLkdIwHu7ixrkGP4bqB",
"hosted_regulatory_receipt_url": "https://payments.stripe.com/regulatory-receipt/CBQaFwoVYWNjdF8xTTJKVGtMa2RJd0h1N2l4KM6SuaEGMgaqNYp8YbE6NpNWYhI1PSbr_jlZwdPHUJHYBRG6-5T1Bmpq4GkpUhVvzLMDWZWkMVIveXHgiVwLUgpMM4Jx8w",
"linked_flows": null,
"livemode": false,
"metadata": {},
"network": "ach",
"received_debit": "rd_1MtkMLLkdIwHu7ixoiUFN4qd",
"status": "processing",
"status_transitions": {
"completed_at": null
},
"transaction": "trxn_1MtkMLLkdIwHu7ix2BG3LwWW"
}
]
}