Learn when and how to use the Straddle-Account-Id header for API requests based on your platform type (Marketplace or SaaS) and the operation being performed.
Straddle-Account-Id
HTTP header. This header is crucial for correctly scoping API operations to specific embedded accounts that your platform manages.
This guide explains when to use, and when not to use, the Straddle-Account-Id
header, ensuring your integration is both functional and compliant.
Straddle-Account-Id
header is the mechanism you use to tell Straddle that a particular API request is being made on behalf of a specific embedded account. The value for this header should be the unique ID of the embedded account.
General Rule: No Header Used
General Rule: Header Used
Straddle-Account-Id
usage will apply consistently across your Straddle integration.Straddle-Account-Id:
NOT USED
Straddle-Account-Id:
NOT USEDStraddle-Account-Id:
IS USEDStraddle-Account-Id
header specifies which client account this new customer or paykey belongs to.Straddle-Account-Id:
ALWAYS USEDStraddle-Account-Id
header for all payment operations, Straddle ensures that:
Action / Resource | Platform Type | Header Used? | Why? |
---|---|---|---|
Create Account | All | No | Platform is administratively creating a managed account. |
Create Representative for an Account | All | No | Platform is administratively managing resources for its accounts. |
Create Linked Bank Account for an Account | All | No | Platform is administratively managing resources for its accounts. |
Create Customer | Marketplace | No | The customer is a direct user of the Marketplace platform. |
Create Customer | SaaS | Yes | The customer belongs to an embedded client account; the SaaS platform acts on behalf of that client account. |
Create Paykey (Bridge API) | Marketplace | No | The Paykey is for a direct customer of the Marketplace platform. |
Create Paykey (Bridge API) | SaaS | Yes | The Paykey is for a customer of an embedded client account; the SaaS platform acts on behalf of that client account. |
Create Charge (Payment) | All | Yes | All payments are actions of a specific embedded account. Header ensures correct attribution and compliance. |
Create Payout (Payment) | All | Yes | All payments are actions of a specific embedded account. Header ensures correct attribution and compliance. |
Straddle-Account-Id
header is associated with the correct client.{account_id}
in an API endpoint’s path (which usually identifies the resource being acted upon) and the Straddle-Account-Id
header (which identifies the acting embedded account, if the platform is acting on its behalf).401 Unauthorized
or 403 Forbidden
), or unintended operational consequences.Straddle-Account-Id
header is essential for platforms integrating with Straddle Embed. It allows for precise control over operations performed on behalf of your embedded accounts, ensures correct financial attribution, and helps maintain a compliant and secure environment. Always refer to the specific endpoint documentation and consider your platform model (Marketplace or SaaS) and the nature of the operation to determine the appropriate use of this header.