SubscriptionChange

Any change to a user’s subscription, such as swapping a SIM, or upgrading or downgrading a subscription.

  • Name
    object
    Type
    string
    Description

    Type of object is always subscriptionChange.

    Allowed values: subscriptionChange 
  • Name
    id
    Type
    string
    Description

    Unique identifier for the subscription change.

    Example: "sch_0SNlurA049MEWV3bE0SMtbIEJApp"
  • Name
    appliedAt
    Type
    nullable string
    Description

    Time when the subscription change was applied.

    Example: "2021-01-21T19:36:57Z"
  • Name
    createdAt
    Type
    string
    Description

    Time when the subscription change was created.

    Example: "2021-01-21T19:12:28Z"
  • Name
    failureCode
    Type
    nullable string
    Description

    An error code indicating the reason for a failed subscription change.

    Example: "consentNotGiven"
  • Name
    plan
    Type
    nullable Plan
    Description
    The plan to which the subscription should be changed.
  • Name
    requestedChange
    Type
    object
    Description
    Object with the requested changes.
  • Name
    scheduledAt
    Type
    nullable string
    Description

    Approximate time when the change should take place. This is typically set for changes scheduled at renewal. For changes that take effect immediately (when requestedChange.when is "now"), this may be null.

    Example: "2021-01-21T19:12:28Z"
  • Name
    sim
    Type
    nullable Sim
    Description
    The SIM to which the subscription should be changed.
  • Name
    status
    Type
    string
    Description

    The current status of the subscription change. Note that the initiated status is currently only available when using the Billing API, where it implies that the subscription change invoice has not yet been paid.

    Allowed values: pending initiated applied failed deleted 
  • Name
    subscription
    Type
    nullable string
    Description

    Unique identifier of the subscription to be changed.

    Example: "sub_0SNlurA049MEWV2gSfSxi00xlPIi"

Example

{
  "object": "subscriptionChange",
  "id": "sch_0SNlurA049MEWV3bE0SMtbIEJApp",
  "appliedAt": "2021-01-21T19:36:57Z",
  "createdAt": "2021-01-21T19:12:28.0Z",
  "failureCode": "consentNotGiven",
  "plan": {
    "object": "plan",
    "id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
    "metadata": {},
    "activationTrigger": "creation",
    "allowances": {
      "dataBytes": 10000000000,
      "voiceSeconds": 30000,
      "smsMessages": 100
    },
    "coverage": {
      "object": "coverage",
      "id": "de",
      "countries": {
        "0": "DE",
        "1": "FR",
        "2": "US"
      },
      "name": "Europe"
    },
    "createdAt": "2021-01-21T19:38:34.0Z",
    "description": "A data plan you will love! Operates in most countries of the world.",
    "firstPeriodTrigger": "creation",
    "image": "https://i.gigscdn.com/pr/nTZpgaEj5dTQ2Jo/original.png",
    "limits": {
      "dataBytes": 100000000000,
      "bandwidthBitsPerSecond": 100000000,
      "throttling": {
        "thresholdBytes": 10000000000,
        "bandwidthBitsPerSecond": 512000
      }
    },
    "name": "Gigs Global",
    "price": {
      "amount": 999,
      "currency": "USD"
    },
    "provider": "p5",
    "requirements": {
      "address": "present",
      "device": "none",
      "user.birthday": "none",
      "user.fullName": "present"
    },
    "simTypes": {
      "0": "eSIM",
      "1": "pSIM"
    },
    "status": "available",
    "validity": {
      "minimumPeriods": 12,
      "type": "recurring",
      "unit": "day",
      "value": 7
    },
    "data": 10000000000,
    "dataUnit": "byte",
    "sms": 100,
    "smsUnit": "message",
    "voice": 30000,
    "voiceUnit": "second"
  },
  "requestedChange": {
    "plan": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
    "sim": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
    "phoneNumber": "auto",
    "when": "renewal"
  },
  "scheduledAt": "2021-01-21T19:12:28Z",
  "sim": {
    "object": "sim",
    "id": "sim_0SNlurA049MEWV1BAAmWZULA4lf6",
    "metadata": {},
    "createdAt": "2021-01-21T19:38:34.0Z",
    "iccid": "89883070000007537119",
    "provider": "p9",
    "status": "inactive",
    "type": "eSIM"
  },
  "status": "pending",
  "subscription": "sub_0SNlurA049MEWV2gSfSxi00xlPIi"
}