Integrate TowanPay

One REST API for one-time payments and subscription renewals. Use orders, hosted checkout, and webhooks — subscription logic stays in your app.

API base URL

https://pay.andgroupco.com/api/v1Production host: https://pay.andgroupco.com. All merchant resources nest under /api/v1/projects/{projectId}/…

5-minute quick start

  1. Create account and complete verification
  2. Copy your project id from Dashboard → Settings
  3. Create a tp_test_ API key with orders:write
  4. Verify credentials, create an order, share the payment link
  5. Register a webhook for order.paid
Verify API key
curl -s "https://pay.andgroupco.com/api/v1/merchant" \
  -H "Authorization: Bearer tp_test_xxxxxxxxxxxxxxxx"
Create order (returns paymentLinkUrl)
curl -s -X POST "https://pay.andgroupco.com/api/v1/projects/PROJECT_ID/orders" \
  -H "Authorization: Bearer tp_test_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: quickstart-order-1" \
  -d '{
    "amountMinor": 9900,
    "currency": "CNY",
    "description": "Pro Plan — March 2026",
    "buyerEmail": "customer@example.com",
    "buyerName": "Jane Doe",
    "metadata": {
      "subscription_id": "sub_abc123",
      "plan": "pro",
      "billing_period": "2026-03"
    }
  }'
Full getting started guide

Integration patterns

Subscriptions

TowanPay is payment infrastructure — not a subscription product. Your app owns plans, billing schedules, and entitlements. Each renewal is a new order with metadata your webhook handler uses to extend access.

Subscription billing guide

Webhooks

Verify X-TowanPay-Signature (HMAC-SHA256 of raw body). Subscribe to order.paid and order.failed.

Webhook documentation

Documentation