POST
/v1/test_helpers/treasury/outbound_payments/{id}/returnReturn a test-mode outbound payment
Triggers a test-mode OutboundPayment transition to the returned status. Supply the id of an OutboundPayment that is currently processing, and optionally provide a return code through returned_details.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
idstringrequired
The unique identifier of the test-mode OutboundPayment to transition.
Optional form data specifying the return reason and response fields to expand.
expandarray<string>optional
Specifies which fields in the response should be expanded.
returned_detailsobjectoptional
Optional hash to set the return code.
200Returns the updated OutboundPayment with its status set to returned and its return details.
amountintegerrequired
Amount (in cents) transferred.
cancelablebooleanrequired
Returns `true` if the object can be canceled, and `false` otherwise.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
currencystringrequired
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
customerstringoptional
ID of the [customer](https://docs.stripe.com/api/customers) to whom an OutboundPayment is sent.
descriptionstringoptional
An arbitrary string attached to the object. Often useful for displaying to users.
destination_payment_methodstringoptional
The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`.
destination_payment_method_detailsobjectoptional
Details about the PaymentMethod for an OutboundPayment.
end_user_detailsobjectoptional
Details about the end user.
expected_arrival_dateintegerrequired
The date when funds are expected to arrive in the destination account.
financial_accountstringrequired
The FinancialAccount that funds were pulled from.
hosted_regulatory_receipt_urlstringoptional
A [hosted transaction receipt](https://docs.stripe.com/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectrequired
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
returned_detailsobjectoptional
Details about a returned OutboundPayment. Only set when the status is `returned`.
statement_descriptorstringrequired
The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer).
statusstringrequired
Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`.
status_transitionsobjectrequired
tracking_detailsobjectoptional
Details about network-specific tracking information if available.
transactionstringrequired
The Transaction associated with this object.
defaultError response.
errorobjectrequired
Error handling
id must be a string no longer than 5000 characters and must identify a test-mode OutboundPayment in the processing state. If supplied, returned_details.code must be one of account_closed, account_frozen, bank_account_restricted, bank_ownership_changed, declined, incorrect_account_holder_name, invalid_account_number, invalid_currency, no_account, or other.