SwiftGoma.SwiftGoma

Search endpoints

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

Subscriptions

Upgrade subscription

POST/api/v1/subscriptions/upgrade

Switches the seller to a different plan, charging the new plan's price the same way as subscribing.

Requires Authorization
SELLER only
Payment

Body parameters

newPlanIdstringrequired
billingCyclestringrequired
MONTHLY or YEARLY.
currencystringrequired
USD or CDF.
payerPhoneNumberstringrequired
countrystringrequired
providerstringrequired
Request
curl --request POST \
  --url https://api.swiftgoma.com/api/v1/subscriptions/upgrade \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "newPlanId": "<newPlanId>",
  "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": "ACTIVE",
      "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": "SUCCEEDED",
      "paidAt": "2026-02-01T09:05:00.000Z"
    },
    "depositId": "SWG-DEP-1a2b3c4d5e6f7890"
  }
}