Subscription Object
Example
{
"id": "360262023772113421",
"status": "active",
"coverage": {
"name": "Print and digital",
"blinkCoverage": "*",
"extraCoverage": null
},
"amount": {
"amount": "2.00",
"currency": "usd",
"amountPrecise": 2000000,
"amountInSubunits": 200,
"amountPreciseExponent": 6
},
"discount": {
"code": "BLACK_FRIDAY_50",
"name": "before",
"value": "50.00% off"
},
"createdAt": "2020-11-25T12:35:42.263635Z",
"paidUntil": "2020-12-02T12:35:42.263635Z",
"cycleDuration": "week",
"deliveryAddress": {
"city": "New York",
"name": null,
"state": "NY",
"country": "United States",
"address1": "20 Cooper Square",
"address2": null,
"postalCode": "10011",
"countryCode": "US"
}
}
Description
| name | type | always present | description |
|---|---|---|---|
id | String | ☑ | subscription's unique id |
status | String | ☑ | subscription's status. can be one of active/canceled/finished/unpaid |
coverage | Object | ☑ | subscriptions' coverage, defined by a coverage object |
amount | Object | ☐ | subscription's amount, defined by an amount object. |
discount | Object | ☑ | subscription's discount, defined by a discount object. Can be null. |
createdAt | String | ☑ | subscription's creation date |
paidUntil | String | ☑ | subscription's expiration date |
cycleDuration | String | ☑ | String representation of subscription's cycle duration.amount(if greater than 1)+ day/week/month/year Example: week, 2year, 7day |
deliveryAddress | Object | ☑ | subscription's address, defined by an address object. Can be null. |
Coverage Object
Example
{
"name": "Print and digital",
"blinkCoverage": "*",
"extraCoverage": null
}
Description
| name | type | always present | description |
|---|---|---|---|
name | String | ☑ | user friendly subscription coverage name that is shown to the user when selecting the subscription plan |
blinkCoverage | String | ☑ | comma separated keywords used to describe the digital coverage. * means everything is covered |
extraCoverage | String | ☑ | optional free format String that be used by merchant to define its own coverage. It's null if not set. |
Discount Object
Example
{
"code": "BLACK_FRIDAY_50",
"name": "before",
"value": "50.00% off"
}
Description
| name | type | always present | description |
|---|---|---|---|
code | String | ☑ | discount code that can be used by users when subscribing |
name | String | ☑ | a human readable name for the discount code |
value | String | ☑ | string representation of the discount policy |
Address Object
Example
{
"city": "New York",
"name": null,
"state": "NY",
"country": "United States",
"address1": "20 Cooper Square",
"address2": null,
"postalCode": "10011",
"countryCode": "US"
}
Description
| name | type | always present | description |
|---|---|---|---|
city | String | ☑ | address's city |
name | String | ☑ | address's contact person name. Can be null |
state | String | ☑ | address's state |
country | String | ☑ | address's country |
address1 | String | ☑ | address line 1 |
address2 | String | ☑ | address line 2. Can be null. |
postalCode | String | ☑ | address's zip code. Can be null. |
countryCode | String | ☑ | address's country code |