GET
/api/v1/projectsList projects accessible to the authenticated account.
Auth: Session or API key
Every payment resource belongs to a project — a business unit or site. Integrations should use nested URLs under /api/v1/projects/{projectId}/.
Nested URLs (recommended)
/api/v1/projects/{projectId}/ordersAlso: collection-profiles, webhooks, gateways, api-keys, assets.| Context | Resolution |
|---|---|
| API key | projectId on the key record (authoritative). URL must match. |
| Dashboard session | X-Project-Id header, JWT activeProjectId, or default project |
| Flat legacy paths | Deprecated — resolves via default project or header |
Responses include project_id in data and an X-Project-Id response header when scoped.
Each merchant has paired TEST and LIVE projects. Use tp_test_ keys with TEST projects and tp_live_ keys with LIVE projects. Mismatch returns project_environment_mismatch.
Response headers
X-TowanPay-Environment returns TEST or LIVE. X-TowanPay-Livemode is true/false (Stripe-style)./api/v1/projectsList projects accessible to the authenticated account.
/api/v1/projects/:projectIdRetrieve a single project.
/api/v1/projects/activeSet the dashboard active project.
/api/v1/projects/active-environmentSwitch between TEST and LIVE project in the dashboard.