Total Access Docs
Guides

Payments & Billing

Manage payment history, saved cards, and subscription upgrades via the API.

Payments & Billing

The Payments module provides access to payment history, saved payment methods, and subscription management.

List payment history

Retrieve payments for your active client:

curl -X GET "https://developer.totalaccess.co.za/api/v1/payments?limit=20&offset=0" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Filter parameters

ParameterTypeDefaultDescription
limitinteger50Number of results per page
offsetinteger0Pagination offset
statusstringFilter by payment status (e.g. paid, pending, failed)

Response:

{
  "success": true,
  "data": [
    {
      "id": 101,
      "amount": 1500.00,
      "currency": "ZAR",
      "status": "paid",
      "payment_method": "card",
      "created_at": "2026-07-15T10:30:00Z"
    }
  ]
}

Saved payment cards

List saved cards:

curl -X GET https://developer.totalaccess.co.za/api/v1/payments/cards \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Save a new card (using a payment provider token):

curl -X POST https://developer.totalaccess.co.za/api/v1/payments/cards \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "tok_provider_card_token"
  }'

Card tokens are generated by the payment provider (e.g. Stripe, PayFast). Never send raw card numbers to the API.

Subscription upgrades

Initialize a subscription upgrade payment:

curl -X POST https://developer.totalaccess.co.za/api/v1/payments/initialize-subscription-upgrade \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "plan_id": "professional"
  }'

The response includes a redirect_url for completing the payment through the provider's checkout flow.

On this page