Nest Changelog
1.1.53
6/27/2022
1.1.54
6/30/2022
12 changed endpoints Collapse changed endpoints
GET /users/{userId}/account
Return the current state of the user’s account with payment status
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
GET /users/{userId}/account
Return the current state of the user’s account with payment status
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/cancel
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/cancel
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/uncancel
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/uncancel
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/pause
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/pause
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/unpause
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/unpause
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/terminate
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/terminate
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/extend
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
POST /users/{userId}/account/extend
Response Body
{ data: { dateCancelled?: number, dateExpires?: number, datePausedUntil?: number, nextInvoice?: { amount?: number, currency?: { code?: string, scale?: number, symbol?: string, }, dateScheduled?: number, }, status?: { status?: 'accepted' | 'blocked' | 'requested', }, subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }, }
GET /subscriptions/{id}
Get a subscription
Response Body
{ data: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }
GET /subscriptions/{id}
Get a subscription
Response Body
{ data: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }
POST /subscriptions/{id}/activate
create a new subscription in stripe from shopify order, optionally applies a redemption code
Response Body
{ data: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }
POST /subscriptions/{id}/activate
create a new subscription in stripe from shopify order, optionally applies a redemption code
Response Body
{ data: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }
POST /subscriptions
create a blank subscription for testing purposes
Response Body
{ data: { subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, tokenId?: string, }, }
POST /subscriptions
create a blank subscription for testing purposes
Response Body
{ data: { subscription?: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, tokenId?: string, }, }
GET /users/{userId}/subscriptions
Get a list of a user's subscriptions.
Response Body
{ data: List<{ activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }>, pagination: { page?: number, skip?: number, take?: number, total: { pages?: number, rows?: number, }, }, }
GET /users/{userId}/subscriptions
Get a list of a user's subscriptions.
Response Body
{ data: List<{ activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }>, pagination: { page?: number, skip?: number, take?: number, total: { pages?: number, rows?: number, }, }, }
GET /users/{userId}/subscriptions/{id}
Get a specific subscription.
Response Body
{ data: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, },renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }
GET /users/{userId}/subscriptions/{id}
Get a specific subscription.
Response Body
{ data: { activation?: { isActivated?: bool, }, billingProvider?: { accountId?: string, customerId?: string, name?: 'stripe' | 'ios' | 'android' | 'amazon', orderId?: string, }, cancellation?: { dateCancelled?: number, feedback?: string, reason?: string, }, createdBy?: { id?: number, }, dateCreated?: number, dateUpdated?: number, id?: number, pause?: { dateEnd?: number, dateStart?: number, reason?: string, }, plan?: { id?: number, }, price?: { currency?: { code?: string, scale?: number, symbol?: string, }, value?: number, }, promotion?: { id?: number, }, + provisional?: { + isProvisioned?: bool, + }, renewal?: 'auto' | 'paused' | 'cancelled' | 'failed', source?: { accountId?: string, lineItemId?: string, name?: 'shopify' | 'amazon' | 'ios' | 'android' | 'organic' | 'free', orderId?: string, productId?: string, }, status?: 'pending' | 'trialing' | 'active' | 'expired', term?: { dateEnd?: number, dateStart?: number, }, token?: string, trial?: { dateEnd?: number, dateStart?: number, }, updatedBy?: { id?: number, }, user?: { id?: number, }, utm?: { campaign?: string, content?: string, medium?: string, source?: string, }, }, }