Skip to content

Payments API

Payments are processed through the checkout flow. The payment gateway is selected based on configuration.

GET /api/v1/payments/:id
Authorization: Bearer <token>
POST /api/v1/payments/:id/refund
Authorization: Bearer <admin_token>
{
"amount": 50.00,
"reason": "Customer request"
}

Partial refunds supported.

  • Secret key: sk_test_... or sk_live_...
  • Publishable key: pk_test_... or pk_live_...
  • Supports: cards, Apple Pay, Google Pay, 3D Secure
  • Client ID: from Airwallex dashboard
  • API key: from Airwallex dashboard
  • Supports: cards, WeChat Pay, Alipay, 3D Secure

Always available for testing. Simulates successful payments.

Payment status changes trigger webhooks:

  • payment.succeeded
  • payment.failed
  • refund.succeeded

Register webhook endpoints via API or admin.