Sample - Stripe API
POST/v1/test_helpers/treasury/received_credits

Test mode: Create a ReceivedCredit

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

7 body fields
amountintegerrequired
Amount (in cents) to be transferred.
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).
descriptionstringoptional
An arbitrary string attached to the object. Often useful for displaying to users.
expandarray<string>optional
Specifies which fields in the response should be expanded.
financial_accountstringrequired
The FinancialAccount to send funds to.
initiating_payment_method_detailsobjectoptional
Initiating payment method details for the object.
networkstringrequired
Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type.
Allowed:achus_domestic_wire

2 status codes
200Successful response.
amountintegerrequired
Amount (in cents) transferred.
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).
descriptionstringrequired
An arbitrary string attached to the object. Often useful for displaying to users.
failure_codestringoptional
Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.
Allowed:account_closedaccount_frozeninternational_transactionother
financial_accountstringoptional
The FinancialAccount that received the funds.
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.
initiating_payment_method_detailsobjectrequired
linked_flowsobjectrequired
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
networkstringrequired
The rails used to send the funds.
Allowed:achcardstripeus_domestic_wire
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:treasury.received_credit
reversal_detailsobjectoptional
Details describing when a ReceivedCredit may be reversed.
statusstringrequired
Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field.
Allowed:failedsucceeded
transactionstringoptional
The Transaction associated with this object.
defaultError response.
errorobjectrequired

Error handling

Any other status is an error: Error response.