API reference

REST v1 endpoints for merchant integrations. Prefer nested /api/v1/projects/{projectId}/ routes over deprecated flat paths.

Base URL

https://pay.andgroupco.com/api/v1

REST principles

  • Resources nest under projects: /api/v1/projects/:projectId/orders
  • Send Idempotency-Key on POST that create resources
  • Lists use cursor pagination: ?limit=20&starting_after={id}
  • Flat paths like /api/v1/orders are deprecated — migrate to nested URLs

Projects

Business units / sites. All payment resources nest under a project.

MethodPathAuth / Permission
GET
/api/v1/projects
Session or API key
POST
/api/v1/projects
Session only
GET
/api/v1/projects/:projectId
Session or API key
POST
/api/v1/projects/active
Session — set active project
POST
/api/v1/projects/active-environment
Session — switch TEST/LIVE

Merchant

MethodPathAuth / Permission
GET
/api/v1/merchant
Session or API key

Orders

Preferred nested routes. Flat /api/v1/orders paths are deprecated.

MethodPathAuth / Permission
GET
/api/v1/projects/:projectId/orders
orders:read
POST
/api/v1/projects/:projectId/orders
orders:write
GET
/api/v1/projects/:projectId/orders/:id
orders:read
POST
/api/v1/projects/:projectId/orders/:id/payments
orders:write
POST
/api/v1/projects/:projectId/orders/:id/voucher
orders:write
POST
/api/v1/projects/:projectId/orders/:id/payment-link
orders:write
DELETE
/api/v1/projects/:projectId/orders/:id/payment-link
orders:write
POST
/api/v1/projects/:projectId/orders/:id/simulate-payment
orders:write

Gateway payments

MethodPathAuth / Permission
POST
/api/v1/projects/:projectId/gateways/:slug/payments
payments:write
GET
/api/v1/projects/:projectId/gateways/:slug/payments?reference=
payments:read

API keys

Session auth only. Keys are scoped to one project.

MethodPathAuth / Permission
GET
/api/v1/projects/:projectId/api-keys
POST
/api/v1/projects/:projectId/api-keys
PATCH
/api/v1/projects/:projectId/api-keys/:id
DELETE
/api/v1/projects/:projectId/api-keys/:id
POST
/api/v1/projects/:projectId/api-keys/:id/rotate

Webhooks

MethodPathAuth / Permission
GET
/api/v1/projects/:projectId/webhooks
webhooks:read
POST
/api/v1/projects/:projectId/webhooks
webhooks:write
PATCH
/api/v1/projects/:projectId/webhooks/:id
webhooks:write
DELETE
/api/v1/projects/:projectId/webhooks/:id
webhooks:write
POST
/api/v1/projects/:projectId/webhooks/:id/test
webhooks:write
GET
/api/v1/projects/:projectId/webhooks/:id/attempts
webhooks:read

Collection profiles

Personal QR receiving URLs for China channels (e.g. WeChat Pay, Alipay). Other gateways use project gateway credentials.

MethodPathAuth / Permission
GET
/api/v1/projects/:projectId/collection-profiles
GET
/api/v1/projects/:projectId/collection-profiles/:channel
PUT
/api/v1/projects/:projectId/collection-profiles/:channel

Assets

Collection QR image upload (server-side proxy).

MethodPathAuth / Permission
POST
/api/v1/projects/:projectId/assets/upload
Session or API key
DELETE
/api/v1/assets/:id
Session or API key

Transactions & wallets

MethodPathAuth / Permission
GET
/api/v1/transactions
payments:read
GET
/api/v1/wallets

Unversioned routes

These remain outside /api/v1 by design:

  • POST /api/auth/* — NextAuth
  • POST /api/payments/:gateway/webhook — provider callbacks
  • /api/admin/*, /api/profile/* — dashboard internals