Public preview
Build an integration with Treasury for platforms Public preview
Set up an end-to-end integration with Treasury for platforms and familiarize yourself with its basic concepts.
As a platform using Connect, you can use Stripe Treasury for platforms to embed financial services in your product. Use this guide to learn basic concepts and endpoints to implement Treasury for platforms.
Create a connected account
Begin in a sandbox with access to Treasury for platforms and create a v2 connected account that you use to request capabilities to:
- Create financial accounts that can hold funds ( money _ manager configuration)
- Create a financial address to fund the financial account ( money _ manager configuration)
- Receive funds transfers (v1 transfers) from platform accounts ( recipient configuration)
- Process card payments ( merchant configuration)
To enable Treasury for platforms for a v1 Account, you can specify a v1 Account in a v2 endpoint.
The account must not use a Stripe-hosted dashboard and you must be responsible for requirements collection.
Command Line
cURL
The response includes the connected account ID.
{
"id": "acct_123",
"object": "v2.core.account",
"applied_configurations": [
"merchant",
"money_manager"
],
"configuration": {
"customer": null,
"merchant": null,
"recipient": null,
"money_manager": {
"capabilities": {
"received_credits": {
"bank_accounts": {
"requested": true,
"status": "restricted",
"status_details": [
{
"code": "requirements_past_due",
"resolution": "provide_info"
}
]
}
},
Onboard the connected account
After you create an account, onboard its seller or service provider by:
- Retrieving the requirements populated at account creation.
- Providing a form to collect the information required from your connected account.
- Updating the Account with the collected information.
Alternatively, you can create an account link specifying the type as the merchant and money_manager configurations, then send the returned URL to your connected account so they can provide the required information in a Stripe-hosted interface.
Create a financial account and financial address
Treasury for platforms uses FinancialAccount objects to store funds, manage your money, and use Stripe services for making payments or receiving money. The Stripe-Context header is {{the related setting}}. See Stripe-Context header for more information on API request contexts. You can use the FinancialAccount API to create a Financial Account.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
The response includes the ID of the financial account.
{
"id": "fa_test_123",
"object": "v2.money_management.financial_account",
// The available balance shows money that can be used.
"balance": {
"available": {
"usd": {
"value": 7800,
"currency": "usd"
}
},
"inbound_pending": {
"usd": {
"value": 0,
"currency": "usd"
}
},
"outbound_pending": {
"usd": {
"value": 0,
"currency": "usd"
}
}
},
"country": "US",
Create a financial address when you need to receive funds into a financial account or enable outbound payments to third parties. Specify the type corresponding to the country of the financial account to make sure we provision the correct address credentials (such as a US routing number, British sort code, or EU the related setting).
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
If successful, the response provides the ID for the financial address, along with the relevant credentials for the jurisdiction.
{
"id": "{{FINANCIAL_ADDRESS_ID}}",
"object": "v2.money_management.financial_address",
"credentials": {
"type": "us_bank_account",
"us_bank_account": {
"account_number": "123456890",
"routing_number": "110000000",
"bic": "TSTEZ122",
"bank_name": "STRIPE TEST BANK",
"last4": "6890"
}
},
"status": "active",
"financial_account": "fa_6504m3x1JLdhVIIIT1A16O0lef0dSQgZ0EhGyZsQCXQ28m",
"created": "2023-03-30T17:32:06.665Z",
"currency": "usd"
}
After you create a financial address, it starts in a pending status while Stripe provisions the bank details. When the status becomes active, you can retrieve the credentials (bank details) and share them to receive funds. You can monitor incoming funds using received credits.
Fund the financial account
Simulate receiving funds through the financial address using the test helper in a sandbox instead of funding in live mode using an external bank account.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
The response indicates if the simulation was successful:
{
"object": "financial_address_credit_simulation",
"status": "accepted",
"livemode": false
}
This creates a ReceivedCredit object, which represents incoming money movements into a financial account. Use the Retrieve Financial Account endpoint to verify that funds have landed in the financial account.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
The response includes different types of balances. The available balance shows the 250 USD you added to the 78 USD that was in the account previously.
{
"id": "{{FINANCIAL_ACCOUNT_ID}}",
"object": "v2.money_management.financial_account",
"balance": {
"available": {
"usd": {
"value": 32800,
"currency": "usd"
}
},
"inbound_pending": {
"usd": {
"value": 0,
"currency": "usd"
}
},
"outbound_pending": {
"usd": {
"value": 0,
"currency": "usd"
}
}
},
"country": "US",
"created": "2025-06-11T13:01:21.289Z",
Create a recipient
To make an outbound payment to a third party from a connected account, create a recipient-configured v2 Account.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
The response includes the recipient account ID and requested capabilities.
{
"id": "acct_6789",
"object": "v2.core.account",
"applied_configurations": [
"recipient"
],
"configuration": {
"customer": null,
"merchant": null,
"recipient": {
"capabilities": {
"bank_accounts": {
"local": {
"requested": true,
"status": "active",
"status_details": []
},
"wire": null
},
"cards": null,
"stripe_balance": null
},
"default_outbound_destination": null
},
...
Onboard the recipient
Onboard a recipient-configured account in the same way you onboard connected accounts with other types of configurations.
Create a payout method
Create a payout method for the recipient using an OutboundSetupIntent. Include both the connected account and recipient in the Stripe-Context header to identify that you’re making a request on behalf of your connected account for its recipient account: ``
{{the related setting}}
/ {{the related setting}} .
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
The response includes the payout method ID:
Example response
{
"id": "osi_test_64SITWA7KhLsQIGAK16QsOpAPpE97EJALhqt1U5mC4kq",
"object": "v2.money_management.outbound_setup_intent",
"created": "2025-06-19T17:52:34.829Z",
"payout_method": {
"id": "{{RECIPIENT_PAYOUT_METHOD_ID}}",
"object": "v2.money_management.payout_method"
},
"status": "succeeded",
"usage_intent": "payment",
"livemode": false
}
Pay the recipient
Onboarding a recipient-configured connected account attaches a PayoutMethod to their account that represents their banking account and allows you to make recurring payouts. Retrieve the recipient’s payout method to use the ID in your payout.
The Stripe-Context header in this request is the path ``
{{the related setting}}
/ {{the related setting}} .
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
Create an Outbound Payment to move the money from your financial account to the recipient’s payout method banking account.
Command Line
Select a language
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
The response includes the outbound payment ID and transaction details.
{
"id": "obp_test_65SlAavriewxesYj6PN16SiAU68AE9NQclWBzpoRJEmCR6",
"object": "v2.money_management.outbound_payment",
"amount": {
"value": 1000,
"currency": "usd"
},
"cancelable": false,
"created": "2025-06-19T17:52:34.829Z",
"delivery_options": null,
"description": "Payout from a platform financial account to connected account financial account",
"expected_arrival_date": "2025-06-19T17:52:34.803Z",
"from": {
"debited": {
"value": 1000,
"currency": "usd"
},
"financial_account": "{{FINANCIAL_ACCOUNT_ID}}"
},
"metadata": {},
"receipt_url": "https://payments.stripe.com/transaction_receipt/…",
"recipient_notification": {
"setting": "configured"
},
"statement_descriptor": "Treasury Sandbox",
Learn more about outbound payments.
Webhooks
Listen for and handle v2.money_management events related to financial account activity.
