SwiftGoma.SwiftGoma

Search endpoints

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

Subscriptions

Subscribe

POST/api/v1/subscriptions

Subscribes the seller to a plan and initiates a PawaPay deposit for the first payment.

Requires Authorization
SELLER only
Payment

Body parameters

planIdstringrequired
billingCyclestringrequired
MONTHLY or YEARLY.
currencystringrequired
USD or CDF.
payerPhoneNumberstringrequired
countrystringrequired
providerstringrequired
Mobile money provider code.

Notes

  • The subscription activates once PawaPay confirms the deposit — either via webhook, or by polling POST /payments/:depositId/check-status.
Request
curl --request POST \
  --url https://api.swiftgoma.com/api/v1/subscriptions \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "planId": "<planId>",
  "billingCycle": "<billingCycle>",
  "currency": "<currency>",
  "payerPhoneNumber": "<payerPhoneNumber>",
  "country": "<country>",
  "provider": "<provider>"
}'
201Example response
{
  "success": true,
  "data": {
    "subscription": {
      "id": "sub_9c8d7e",
      "sellerProfileId": "sp_2b3c4d",
      "planId": "plan_starter",
      "billingCycle": "MONTHLY",
      "currency": "USD",
      "status": "PENDING",
      "currentPeriodStart": "2026-02-01T00:00:00.000Z",
      "currentPeriodEnd": "2026-03-01T00:00:00.000Z"
    },
    "payment": {
      "id": "subpay_1a2b3c",
      "subscriptionId": "sub_9c8d7e",
      "depositId": "SWG-DEP-9f8e7d6c5b4a3210",
      "amount": "10.00",
      "currency": "USD",
      "status": "PENDING",
      "paidAt": "2026-02-01T09:05:00.000Z"
    },
    "depositId": "SWG-DEP-9f8e7d6c5b4a3210"
  }
}