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_message": null,
- "error_details": 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
}