Link Search Menu Expand Document

Making API calls for connected accounts

Learn how to add the right information to your API calls so you can make calls for the partner and associated merchant accounts.

Almost every API call to Tilled requires the tilled-account header. For actions that are on behalf of your partner account, you must pass your own partner account ID. (Note: Account ID can be seen in the Tilled Console here (sandbox) or here (production)). Examples include:

  • Creating merchant accounts
  • Creating API keys
  • Creating webhook endpoints
  • Listing commission payouts

Most actions will be taken on behalf of a merchant account. Examples include:

  • Creating customers
  • Creating payment methods
  • Creating/confirming payment intents
  • Listing balance transactions

You can make API calls for your accounts server-side with the tilled-account header and the associated account ID, per request. You must also pass the tilled-api-key header.

For example, to list events of type=charge.succeeded for a given merchant account:

$ curl https://api.tilled.com/v1/events?types=charge.succeeded \
-H "tilled-api-key: {{SECRET_KEY}}" \
-H "tilled-account: {{MERCHANT_ACCOUNT_ID}}"

To list your merchant accounts, you would pass your own Tilled account ID

$ curl https://api.tilled.com/v1/accounts/connected \
-H "tilled-api-key: {{SECRET_KEY}}" \
-H "tilled-account: {{PARTNER_ACCOUNT_ID}}"

Copyright © 2022 Tilled