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.
- Name
- plan
- Type
- nullable object
- Description
- The plan to which the subscription should be changed.
- Name
- requestedChange
- Type
- object
- Status
- PREVIEW
- Description
- Object with the requested changes.
- Name
- plan
- Type
- nullable string
- Description
Unique identifier of the target plan, to which the subscription should be changed.
Example:"pln_0SNlurA049MEWV3V0q7gjQbM4EVo"
- Name
- sim
- Type
- nullable string
- Description
Unique identifier of the target SIM, to which the subscription should be changed. Can also be set to "auto", in which case an eSIM will be automatically allocated.
Example:"sim_0SNlurA049MEWV1BAAmWZULA4lf6"
- Name
- when
- Type
- string
- Description
When the change should take effect. If set to
"now"
, the change will take effect immediately. If set to"renewal"
, the change will instead take effect at the next subscription renewal date. Currentlyplan
changes can only happen on"renewal"
, andsim
changes can only happen"now"
.Example:"renewal"
Allowed values:now
renewal
- Name
- scheduledAt
- Type
- string
- Description
Approximate time when the change should take place.
Example:"2021-01-21T19:12:28Z"
- Name
- sim
- Type
- nullable object
- 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": "",
"plan": {
"object": "plan",
"id": "pln_0SNlurA049MEWV3V0q7gjQbM4EVo",
"metadata": {},
"allowances": {
"dataBytes": 10000000000,
"voiceSeconds": 30000,
"smsMessages": 100
},
"coverage": {
"object": "coverage",
"id": "de",
"countries": [
"DE",
"FR",
"US"
],
"name": "Europe"
},
"createdAt": "2021-01-21T19:38:34.0Z",
"description": "A data plan you will love! Operates in most countries of the world.",
"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": [
"eSIM",
"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",
"when": "renewal"
},
"scheduledAt": "2021-01-21T19:12:28.0Z",
"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"
}