Download OpenAPI specification:Download
**This API is currently in preview.**
This API allows you to onboard your business customers to your own product and to the Two "Buy Now Pay Later" product.
Specifically:
Trade Account API v3 supports flexible identification of resources, allowing you to use either your own internal identifiers or our system-generated identifiers in path segments.
When you provide an ID in a path parameter (e.g.,
If the ID begins with two_: We interpret this as an identifier generated by our system. You would typically use this when referencing resources that you've previously created or retrieved from our API.
Example: GET /trade-account/v3/customer/two_XYZ789 If the ID does NOT begin with two_: We interpret this as your own internal identifier for the resource. This allows you to integrate seamlessly with your existing data structures.
Example: GET /trade-account/v3/customer/yourInternalID123
To ensure unambiguous resolution, it is CRITICAL that any customer or entity identifiers you use and pass directly to our API (i.e., those without the two_ prefix) DO NOT begin with the string two_. This prefix is strictly reserved for identifiers originating from our platform. Please ensure your internal ID generation logic adheres to this constraint.
POST /trade-account/v3/customer
endpoint.The employees who place orders on behalf of your trade account customer (their employer), can be set up for purchasing through POST /trade_account/v3/customer/<cid>/user
.
Upon successfully creating a user for a customer, onboarding is completed. To verify the user generate the verification link using POST /trade_account/v3/user/<uid>/verification/url
. Verification of the customer user will allow one-click purchases for the customer user.
Note: Two reserves the right to add extra verification steps for certain orders.
Idempotency-Key (string) or Idempotency-Key (null) (Idempotency-Key) Default: null |
Created
Customer company not found
Customer already exists
Error response
{- "canonical_id": null,
- "country_code": null,
- "organization_number": null,
- "merchant_customer_id": "string",
- "contact_persons": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "email": "johndoe0112358@gmail.com"
}
], - "trade_name": null
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "merchant_customer_id": "string",
- "contact_persons": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "email": "johndoe0112358@gmail.com"
}
], - "trade_name": null,
- "company": null
}
OK
Customer not found
Error response
{- "merchant_customer_id": "string",
- "contact_persons": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "email": "johndoe0112358@gmail.com"
}
], - "trade_name": null
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "merchant_customer_id": "string",
- "contact_persons": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "email": "johndoe0112358@gmail.com"
}
], - "trade_name": null,
- "company": null
}
OK
Customer not found
Error response
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "merchant_customer_id": "string",
- "contact_persons": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "email": "johndoe0112358@gmail.com"
}
], - "trade_name": null,
- "company": null
}
Idempotency-Key (string) or Idempotency-Key (null) (Idempotency-Key) Default: null |
Created
Customer not found
User already exists
Error response
{- "merchant_user_id": "string",
- "email": "johndoe0112358@gmail.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX"
}
{- "merchant_user_id": "string",
- "email": "johndoe0112358@gmail.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "verified": true
}
Fetch a list of users attached to the business customer account
OK
Customer not found
Error response
[- {
- "merchant_user_id": "string",
- "email": "johndoe0112358@gmail.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "verified": true
}
]
Created
User not found
Error response
{- "return_url": "string"
}
{- "redirect_url": "string"
}
Idempotency-Key (string) or Idempotency-Key (null) (Idempotency-Key) Default: null |
Email (string) or Email (null) (Email) Default: null User email address | |
First Name (string) or First Name (null) (First Name) Default: null User first name | |
Last Name (string) or Last Name (null) (Last Name) Default: null User last name | |
Merchant User Id (string) or Merchant User Id (null) (Merchant User Id) Default: null | |
Phone Number (string) or Phone Number (null) (Phone Number) Default: null User phone number |
OK
User not found
Error response
{- "merchant_user_id": null,
- "email": "johndoe0112358@gmail.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX"
}
{- "merchant_user_id": "string",
- "email": "johndoe0112358@gmail.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "verified": true
}
No Content
User not found
Error response
{- "error_code": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
OK
User not found
Error response
{- "merchant_user_id": "string",
- "email": "johndoe0112358@gmail.com",
- "first_name": "John",
- "last_name": "Doe",
- "phone_number": "+44XXXXXXXXXX",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "verified": true
}
OK
Customer not found
Error response
{- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "SEPA_DIRECT_DEBIT",
- "status": "AUTHORIZATION_PENDING",
- "is_default": true,
- "created_at": "2025-04-01T10:30:00Z",
- "authorized_at": "2025-04-01T11:05:00Z",
- "metadata": {
- "description": "Company main account",
- "internal_id": "pm123"
}, - "display_details": null,
- "mandate_reference": "MANDATE-123-456"
}
]
}
Idempotency-Key (string) or Idempotency-Key (null) (Idempotency-Key) Default: null |
required | object (MandateAcceptanceData) Audit data of the acceptance of the mandate by the customer |
Mandate Reference (string) or Mandate Reference (null) (Mandate Reference) Default: null | |
Metadata (object) or Metadata (null) (Metadata) Default: null | |
required | SEPADirectDebit (object) or ACHDirectDebit (object) or BACSDirectDebit (object) (PaymentMethod) |
Set As Default (boolean) or Set As Default (null) (Set As Default) Default: false |
Created
Customer not found
Error response
{- "set_as_default": true,
- "metadata": null,
- "payment_details": {
- "type": "SEPA_DIRECT_DEBIT",
- "account_holder_name": "Acme Corporation Ltd",
- "contact_email": "user@example.com",
- "contact_full_name": "John Doe",
- "iban": "DE89370400440532013000",
- "language": "en",
- "billing_address": null
}, - "mandate_reference": "AWS-MANDATE-123",
- "mandate_acceptance": {
- "accepted_at": "2025-04-01T10:30:00Z",
- "user_agent": "string",
- "ip_address": "string"
}
}
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "SEPA_DIRECT_DEBIT",
- "status": "AUTHORIZATION_PENDING",
- "is_default": true,
- "created_at": "2025-04-01T10:30:00Z",
- "authorized_at": "2025-04-01T11:05:00Z",
- "metadata": {
- "description": "Company main account",
- "internal_id": "pm123"
}, - "display_details": null,
- "mandate_reference": "MANDATE-123-456"
}
OK
Customer or payment method not found
Error response
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "SEPA_DIRECT_DEBIT",
- "status": "AUTHORIZATION_PENDING",
- "is_default": true,
- "created_at": "2025-04-01T10:30:00Z",
- "authorized_at": "2025-04-01T11:05:00Z",
- "metadata": {
- "description": "Company main account",
- "internal_id": "pm123"
}, - "display_details": null,
- "mandate_reference": "MANDATE-123-456"
}
Success, no content
Customer or payment method not found
Error response
{- "error_code": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}
Success, no content
Customer or payment method not found
Error response
{- "error_code": null,
- "error_details": null,
- "error_message": null,
- "error_json": null,
- "error_trace_id": null
}