SwiftGoma.SwiftGoma

Search endpoints

Jump to any API endpoint by name, method, or path

Guide

Billing

Subscription plans, subscribing, and the invoices generated along the way. Subscription payments are billed through PawaPay, SwiftGoma's one use of that provider outside of expense payouts. This guide covers three endpoint groups, all under https://api.swiftgoma.com/api/v1.

Plans

Plans are public and readable by anyone — by ID or by slug. Only admins can create plans, update their content, change price (a new price takes effect for new and renewing subscriptions, not retroactively), or activate/deactivate one.

Subscribing

  1. 1

    Subscribe

    POST /subscriptions creates a subscription and a PawaPay deposit request. The response includes the deposit reference to poll or await via webhook.
  2. 2

    Payment confirms

    Once PawaPay confirms the deposit, the subscription becomes ACTIVE and an invoice is generated automatically.
  3. 3

    Renew, upgrade, or cancel

    POST /:id/upgrade moves to a different plan; POST /:id/cancel stops auto-renewal at period end; POST /:id/reactivate undoes a pending cancellation before it takes effect.
Not sure a payment went through? GET /:id/payment-status checks PawaPay directly rather than waiting on the webhook.

Invoices

EndpointWho
GET /invoicesThe signed-in seller's own invoices
GET /invoices/:id/downloadPDF download of one invoice
GET /invoices/adminEvery invoice platform-wide — admin only

Admin visibility

Admins can list every subscription platform-wide, inspect one in detail, and pull aggregate stats and revenue figures — useful for the admin dashboard.

Browse the Billing endpoints in the API Reference