curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"ApplicationFeePercent": 0,
"CancelAt": "string",
"CancelAtPeriodEnd": false,
"StripeSubscriptionCancellation": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Comment": "string",
"Feedback": "string",
"Reason": "string",
"Account": {},
"CancelationReason": "string",
"LastProduct": {},
"SubmittedDateTime": "string",
"SubscribingStartDate": "string"
},
"Currency": "string",
"EndedAt": "string",
"PauseCollection_Behavior": "string",
"PauseCollection_ResumesAt": "string",
"StartDate": "string",
"Status": "string",
"TrialEnd": "string",
"StripeDiscounts": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Account": {},
"CheckoutSessionId": "string",
"End": "string",
"InvoiceId": "string",
"InvoiceItemId": "string",
"IsDeleted": false,
"Start": "string",
"StripeCoupon": {},
"StripePromotionCode": {},
"SubscriptionId": "string",
"SubscriptionItemId": "string",
"CouponId": "string",
"CustomerId": "string",
"StripeInvoice": {},
"StripeSubscription": {},
"PromotionCodeId": "string"
}
],
"StripeSubscriptionItems": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"CurrentPeriodStart": "string",
"CurrentPeriodEnd": "string",
"StripeSubscription": {},
"StripeDiscounts": [],
"StripePrice": {},
"Quantity": 0,
"PriceId": "string"
}
],
"StripeSubscriptionSchedules": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"CompletedAt": "string",
"CurrentPhase_EndDate": "string",
"CurrentPhase_StartDate": "string",
"EndBehavior": "string",
"StripeSubscriptionSchedulePhases": [],
"ReleasedAt": "string",
"Status": "string",
"StripeSubscription": {},
"SubscriptionId": "string",
"ReleasedSubscriptionId": "string"
}
],
"Account": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Name": "string",
"ClientIdentifier": "string",
"Currency": "string",
"InvoiceNotes": "string",
"IsDemo": false,
"BillingAddress": {},
"MailingAddress": {},
"AccountStage": 2,
"PaymentInformation": {},
"PersonAccount": [],
"StripeDefaultPaymentMethodId": "string",
"StripeInvoices": [],
"StripePaymentMethods": [],
"StripeSubscriptions": [],
"Subscriptions": [],
"Deals": [],
"LastLoginDateTime": "string",
"AccountSpecificPageUrl1": "string",
"AccountSpecificPageUrl2": "string",
"AccountSpecificPageUrl3": "string",
"AccountSpecificPageUrl4": "string",
"AccountSpecificPageUrl5": "string",
"AccountSpecificPageUrl6": "string",
"AccountSpecificPageUrl7": "string",
"AccountSpecificPageUrl8": "string",
"AccountSpecificPageUrl9": "string",
"AccountSpecificPageUrl10": "string",
"RewardFulReferralId": "string",
"ToltReferralId": "string",
"TaxIds": [],
"TaxStatus": "string",
"AccountStageLabel": "string",
"CurrentStripeProducts": "string",
"CurrentStripeProductInstances": [],
"CurrentSubscription": {},
"DomainName": "string",
"TenantBillingSystem": 1,
"HasLoggedIn": false,
"LatestSubscription": {},
"LifetimeRevenue": 0,
"NextStripeInvoiceDate": "string",
"Nonce": "string",
"PrimaryContact": {},
"PrimarySubscription": {},
"PrimaryStripeSubscription": {},
"RecaptchaToken": "string",
"StripeCheckoutMetadata": {},
"StripeNextInvoiceSequence": 0,
"StripePrice": [],
"StripePriceIds": "string",
"StripePromotionCode": "string",
"TaxId": "string",
"TaxIdIsInvalid": false,
"TaxIdType": "string",
"WebflowSlug": "string"
},
"AccountUid": "string",
"BillingCycleAnchor": "string",
"CollectionMethod": "string",
"CustomerId": "string",
"DaysUntilDue": 0,
"ScheduleId": "string",
"StripeDiscountIds": [
"string"
],
"StripePriceIds": "string",
"TrialPeriodDays": 0,
"CurrentStripeSubscriptionSchedule": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"CompletedAt": "string",
"CurrentPhase_EndDate": "string",
"CurrentPhase_StartDate": "string",
"EndBehavior": "string",
"StripeSubscriptionSchedulePhases": [],
"ReleasedAt": "string",
"Status": "string",
"StripeSubscription": {},
"SubscriptionId": "string",
"ReleasedSubscriptionId": "string"
}
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview"
payload = {
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"ApplicationFeePercent": 0,
"CancelAt": "string",
"CancelAtPeriodEnd": False,
"StripeSubscriptionCancellation": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Comment": "string",
"Feedback": "string",
"Reason": "string",
"Account": {},
"CancelationReason": "string",
"LastProduct": {},
"SubmittedDateTime": "string",
"SubscribingStartDate": "string"
},
"Currency": "string",
"EndedAt": "string",
"PauseCollection_Behavior": "string",
"PauseCollection_ResumesAt": "string",
"StartDate": "string",
"Status": "string",
"TrialEnd": "string",
"StripeDiscounts": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"Account": {},
"CheckoutSessionId": "string",
"End": "string",
"InvoiceId": "string",
"InvoiceItemId": "string",
"IsDeleted": False,
"Start": "string",
"StripeCoupon": {},
"StripePromotionCode": {},
"SubscriptionId": "string",
"SubscriptionItemId": "string",
"CouponId": "string",
"CustomerId": "string",
"StripeInvoice": {},
"StripeSubscription": {},
"PromotionCodeId": "string"
}
],
"StripeSubscriptionItems": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"CurrentPeriodStart": "string",
"CurrentPeriodEnd": "string",
"StripeSubscription": {},
"StripeDiscounts": [],
"StripePrice": {},
"Quantity": 0,
"PriceId": "string"
}
],
"StripeSubscriptionSchedules": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"CompletedAt": "string",
"CurrentPhase_EndDate": "string",
"CurrentPhase_StartDate": "string",
"EndBehavior": "string",
"StripeSubscriptionSchedulePhases": [],
"ReleasedAt": "string",
"Status": "string",
"StripeSubscription": {},
"SubscriptionId": "string",
"ReleasedSubscriptionId": "string"
}
],
"Account": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"Name": "string",
"ClientIdentifier": "string",
"Currency": "string",
"InvoiceNotes": "string",
"IsDemo": False,
"BillingAddress": {},
"MailingAddress": {},
"AccountStage": 2,
"PaymentInformation": {},
"PersonAccount": [],
"StripeDefaultPaymentMethodId": "string",
"StripeInvoices": [],
"StripePaymentMethods": [],
"StripeSubscriptions": [],
"Subscriptions": [],
"Deals": [],
"LastLoginDateTime": "string",
"AccountSpecificPageUrl1": "string",
"AccountSpecificPageUrl2": "string",
"AccountSpecificPageUrl3": "string",
"AccountSpecificPageUrl4": "string",
"AccountSpecificPageUrl5": "string",
"AccountSpecificPageUrl6": "string",
"AccountSpecificPageUrl7": "string",
"AccountSpecificPageUrl8": "string",
"AccountSpecificPageUrl9": "string",
"AccountSpecificPageUrl10": "string",
"RewardFulReferralId": "string",
"ToltReferralId": "string",
"TaxIds": [],
"TaxStatus": "string",
"AccountStageLabel": "string",
"CurrentStripeProducts": "string",
"CurrentStripeProductInstances": [],
"CurrentSubscription": {},
"DomainName": "string",
"TenantBillingSystem": 1,
"HasLoggedIn": False,
"LatestSubscription": {},
"LifetimeRevenue": 0,
"NextStripeInvoiceDate": "string",
"Nonce": "string",
"PrimaryContact": {},
"PrimarySubscription": {},
"PrimaryStripeSubscription": {},
"RecaptchaToken": "string",
"StripeCheckoutMetadata": {},
"StripeNextInvoiceSequence": 0,
"StripePrice": [],
"StripePriceIds": "string",
"StripePromotionCode": "string",
"TaxId": "string",
"TaxIdIsInvalid": False,
"TaxIdType": "string",
"WebflowSlug": "string"
},
"AccountUid": "string",
"BillingCycleAnchor": "string",
"CollectionMethod": "string",
"CustomerId": "string",
"DaysUntilDue": 0,
"ScheduleId": "string",
"StripeDiscountIds": ["string"],
"StripePriceIds": "string",
"TrialPeriodDays": 0,
"CurrentStripeSubscriptionSchedule": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"CompletedAt": "string",
"CurrentPhase_EndDate": "string",
"CurrentPhase_StartDate": "string",
"EndBehavior": "string",
"StripeSubscriptionSchedulePhases": [],
"ReleasedAt": "string",
"Status": "string",
"StripeSubscription": {},
"SubscriptionId": "string",
"ReleasedSubscriptionId": "string"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Uid: 'string',
_objectType: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
ApplicationFeePercent: 0,
CancelAt: 'string',
CancelAtPeriodEnd: false,
StripeSubscriptionCancellation: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
Comment: 'string',
Feedback: 'string',
Reason: 'string',
Account: {},
CancelationReason: 'string',
LastProduct: {},
SubmittedDateTime: 'string',
SubscribingStartDate: 'string'
},
Currency: 'string',
EndedAt: 'string',
PauseCollection_Behavior: 'string',
PauseCollection_ResumesAt: 'string',
StartDate: 'string',
Status: 'string',
TrialEnd: 'string',
StripeDiscounts: [
{
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
Account: {},
CheckoutSessionId: 'string',
End: 'string',
InvoiceId: 'string',
InvoiceItemId: 'string',
IsDeleted: false,
Start: 'string',
StripeCoupon: {},
StripePromotionCode: {},
SubscriptionId: 'string',
SubscriptionItemId: 'string',
CouponId: 'string',
CustomerId: 'string',
StripeInvoice: {},
StripeSubscription: {},
PromotionCodeId: 'string'
}
],
StripeSubscriptionItems: [
{
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
CurrentPeriodStart: 'string',
CurrentPeriodEnd: 'string',
StripeSubscription: {},
StripeDiscounts: [],
StripePrice: {},
Quantity: 0,
PriceId: 'string'
}
],
StripeSubscriptionSchedules: [
{
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
CompletedAt: 'string',
CurrentPhase_EndDate: 'string',
CurrentPhase_StartDate: 'string',
EndBehavior: 'string',
StripeSubscriptionSchedulePhases: [],
ReleasedAt: 'string',
Status: 'string',
StripeSubscription: {},
SubscriptionId: 'string',
ReleasedSubscriptionId: 'string'
}
],
Account: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
Name: 'string',
ClientIdentifier: 'string',
Currency: 'string',
InvoiceNotes: 'string',
IsDemo: false,
BillingAddress: {},
MailingAddress: {},
AccountStage: 2,
PaymentInformation: {},
PersonAccount: [],
StripeDefaultPaymentMethodId: 'string',
StripeInvoices: [],
StripePaymentMethods: [],
StripeSubscriptions: [],
Subscriptions: [],
Deals: [],
LastLoginDateTime: 'string',
AccountSpecificPageUrl1: 'string',
AccountSpecificPageUrl2: 'string',
AccountSpecificPageUrl3: 'string',
AccountSpecificPageUrl4: 'string',
AccountSpecificPageUrl5: 'string',
AccountSpecificPageUrl6: 'string',
AccountSpecificPageUrl7: 'string',
AccountSpecificPageUrl8: 'string',
AccountSpecificPageUrl9: 'string',
AccountSpecificPageUrl10: 'string',
RewardFulReferralId: 'string',
ToltReferralId: 'string',
TaxIds: [],
TaxStatus: 'string',
AccountStageLabel: 'string',
CurrentStripeProducts: 'string',
CurrentStripeProductInstances: [],
CurrentSubscription: {},
DomainName: 'string',
TenantBillingSystem: 1,
HasLoggedIn: false,
LatestSubscription: {},
LifetimeRevenue: 0,
NextStripeInvoiceDate: 'string',
Nonce: 'string',
PrimaryContact: {},
PrimarySubscription: {},
PrimaryStripeSubscription: {},
RecaptchaToken: 'string',
StripeCheckoutMetadata: {},
StripeNextInvoiceSequence: 0,
StripePrice: [],
StripePriceIds: 'string',
StripePromotionCode: 'string',
TaxId: 'string',
TaxIdIsInvalid: false,
TaxIdType: 'string',
WebflowSlug: 'string'
},
AccountUid: 'string',
BillingCycleAnchor: 'string',
CollectionMethod: 'string',
CustomerId: 'string',
DaysUntilDue: 0,
ScheduleId: 'string',
StripeDiscountIds: ['string'],
StripePriceIds: 'string',
TrialPeriodDays: 0,
CurrentStripeSubscriptionSchedule: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
CompletedAt: 'string',
CurrentPhase_EndDate: 'string',
CurrentPhase_StartDate: 'string',
EndBehavior: 'string',
StripeSubscriptionSchedulePhases: [],
ReleasedAt: 'string',
Status: 'string',
StripeSubscription: {},
SubscriptionId: 'string',
ReleasedSubscriptionId: 'string'
}
})
};
fetch('https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Uid' => 'string',
'_objectType' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'ApplicationFeePercent' => 0,
'CancelAt' => 'string',
'CancelAtPeriodEnd' => false,
'StripeSubscriptionCancellation' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'Comment' => 'string',
'Feedback' => 'string',
'Reason' => 'string',
'Account' => [
],
'CancelationReason' => 'string',
'LastProduct' => [
],
'SubmittedDateTime' => 'string',
'SubscribingStartDate' => 'string'
],
'Currency' => 'string',
'EndedAt' => 'string',
'PauseCollection_Behavior' => 'string',
'PauseCollection_ResumesAt' => 'string',
'StartDate' => 'string',
'Status' => 'string',
'TrialEnd' => 'string',
'StripeDiscounts' => [
[
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'Account' => [
],
'CheckoutSessionId' => 'string',
'End' => 'string',
'InvoiceId' => 'string',
'InvoiceItemId' => 'string',
'IsDeleted' => false,
'Start' => 'string',
'StripeCoupon' => [
],
'StripePromotionCode' => [
],
'SubscriptionId' => 'string',
'SubscriptionItemId' => 'string',
'CouponId' => 'string',
'CustomerId' => 'string',
'StripeInvoice' => [
],
'StripeSubscription' => [
],
'PromotionCodeId' => 'string'
]
],
'StripeSubscriptionItems' => [
[
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'CurrentPeriodStart' => 'string',
'CurrentPeriodEnd' => 'string',
'StripeSubscription' => [
],
'StripeDiscounts' => [
],
'StripePrice' => [
],
'Quantity' => 0,
'PriceId' => 'string'
]
],
'StripeSubscriptionSchedules' => [
[
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'CompletedAt' => 'string',
'CurrentPhase_EndDate' => 'string',
'CurrentPhase_StartDate' => 'string',
'EndBehavior' => 'string',
'StripeSubscriptionSchedulePhases' => [
],
'ReleasedAt' => 'string',
'Status' => 'string',
'StripeSubscription' => [
],
'SubscriptionId' => 'string',
'ReleasedSubscriptionId' => 'string'
]
],
'Account' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'Name' => 'string',
'ClientIdentifier' => 'string',
'Currency' => 'string',
'InvoiceNotes' => 'string',
'IsDemo' => false,
'BillingAddress' => [
],
'MailingAddress' => [
],
'AccountStage' => 2,
'PaymentInformation' => [
],
'PersonAccount' => [
],
'StripeDefaultPaymentMethodId' => 'string',
'StripeInvoices' => [
],
'StripePaymentMethods' => [
],
'StripeSubscriptions' => [
],
'Subscriptions' => [
],
'Deals' => [
],
'LastLoginDateTime' => 'string',
'AccountSpecificPageUrl1' => 'string',
'AccountSpecificPageUrl2' => 'string',
'AccountSpecificPageUrl3' => 'string',
'AccountSpecificPageUrl4' => 'string',
'AccountSpecificPageUrl5' => 'string',
'AccountSpecificPageUrl6' => 'string',
'AccountSpecificPageUrl7' => 'string',
'AccountSpecificPageUrl8' => 'string',
'AccountSpecificPageUrl9' => 'string',
'AccountSpecificPageUrl10' => 'string',
'RewardFulReferralId' => 'string',
'ToltReferralId' => 'string',
'TaxIds' => [
],
'TaxStatus' => 'string',
'AccountStageLabel' => 'string',
'CurrentStripeProducts' => 'string',
'CurrentStripeProductInstances' => [
],
'CurrentSubscription' => [
],
'DomainName' => 'string',
'TenantBillingSystem' => 1,
'HasLoggedIn' => false,
'LatestSubscription' => [
],
'LifetimeRevenue' => 0,
'NextStripeInvoiceDate' => 'string',
'Nonce' => 'string',
'PrimaryContact' => [
],
'PrimarySubscription' => [
],
'PrimaryStripeSubscription' => [
],
'RecaptchaToken' => 'string',
'StripeCheckoutMetadata' => [
],
'StripeNextInvoiceSequence' => 0,
'StripePrice' => [
],
'StripePriceIds' => 'string',
'StripePromotionCode' => 'string',
'TaxId' => 'string',
'TaxIdIsInvalid' => false,
'TaxIdType' => 'string',
'WebflowSlug' => 'string'
],
'AccountUid' => 'string',
'BillingCycleAnchor' => 'string',
'CollectionMethod' => 'string',
'CustomerId' => 'string',
'DaysUntilDue' => 0,
'ScheduleId' => 'string',
'StripeDiscountIds' => [
'string'
],
'StripePriceIds' => 'string',
'TrialPeriodDays' => 0,
'CurrentStripeSubscriptionSchedule' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'CompletedAt' => 'string',
'CurrentPhase_EndDate' => 'string',
'CurrentPhase_StartDate' => 'string',
'EndBehavior' => 'string',
'StripeSubscriptionSchedulePhases' => [
],
'ReleasedAt' => 'string',
'Status' => 'string',
'StripeSubscription' => [
],
'SubscriptionId' => 'string',
'ReleasedSubscriptionId' => 'string'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview"
payload := strings.NewReader("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"ApplicationFeePercent\": 0,\n \"CancelAt\": \"string\",\n \"CancelAtPeriodEnd\": false,\n \"StripeSubscriptionCancellation\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Comment\": \"string\",\n \"Feedback\": \"string\",\n \"Reason\": \"string\",\n \"Account\": {},\n \"CancelationReason\": \"string\",\n \"LastProduct\": {},\n \"SubmittedDateTime\": \"string\",\n \"SubscribingStartDate\": \"string\"\n },\n \"Currency\": \"string\",\n \"EndedAt\": \"string\",\n \"PauseCollection_Behavior\": \"string\",\n \"PauseCollection_ResumesAt\": \"string\",\n \"StartDate\": \"string\",\n \"Status\": \"string\",\n \"TrialEnd\": \"string\",\n \"StripeDiscounts\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Account\": {},\n \"CheckoutSessionId\": \"string\",\n \"End\": \"string\",\n \"InvoiceId\": \"string\",\n \"InvoiceItemId\": \"string\",\n \"IsDeleted\": false,\n \"Start\": \"string\",\n \"StripeCoupon\": {},\n \"StripePromotionCode\": {},\n \"SubscriptionId\": \"string\",\n \"SubscriptionItemId\": \"string\",\n \"CouponId\": \"string\",\n \"CustomerId\": \"string\",\n \"StripeInvoice\": {},\n \"StripeSubscription\": {},\n \"PromotionCodeId\": \"string\"\n }\n ],\n \"StripeSubscriptionItems\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CurrentPeriodStart\": \"string\",\n \"CurrentPeriodEnd\": \"string\",\n \"StripeSubscription\": {},\n \"StripeDiscounts\": [],\n \"StripePrice\": {},\n \"Quantity\": 0,\n \"PriceId\": \"string\"\n }\n ],\n \"StripeSubscriptionSchedules\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n ],\n \"Account\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Name\": \"string\",\n \"ClientIdentifier\": \"string\",\n \"Currency\": \"string\",\n \"InvoiceNotes\": \"string\",\n \"IsDemo\": false,\n \"BillingAddress\": {},\n \"MailingAddress\": {},\n \"AccountStage\": 2,\n \"PaymentInformation\": {},\n \"PersonAccount\": [],\n \"StripeDefaultPaymentMethodId\": \"string\",\n \"StripeInvoices\": [],\n \"StripePaymentMethods\": [],\n \"StripeSubscriptions\": [],\n \"Subscriptions\": [],\n \"Deals\": [],\n \"LastLoginDateTime\": \"string\",\n \"AccountSpecificPageUrl1\": \"string\",\n \"AccountSpecificPageUrl2\": \"string\",\n \"AccountSpecificPageUrl3\": \"string\",\n \"AccountSpecificPageUrl4\": \"string\",\n \"AccountSpecificPageUrl5\": \"string\",\n \"AccountSpecificPageUrl6\": \"string\",\n \"AccountSpecificPageUrl7\": \"string\",\n \"AccountSpecificPageUrl8\": \"string\",\n \"AccountSpecificPageUrl9\": \"string\",\n \"AccountSpecificPageUrl10\": \"string\",\n \"RewardFulReferralId\": \"string\",\n \"ToltReferralId\": \"string\",\n \"TaxIds\": [],\n \"TaxStatus\": \"string\",\n \"AccountStageLabel\": \"string\",\n \"CurrentStripeProducts\": \"string\",\n \"CurrentStripeProductInstances\": [],\n \"CurrentSubscription\": {},\n \"DomainName\": \"string\",\n \"TenantBillingSystem\": 1,\n \"HasLoggedIn\": false,\n \"LatestSubscription\": {},\n \"LifetimeRevenue\": 0,\n \"NextStripeInvoiceDate\": \"string\",\n \"Nonce\": \"string\",\n \"PrimaryContact\": {},\n \"PrimarySubscription\": {},\n \"PrimaryStripeSubscription\": {},\n \"RecaptchaToken\": \"string\",\n \"StripeCheckoutMetadata\": {},\n \"StripeNextInvoiceSequence\": 0,\n \"StripePrice\": [],\n \"StripePriceIds\": \"string\",\n \"StripePromotionCode\": \"string\",\n \"TaxId\": \"string\",\n \"TaxIdIsInvalid\": false,\n \"TaxIdType\": \"string\",\n \"WebflowSlug\": \"string\"\n },\n \"AccountUid\": \"string\",\n \"BillingCycleAnchor\": \"string\",\n \"CollectionMethod\": \"string\",\n \"CustomerId\": \"string\",\n \"DaysUntilDue\": 0,\n \"ScheduleId\": \"string\",\n \"StripeDiscountIds\": [\n \"string\"\n ],\n \"StripePriceIds\": \"string\",\n \"TrialPeriodDays\": 0,\n \"CurrentStripeSubscriptionSchedule\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"ApplicationFeePercent\": 0,\n \"CancelAt\": \"string\",\n \"CancelAtPeriodEnd\": false,\n \"StripeSubscriptionCancellation\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Comment\": \"string\",\n \"Feedback\": \"string\",\n \"Reason\": \"string\",\n \"Account\": {},\n \"CancelationReason\": \"string\",\n \"LastProduct\": {},\n \"SubmittedDateTime\": \"string\",\n \"SubscribingStartDate\": \"string\"\n },\n \"Currency\": \"string\",\n \"EndedAt\": \"string\",\n \"PauseCollection_Behavior\": \"string\",\n \"PauseCollection_ResumesAt\": \"string\",\n \"StartDate\": \"string\",\n \"Status\": \"string\",\n \"TrialEnd\": \"string\",\n \"StripeDiscounts\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Account\": {},\n \"CheckoutSessionId\": \"string\",\n \"End\": \"string\",\n \"InvoiceId\": \"string\",\n \"InvoiceItemId\": \"string\",\n \"IsDeleted\": false,\n \"Start\": \"string\",\n \"StripeCoupon\": {},\n \"StripePromotionCode\": {},\n \"SubscriptionId\": \"string\",\n \"SubscriptionItemId\": \"string\",\n \"CouponId\": \"string\",\n \"CustomerId\": \"string\",\n \"StripeInvoice\": {},\n \"StripeSubscription\": {},\n \"PromotionCodeId\": \"string\"\n }\n ],\n \"StripeSubscriptionItems\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CurrentPeriodStart\": \"string\",\n \"CurrentPeriodEnd\": \"string\",\n \"StripeSubscription\": {},\n \"StripeDiscounts\": [],\n \"StripePrice\": {},\n \"Quantity\": 0,\n \"PriceId\": \"string\"\n }\n ],\n \"StripeSubscriptionSchedules\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n ],\n \"Account\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Name\": \"string\",\n \"ClientIdentifier\": \"string\",\n \"Currency\": \"string\",\n \"InvoiceNotes\": \"string\",\n \"IsDemo\": false,\n \"BillingAddress\": {},\n \"MailingAddress\": {},\n \"AccountStage\": 2,\n \"PaymentInformation\": {},\n \"PersonAccount\": [],\n \"StripeDefaultPaymentMethodId\": \"string\",\n \"StripeInvoices\": [],\n \"StripePaymentMethods\": [],\n \"StripeSubscriptions\": [],\n \"Subscriptions\": [],\n \"Deals\": [],\n \"LastLoginDateTime\": \"string\",\n \"AccountSpecificPageUrl1\": \"string\",\n \"AccountSpecificPageUrl2\": \"string\",\n \"AccountSpecificPageUrl3\": \"string\",\n \"AccountSpecificPageUrl4\": \"string\",\n \"AccountSpecificPageUrl5\": \"string\",\n \"AccountSpecificPageUrl6\": \"string\",\n \"AccountSpecificPageUrl7\": \"string\",\n \"AccountSpecificPageUrl8\": \"string\",\n \"AccountSpecificPageUrl9\": \"string\",\n \"AccountSpecificPageUrl10\": \"string\",\n \"RewardFulReferralId\": \"string\",\n \"ToltReferralId\": \"string\",\n \"TaxIds\": [],\n \"TaxStatus\": \"string\",\n \"AccountStageLabel\": \"string\",\n \"CurrentStripeProducts\": \"string\",\n \"CurrentStripeProductInstances\": [],\n \"CurrentSubscription\": {},\n \"DomainName\": \"string\",\n \"TenantBillingSystem\": 1,\n \"HasLoggedIn\": false,\n \"LatestSubscription\": {},\n \"LifetimeRevenue\": 0,\n \"NextStripeInvoiceDate\": \"string\",\n \"Nonce\": \"string\",\n \"PrimaryContact\": {},\n \"PrimarySubscription\": {},\n \"PrimaryStripeSubscription\": {},\n \"RecaptchaToken\": \"string\",\n \"StripeCheckoutMetadata\": {},\n \"StripeNextInvoiceSequence\": 0,\n \"StripePrice\": [],\n \"StripePriceIds\": \"string\",\n \"StripePromotionCode\": \"string\",\n \"TaxId\": \"string\",\n \"TaxIdIsInvalid\": false,\n \"TaxIdType\": \"string\",\n \"WebflowSlug\": \"string\"\n },\n \"AccountUid\": \"string\",\n \"BillingCycleAnchor\": \"string\",\n \"CollectionMethod\": \"string\",\n \"CustomerId\": \"string\",\n \"DaysUntilDue\": 0,\n \"ScheduleId\": \"string\",\n \"StripeDiscountIds\": [\n \"string\"\n ],\n \"StripePriceIds\": \"string\",\n \"TrialPeriodDays\": 0,\n \"CurrentStripeSubscriptionSchedule\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"ApplicationFeePercent\": 0,\n \"CancelAt\": \"string\",\n \"CancelAtPeriodEnd\": false,\n \"StripeSubscriptionCancellation\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Comment\": \"string\",\n \"Feedback\": \"string\",\n \"Reason\": \"string\",\n \"Account\": {},\n \"CancelationReason\": \"string\",\n \"LastProduct\": {},\n \"SubmittedDateTime\": \"string\",\n \"SubscribingStartDate\": \"string\"\n },\n \"Currency\": \"string\",\n \"EndedAt\": \"string\",\n \"PauseCollection_Behavior\": \"string\",\n \"PauseCollection_ResumesAt\": \"string\",\n \"StartDate\": \"string\",\n \"Status\": \"string\",\n \"TrialEnd\": \"string\",\n \"StripeDiscounts\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Account\": {},\n \"CheckoutSessionId\": \"string\",\n \"End\": \"string\",\n \"InvoiceId\": \"string\",\n \"InvoiceItemId\": \"string\",\n \"IsDeleted\": false,\n \"Start\": \"string\",\n \"StripeCoupon\": {},\n \"StripePromotionCode\": {},\n \"SubscriptionId\": \"string\",\n \"SubscriptionItemId\": \"string\",\n \"CouponId\": \"string\",\n \"CustomerId\": \"string\",\n \"StripeInvoice\": {},\n \"StripeSubscription\": {},\n \"PromotionCodeId\": \"string\"\n }\n ],\n \"StripeSubscriptionItems\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CurrentPeriodStart\": \"string\",\n \"CurrentPeriodEnd\": \"string\",\n \"StripeSubscription\": {},\n \"StripeDiscounts\": [],\n \"StripePrice\": {},\n \"Quantity\": 0,\n \"PriceId\": \"string\"\n }\n ],\n \"StripeSubscriptionSchedules\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n ],\n \"Account\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Name\": \"string\",\n \"ClientIdentifier\": \"string\",\n \"Currency\": \"string\",\n \"InvoiceNotes\": \"string\",\n \"IsDemo\": false,\n \"BillingAddress\": {},\n \"MailingAddress\": {},\n \"AccountStage\": 2,\n \"PaymentInformation\": {},\n \"PersonAccount\": [],\n \"StripeDefaultPaymentMethodId\": \"string\",\n \"StripeInvoices\": [],\n \"StripePaymentMethods\": [],\n \"StripeSubscriptions\": [],\n \"Subscriptions\": [],\n \"Deals\": [],\n \"LastLoginDateTime\": \"string\",\n \"AccountSpecificPageUrl1\": \"string\",\n \"AccountSpecificPageUrl2\": \"string\",\n \"AccountSpecificPageUrl3\": \"string\",\n \"AccountSpecificPageUrl4\": \"string\",\n \"AccountSpecificPageUrl5\": \"string\",\n \"AccountSpecificPageUrl6\": \"string\",\n \"AccountSpecificPageUrl7\": \"string\",\n \"AccountSpecificPageUrl8\": \"string\",\n \"AccountSpecificPageUrl9\": \"string\",\n \"AccountSpecificPageUrl10\": \"string\",\n \"RewardFulReferralId\": \"string\",\n \"ToltReferralId\": \"string\",\n \"TaxIds\": [],\n \"TaxStatus\": \"string\",\n \"AccountStageLabel\": \"string\",\n \"CurrentStripeProducts\": \"string\",\n \"CurrentStripeProductInstances\": [],\n \"CurrentSubscription\": {},\n \"DomainName\": \"string\",\n \"TenantBillingSystem\": 1,\n \"HasLoggedIn\": false,\n \"LatestSubscription\": {},\n \"LifetimeRevenue\": 0,\n \"NextStripeInvoiceDate\": \"string\",\n \"Nonce\": \"string\",\n \"PrimaryContact\": {},\n \"PrimarySubscription\": {},\n \"PrimaryStripeSubscription\": {},\n \"RecaptchaToken\": \"string\",\n \"StripeCheckoutMetadata\": {},\n \"StripeNextInvoiceSequence\": 0,\n \"StripePrice\": [],\n \"StripePriceIds\": \"string\",\n \"StripePromotionCode\": \"string\",\n \"TaxId\": \"string\",\n \"TaxIdIsInvalid\": false,\n \"TaxIdType\": \"string\",\n \"WebflowSlug\": \"string\"\n },\n \"AccountUid\": \"string\",\n \"BillingCycleAnchor\": \"string\",\n \"CollectionMethod\": \"string\",\n \"CustomerId\": \"string\",\n \"DaysUntilDue\": 0,\n \"ScheduleId\": \"string\",\n \"StripeDiscountIds\": [\n \"string\"\n ],\n \"StripePriceIds\": \"string\",\n \"TrialPeriodDays\": 0,\n \"CurrentStripeSubscriptionSchedule\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n}"
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"AmountDue": 0,
"AmountPaid": 0,
"AmountShipping": 0,
"AttemptCount": 0,
"Attempted": false,
"Currency": "string",
"Description": "string",
"FinalizedAt": "string",
"HostedInvoiceUrl": "string",
"InvoicePdf": "string",
"NextPaymentAttempt": "string",
"Number": "string",
"PeriodEnd": "string",
"PeriodStart": "string",
"Status": "string",
"StripeDiscounts": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Account": {},
"CheckoutSessionId": "string",
"End": "string",
"InvoiceId": "string",
"InvoiceItemId": "string",
"IsDeleted": false,
"Start": "string",
"StripeCoupon": {},
"StripePromotionCode": {},
"SubscriptionId": "string",
"SubscriptionItemId": "string",
"CouponId": "string",
"CustomerId": "string",
"StripeInvoice": {},
"StripeSubscription": {},
"PromotionCodeId": "string"
}
],
"StripeInvoiceDiscountAmounts": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Amount": 0,
"DiscountId": "string",
"StripeInvoice": {},
"CurrencyAmount": 0,
"StripeDiscount": {}
}
],
"StripeInvoiceLineItems": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"StripeInvoice": {},
"Amount": 0,
"Currency": "string",
"PeriodStart": "string",
"PeriodEnd": "string",
"Quantity": 0,
"StripeDiscounts": [],
"StripePrice": {},
"EndDate": "string",
"CurrencyAmount": 0,
"PriceId": "string",
"Proration": false
}
],
"StripeInvoicePayments": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"AmountPaid": 0,
"AmountRequested": 0,
"Currency": "string",
"Payment_ChargeId": "string",
"Payment_PaymentIntentId": "string",
"Payment_Type": "string",
"StripeInvoice": {},
"Status": "string",
"InvoiceId": "string",
"StripeCharges": []
}
],
"SubTotal": 0,
"SubTotalExcludingTax": 0,
"SubscriptionId": "string",
"Tax": 0,
"Total": 0,
"TotalExcludingTax": 0,
"Account": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Name": "string",
"ClientIdentifier": "string",
"Currency": "string",
"InvoiceNotes": "string",
"IsDemo": false,
"BillingAddress": {},
"MailingAddress": {},
"AccountStage": 2,
"PaymentInformation": {},
"PersonAccount": [],
"StripeDefaultPaymentMethodId": "string",
"StripeInvoices": [],
"StripePaymentMethods": [],
"StripeSubscriptions": [],
"Subscriptions": [],
"Deals": [],
"LastLoginDateTime": "string",
"AccountSpecificPageUrl1": "string",
"AccountSpecificPageUrl2": "string",
"AccountSpecificPageUrl3": "string",
"AccountSpecificPageUrl4": "string",
"AccountSpecificPageUrl5": "string",
"AccountSpecificPageUrl6": "string",
"AccountSpecificPageUrl7": "string",
"AccountSpecificPageUrl8": "string",
"AccountSpecificPageUrl9": "string",
"AccountSpecificPageUrl10": "string",
"RewardFulReferralId": "string",
"ToltReferralId": "string",
"TaxIds": [],
"TaxStatus": "string",
"AccountStageLabel": "string",
"CurrentStripeProducts": "string",
"CurrentStripeProductInstances": [],
"CurrentSubscription": {},
"DomainName": "string",
"TenantBillingSystem": 1,
"HasLoggedIn": false,
"LatestSubscription": {},
"LifetimeRevenue": 0,
"NextStripeInvoiceDate": "string",
"Nonce": "string",
"PrimaryContact": {},
"PrimarySubscription": {},
"PrimaryStripeSubscription": {},
"RecaptchaToken": "string",
"StripeCheckoutMetadata": {},
"StripeNextInvoiceSequence": 0,
"StripePrice": [],
"StripePriceIds": "string",
"StripePromotionCode": "string",
"TaxId": "string",
"TaxIdIsInvalid": false,
"TaxIdType": "string",
"WebflowSlug": "string"
},
"IsImported": false,
"IsRefunded": false,
"CurrencyAmountCreditedPostPayment": 0,
"CurrencyAmountCreditedPrePayment": 0,
"CurrencyAmountDue": 0,
"CurrencyAmountPaid": 0,
"CurrencySymbol": "string",
"CurrencyTotal": 0,
"CurrencyTotalExcludingTax": 0,
"CurrencySubTotal": 0,
"CurrencySubTotalExcludingTax": 0,
"CurrencyTax": 0,
"DaysUntilDue": 0,
"CustomerId": "string",
"PaymentStatus": "string",
"StripeCreditNotes": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Currency": "string",
"CustomerId": "string",
"InvoiceId": "string",
"OutOfBandAmount": 0,
"PostPaymentAmount": 0,
"PrePaymentAmount": 0,
"Reason": "string",
"Status": "string",
"Total": 0,
"Type": "string",
"CurrencySymbol": "string",
"CurrencyTotal": 0
}
],
"StripePaymentMethodId": "string"
}Preview the invoice that a subscription change would create, without making the
Preview the invoice that a subscription change would create, without making the change. The request body is the same as for the change. Pass asOf in the query string to preview the change at a later date (default: now). A user token can only preview a change on its own account, and only as the account’s primary contact.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"ApplicationFeePercent": 0,
"CancelAt": "string",
"CancelAtPeriodEnd": false,
"StripeSubscriptionCancellation": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Comment": "string",
"Feedback": "string",
"Reason": "string",
"Account": {},
"CancelationReason": "string",
"LastProduct": {},
"SubmittedDateTime": "string",
"SubscribingStartDate": "string"
},
"Currency": "string",
"EndedAt": "string",
"PauseCollection_Behavior": "string",
"PauseCollection_ResumesAt": "string",
"StartDate": "string",
"Status": "string",
"TrialEnd": "string",
"StripeDiscounts": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Account": {},
"CheckoutSessionId": "string",
"End": "string",
"InvoiceId": "string",
"InvoiceItemId": "string",
"IsDeleted": false,
"Start": "string",
"StripeCoupon": {},
"StripePromotionCode": {},
"SubscriptionId": "string",
"SubscriptionItemId": "string",
"CouponId": "string",
"CustomerId": "string",
"StripeInvoice": {},
"StripeSubscription": {},
"PromotionCodeId": "string"
}
],
"StripeSubscriptionItems": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"CurrentPeriodStart": "string",
"CurrentPeriodEnd": "string",
"StripeSubscription": {},
"StripeDiscounts": [],
"StripePrice": {},
"Quantity": 0,
"PriceId": "string"
}
],
"StripeSubscriptionSchedules": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"CompletedAt": "string",
"CurrentPhase_EndDate": "string",
"CurrentPhase_StartDate": "string",
"EndBehavior": "string",
"StripeSubscriptionSchedulePhases": [],
"ReleasedAt": "string",
"Status": "string",
"StripeSubscription": {},
"SubscriptionId": "string",
"ReleasedSubscriptionId": "string"
}
],
"Account": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Name": "string",
"ClientIdentifier": "string",
"Currency": "string",
"InvoiceNotes": "string",
"IsDemo": false,
"BillingAddress": {},
"MailingAddress": {},
"AccountStage": 2,
"PaymentInformation": {},
"PersonAccount": [],
"StripeDefaultPaymentMethodId": "string",
"StripeInvoices": [],
"StripePaymentMethods": [],
"StripeSubscriptions": [],
"Subscriptions": [],
"Deals": [],
"LastLoginDateTime": "string",
"AccountSpecificPageUrl1": "string",
"AccountSpecificPageUrl2": "string",
"AccountSpecificPageUrl3": "string",
"AccountSpecificPageUrl4": "string",
"AccountSpecificPageUrl5": "string",
"AccountSpecificPageUrl6": "string",
"AccountSpecificPageUrl7": "string",
"AccountSpecificPageUrl8": "string",
"AccountSpecificPageUrl9": "string",
"AccountSpecificPageUrl10": "string",
"RewardFulReferralId": "string",
"ToltReferralId": "string",
"TaxIds": [],
"TaxStatus": "string",
"AccountStageLabel": "string",
"CurrentStripeProducts": "string",
"CurrentStripeProductInstances": [],
"CurrentSubscription": {},
"DomainName": "string",
"TenantBillingSystem": 1,
"HasLoggedIn": false,
"LatestSubscription": {},
"LifetimeRevenue": 0,
"NextStripeInvoiceDate": "string",
"Nonce": "string",
"PrimaryContact": {},
"PrimarySubscription": {},
"PrimaryStripeSubscription": {},
"RecaptchaToken": "string",
"StripeCheckoutMetadata": {},
"StripeNextInvoiceSequence": 0,
"StripePrice": [],
"StripePriceIds": "string",
"StripePromotionCode": "string",
"TaxId": "string",
"TaxIdIsInvalid": false,
"TaxIdType": "string",
"WebflowSlug": "string"
},
"AccountUid": "string",
"BillingCycleAnchor": "string",
"CollectionMethod": "string",
"CustomerId": "string",
"DaysUntilDue": 0,
"ScheduleId": "string",
"StripeDiscountIds": [
"string"
],
"StripePriceIds": "string",
"TrialPeriodDays": 0,
"CurrentStripeSubscriptionSchedule": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"CompletedAt": "string",
"CurrentPhase_EndDate": "string",
"CurrentPhase_StartDate": "string",
"EndBehavior": "string",
"StripeSubscriptionSchedulePhases": [],
"ReleasedAt": "string",
"Status": "string",
"StripeSubscription": {},
"SubscriptionId": "string",
"ReleasedSubscriptionId": "string"
}
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview"
payload = {
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"ApplicationFeePercent": 0,
"CancelAt": "string",
"CancelAtPeriodEnd": False,
"StripeSubscriptionCancellation": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Comment": "string",
"Feedback": "string",
"Reason": "string",
"Account": {},
"CancelationReason": "string",
"LastProduct": {},
"SubmittedDateTime": "string",
"SubscribingStartDate": "string"
},
"Currency": "string",
"EndedAt": "string",
"PauseCollection_Behavior": "string",
"PauseCollection_ResumesAt": "string",
"StartDate": "string",
"Status": "string",
"TrialEnd": "string",
"StripeDiscounts": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"Account": {},
"CheckoutSessionId": "string",
"End": "string",
"InvoiceId": "string",
"InvoiceItemId": "string",
"IsDeleted": False,
"Start": "string",
"StripeCoupon": {},
"StripePromotionCode": {},
"SubscriptionId": "string",
"SubscriptionItemId": "string",
"CouponId": "string",
"CustomerId": "string",
"StripeInvoice": {},
"StripeSubscription": {},
"PromotionCodeId": "string"
}
],
"StripeSubscriptionItems": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"CurrentPeriodStart": "string",
"CurrentPeriodEnd": "string",
"StripeSubscription": {},
"StripeDiscounts": [],
"StripePrice": {},
"Quantity": 0,
"PriceId": "string"
}
],
"StripeSubscriptionSchedules": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"CompletedAt": "string",
"CurrentPhase_EndDate": "string",
"CurrentPhase_StartDate": "string",
"EndBehavior": "string",
"StripeSubscriptionSchedulePhases": [],
"ReleasedAt": "string",
"Status": "string",
"StripeSubscription": {},
"SubscriptionId": "string",
"ReleasedSubscriptionId": "string"
}
],
"Account": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"Name": "string",
"ClientIdentifier": "string",
"Currency": "string",
"InvoiceNotes": "string",
"IsDemo": False,
"BillingAddress": {},
"MailingAddress": {},
"AccountStage": 2,
"PaymentInformation": {},
"PersonAccount": [],
"StripeDefaultPaymentMethodId": "string",
"StripeInvoices": [],
"StripePaymentMethods": [],
"StripeSubscriptions": [],
"Subscriptions": [],
"Deals": [],
"LastLoginDateTime": "string",
"AccountSpecificPageUrl1": "string",
"AccountSpecificPageUrl2": "string",
"AccountSpecificPageUrl3": "string",
"AccountSpecificPageUrl4": "string",
"AccountSpecificPageUrl5": "string",
"AccountSpecificPageUrl6": "string",
"AccountSpecificPageUrl7": "string",
"AccountSpecificPageUrl8": "string",
"AccountSpecificPageUrl9": "string",
"AccountSpecificPageUrl10": "string",
"RewardFulReferralId": "string",
"ToltReferralId": "string",
"TaxIds": [],
"TaxStatus": "string",
"AccountStageLabel": "string",
"CurrentStripeProducts": "string",
"CurrentStripeProductInstances": [],
"CurrentSubscription": {},
"DomainName": "string",
"TenantBillingSystem": 1,
"HasLoggedIn": False,
"LatestSubscription": {},
"LifetimeRevenue": 0,
"NextStripeInvoiceDate": "string",
"Nonce": "string",
"PrimaryContact": {},
"PrimarySubscription": {},
"PrimaryStripeSubscription": {},
"RecaptchaToken": "string",
"StripeCheckoutMetadata": {},
"StripeNextInvoiceSequence": 0,
"StripePrice": [],
"StripePriceIds": "string",
"StripePromotionCode": "string",
"TaxId": "string",
"TaxIdIsInvalid": False,
"TaxIdType": "string",
"WebflowSlug": "string"
},
"AccountUid": "string",
"BillingCycleAnchor": "string",
"CollectionMethod": "string",
"CustomerId": "string",
"DaysUntilDue": 0,
"ScheduleId": "string",
"StripeDiscountIds": ["string"],
"StripePriceIds": "string",
"TrialPeriodDays": 0,
"CurrentStripeSubscriptionSchedule": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": False,
"CompletedAt": "string",
"CurrentPhase_EndDate": "string",
"CurrentPhase_StartDate": "string",
"EndBehavior": "string",
"StripeSubscriptionSchedulePhases": [],
"ReleasedAt": "string",
"Status": "string",
"StripeSubscription": {},
"SubscriptionId": "string",
"ReleasedSubscriptionId": "string"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
Uid: 'string',
_objectType: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
ApplicationFeePercent: 0,
CancelAt: 'string',
CancelAtPeriodEnd: false,
StripeSubscriptionCancellation: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
Comment: 'string',
Feedback: 'string',
Reason: 'string',
Account: {},
CancelationReason: 'string',
LastProduct: {},
SubmittedDateTime: 'string',
SubscribingStartDate: 'string'
},
Currency: 'string',
EndedAt: 'string',
PauseCollection_Behavior: 'string',
PauseCollection_ResumesAt: 'string',
StartDate: 'string',
Status: 'string',
TrialEnd: 'string',
StripeDiscounts: [
{
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
Account: {},
CheckoutSessionId: 'string',
End: 'string',
InvoiceId: 'string',
InvoiceItemId: 'string',
IsDeleted: false,
Start: 'string',
StripeCoupon: {},
StripePromotionCode: {},
SubscriptionId: 'string',
SubscriptionItemId: 'string',
CouponId: 'string',
CustomerId: 'string',
StripeInvoice: {},
StripeSubscription: {},
PromotionCodeId: 'string'
}
],
StripeSubscriptionItems: [
{
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
CurrentPeriodStart: 'string',
CurrentPeriodEnd: 'string',
StripeSubscription: {},
StripeDiscounts: [],
StripePrice: {},
Quantity: 0,
PriceId: 'string'
}
],
StripeSubscriptionSchedules: [
{
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
CompletedAt: 'string',
CurrentPhase_EndDate: 'string',
CurrentPhase_StartDate: 'string',
EndBehavior: 'string',
StripeSubscriptionSchedulePhases: [],
ReleasedAt: 'string',
Status: 'string',
StripeSubscription: {},
SubscriptionId: 'string',
ReleasedSubscriptionId: 'string'
}
],
Account: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
Name: 'string',
ClientIdentifier: 'string',
Currency: 'string',
InvoiceNotes: 'string',
IsDemo: false,
BillingAddress: {},
MailingAddress: {},
AccountStage: 2,
PaymentInformation: {},
PersonAccount: [],
StripeDefaultPaymentMethodId: 'string',
StripeInvoices: [],
StripePaymentMethods: [],
StripeSubscriptions: [],
Subscriptions: [],
Deals: [],
LastLoginDateTime: 'string',
AccountSpecificPageUrl1: 'string',
AccountSpecificPageUrl2: 'string',
AccountSpecificPageUrl3: 'string',
AccountSpecificPageUrl4: 'string',
AccountSpecificPageUrl5: 'string',
AccountSpecificPageUrl6: 'string',
AccountSpecificPageUrl7: 'string',
AccountSpecificPageUrl8: 'string',
AccountSpecificPageUrl9: 'string',
AccountSpecificPageUrl10: 'string',
RewardFulReferralId: 'string',
ToltReferralId: 'string',
TaxIds: [],
TaxStatus: 'string',
AccountStageLabel: 'string',
CurrentStripeProducts: 'string',
CurrentStripeProductInstances: [],
CurrentSubscription: {},
DomainName: 'string',
TenantBillingSystem: 1,
HasLoggedIn: false,
LatestSubscription: {},
LifetimeRevenue: 0,
NextStripeInvoiceDate: 'string',
Nonce: 'string',
PrimaryContact: {},
PrimarySubscription: {},
PrimaryStripeSubscription: {},
RecaptchaToken: 'string',
StripeCheckoutMetadata: {},
StripeNextInvoiceSequence: 0,
StripePrice: [],
StripePriceIds: 'string',
StripePromotionCode: 'string',
TaxId: 'string',
TaxIdIsInvalid: false,
TaxIdType: 'string',
WebflowSlug: 'string'
},
AccountUid: 'string',
BillingCycleAnchor: 'string',
CollectionMethod: 'string',
CustomerId: 'string',
DaysUntilDue: 0,
ScheduleId: 'string',
StripeDiscountIds: ['string'],
StripePriceIds: 'string',
TrialPeriodDays: 0,
CurrentStripeSubscriptionSchedule: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
SchemaLessData: {},
StripeId: 'string',
IsLivemode: false,
CompletedAt: 'string',
CurrentPhase_EndDate: 'string',
CurrentPhase_StartDate: 'string',
EndBehavior: 'string',
StripeSubscriptionSchedulePhases: [],
ReleasedAt: 'string',
Status: 'string',
StripeSubscription: {},
SubscriptionId: 'string',
ReleasedSubscriptionId: 'string'
}
})
};
fetch('https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Uid' => 'string',
'_objectType' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'ApplicationFeePercent' => 0,
'CancelAt' => 'string',
'CancelAtPeriodEnd' => false,
'StripeSubscriptionCancellation' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'Comment' => 'string',
'Feedback' => 'string',
'Reason' => 'string',
'Account' => [
],
'CancelationReason' => 'string',
'LastProduct' => [
],
'SubmittedDateTime' => 'string',
'SubscribingStartDate' => 'string'
],
'Currency' => 'string',
'EndedAt' => 'string',
'PauseCollection_Behavior' => 'string',
'PauseCollection_ResumesAt' => 'string',
'StartDate' => 'string',
'Status' => 'string',
'TrialEnd' => 'string',
'StripeDiscounts' => [
[
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'Account' => [
],
'CheckoutSessionId' => 'string',
'End' => 'string',
'InvoiceId' => 'string',
'InvoiceItemId' => 'string',
'IsDeleted' => false,
'Start' => 'string',
'StripeCoupon' => [
],
'StripePromotionCode' => [
],
'SubscriptionId' => 'string',
'SubscriptionItemId' => 'string',
'CouponId' => 'string',
'CustomerId' => 'string',
'StripeInvoice' => [
],
'StripeSubscription' => [
],
'PromotionCodeId' => 'string'
]
],
'StripeSubscriptionItems' => [
[
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'CurrentPeriodStart' => 'string',
'CurrentPeriodEnd' => 'string',
'StripeSubscription' => [
],
'StripeDiscounts' => [
],
'StripePrice' => [
],
'Quantity' => 0,
'PriceId' => 'string'
]
],
'StripeSubscriptionSchedules' => [
[
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'CompletedAt' => 'string',
'CurrentPhase_EndDate' => 'string',
'CurrentPhase_StartDate' => 'string',
'EndBehavior' => 'string',
'StripeSubscriptionSchedulePhases' => [
],
'ReleasedAt' => 'string',
'Status' => 'string',
'StripeSubscription' => [
],
'SubscriptionId' => 'string',
'ReleasedSubscriptionId' => 'string'
]
],
'Account' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'Name' => 'string',
'ClientIdentifier' => 'string',
'Currency' => 'string',
'InvoiceNotes' => 'string',
'IsDemo' => false,
'BillingAddress' => [
],
'MailingAddress' => [
],
'AccountStage' => 2,
'PaymentInformation' => [
],
'PersonAccount' => [
],
'StripeDefaultPaymentMethodId' => 'string',
'StripeInvoices' => [
],
'StripePaymentMethods' => [
],
'StripeSubscriptions' => [
],
'Subscriptions' => [
],
'Deals' => [
],
'LastLoginDateTime' => 'string',
'AccountSpecificPageUrl1' => 'string',
'AccountSpecificPageUrl2' => 'string',
'AccountSpecificPageUrl3' => 'string',
'AccountSpecificPageUrl4' => 'string',
'AccountSpecificPageUrl5' => 'string',
'AccountSpecificPageUrl6' => 'string',
'AccountSpecificPageUrl7' => 'string',
'AccountSpecificPageUrl8' => 'string',
'AccountSpecificPageUrl9' => 'string',
'AccountSpecificPageUrl10' => 'string',
'RewardFulReferralId' => 'string',
'ToltReferralId' => 'string',
'TaxIds' => [
],
'TaxStatus' => 'string',
'AccountStageLabel' => 'string',
'CurrentStripeProducts' => 'string',
'CurrentStripeProductInstances' => [
],
'CurrentSubscription' => [
],
'DomainName' => 'string',
'TenantBillingSystem' => 1,
'HasLoggedIn' => false,
'LatestSubscription' => [
],
'LifetimeRevenue' => 0,
'NextStripeInvoiceDate' => 'string',
'Nonce' => 'string',
'PrimaryContact' => [
],
'PrimarySubscription' => [
],
'PrimaryStripeSubscription' => [
],
'RecaptchaToken' => 'string',
'StripeCheckoutMetadata' => [
],
'StripeNextInvoiceSequence' => 0,
'StripePrice' => [
],
'StripePriceIds' => 'string',
'StripePromotionCode' => 'string',
'TaxId' => 'string',
'TaxIdIsInvalid' => false,
'TaxIdType' => 'string',
'WebflowSlug' => 'string'
],
'AccountUid' => 'string',
'BillingCycleAnchor' => 'string',
'CollectionMethod' => 'string',
'CustomerId' => 'string',
'DaysUntilDue' => 0,
'ScheduleId' => 'string',
'StripeDiscountIds' => [
'string'
],
'StripePriceIds' => 'string',
'TrialPeriodDays' => 0,
'CurrentStripeSubscriptionSchedule' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'SchemaLessData' => [
],
'StripeId' => 'string',
'IsLivemode' => false,
'CompletedAt' => 'string',
'CurrentPhase_EndDate' => 'string',
'CurrentPhase_StartDate' => 'string',
'EndBehavior' => 'string',
'StripeSubscriptionSchedulePhases' => [
],
'ReleasedAt' => 'string',
'Status' => 'string',
'StripeSubscription' => [
],
'SubscriptionId' => 'string',
'ReleasedSubscriptionId' => 'string'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview"
payload := strings.NewReader("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"ApplicationFeePercent\": 0,\n \"CancelAt\": \"string\",\n \"CancelAtPeriodEnd\": false,\n \"StripeSubscriptionCancellation\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Comment\": \"string\",\n \"Feedback\": \"string\",\n \"Reason\": \"string\",\n \"Account\": {},\n \"CancelationReason\": \"string\",\n \"LastProduct\": {},\n \"SubmittedDateTime\": \"string\",\n \"SubscribingStartDate\": \"string\"\n },\n \"Currency\": \"string\",\n \"EndedAt\": \"string\",\n \"PauseCollection_Behavior\": \"string\",\n \"PauseCollection_ResumesAt\": \"string\",\n \"StartDate\": \"string\",\n \"Status\": \"string\",\n \"TrialEnd\": \"string\",\n \"StripeDiscounts\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Account\": {},\n \"CheckoutSessionId\": \"string\",\n \"End\": \"string\",\n \"InvoiceId\": \"string\",\n \"InvoiceItemId\": \"string\",\n \"IsDeleted\": false,\n \"Start\": \"string\",\n \"StripeCoupon\": {},\n \"StripePromotionCode\": {},\n \"SubscriptionId\": \"string\",\n \"SubscriptionItemId\": \"string\",\n \"CouponId\": \"string\",\n \"CustomerId\": \"string\",\n \"StripeInvoice\": {},\n \"StripeSubscription\": {},\n \"PromotionCodeId\": \"string\"\n }\n ],\n \"StripeSubscriptionItems\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CurrentPeriodStart\": \"string\",\n \"CurrentPeriodEnd\": \"string\",\n \"StripeSubscription\": {},\n \"StripeDiscounts\": [],\n \"StripePrice\": {},\n \"Quantity\": 0,\n \"PriceId\": \"string\"\n }\n ],\n \"StripeSubscriptionSchedules\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n ],\n \"Account\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Name\": \"string\",\n \"ClientIdentifier\": \"string\",\n \"Currency\": \"string\",\n \"InvoiceNotes\": \"string\",\n \"IsDemo\": false,\n \"BillingAddress\": {},\n \"MailingAddress\": {},\n \"AccountStage\": 2,\n \"PaymentInformation\": {},\n \"PersonAccount\": [],\n \"StripeDefaultPaymentMethodId\": \"string\",\n \"StripeInvoices\": [],\n \"StripePaymentMethods\": [],\n \"StripeSubscriptions\": [],\n \"Subscriptions\": [],\n \"Deals\": [],\n \"LastLoginDateTime\": \"string\",\n \"AccountSpecificPageUrl1\": \"string\",\n \"AccountSpecificPageUrl2\": \"string\",\n \"AccountSpecificPageUrl3\": \"string\",\n \"AccountSpecificPageUrl4\": \"string\",\n \"AccountSpecificPageUrl5\": \"string\",\n \"AccountSpecificPageUrl6\": \"string\",\n \"AccountSpecificPageUrl7\": \"string\",\n \"AccountSpecificPageUrl8\": \"string\",\n \"AccountSpecificPageUrl9\": \"string\",\n \"AccountSpecificPageUrl10\": \"string\",\n \"RewardFulReferralId\": \"string\",\n \"ToltReferralId\": \"string\",\n \"TaxIds\": [],\n \"TaxStatus\": \"string\",\n \"AccountStageLabel\": \"string\",\n \"CurrentStripeProducts\": \"string\",\n \"CurrentStripeProductInstances\": [],\n \"CurrentSubscription\": {},\n \"DomainName\": \"string\",\n \"TenantBillingSystem\": 1,\n \"HasLoggedIn\": false,\n \"LatestSubscription\": {},\n \"LifetimeRevenue\": 0,\n \"NextStripeInvoiceDate\": \"string\",\n \"Nonce\": \"string\",\n \"PrimaryContact\": {},\n \"PrimarySubscription\": {},\n \"PrimaryStripeSubscription\": {},\n \"RecaptchaToken\": \"string\",\n \"StripeCheckoutMetadata\": {},\n \"StripeNextInvoiceSequence\": 0,\n \"StripePrice\": [],\n \"StripePriceIds\": \"string\",\n \"StripePromotionCode\": \"string\",\n \"TaxId\": \"string\",\n \"TaxIdIsInvalid\": false,\n \"TaxIdType\": \"string\",\n \"WebflowSlug\": \"string\"\n },\n \"AccountUid\": \"string\",\n \"BillingCycleAnchor\": \"string\",\n \"CollectionMethod\": \"string\",\n \"CustomerId\": \"string\",\n \"DaysUntilDue\": 0,\n \"ScheduleId\": \"string\",\n \"StripeDiscountIds\": [\n \"string\"\n ],\n \"StripePriceIds\": \"string\",\n \"TrialPeriodDays\": 0,\n \"CurrentStripeSubscriptionSchedule\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"ApplicationFeePercent\": 0,\n \"CancelAt\": \"string\",\n \"CancelAtPeriodEnd\": false,\n \"StripeSubscriptionCancellation\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Comment\": \"string\",\n \"Feedback\": \"string\",\n \"Reason\": \"string\",\n \"Account\": {},\n \"CancelationReason\": \"string\",\n \"LastProduct\": {},\n \"SubmittedDateTime\": \"string\",\n \"SubscribingStartDate\": \"string\"\n },\n \"Currency\": \"string\",\n \"EndedAt\": \"string\",\n \"PauseCollection_Behavior\": \"string\",\n \"PauseCollection_ResumesAt\": \"string\",\n \"StartDate\": \"string\",\n \"Status\": \"string\",\n \"TrialEnd\": \"string\",\n \"StripeDiscounts\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Account\": {},\n \"CheckoutSessionId\": \"string\",\n \"End\": \"string\",\n \"InvoiceId\": \"string\",\n \"InvoiceItemId\": \"string\",\n \"IsDeleted\": false,\n \"Start\": \"string\",\n \"StripeCoupon\": {},\n \"StripePromotionCode\": {},\n \"SubscriptionId\": \"string\",\n \"SubscriptionItemId\": \"string\",\n \"CouponId\": \"string\",\n \"CustomerId\": \"string\",\n \"StripeInvoice\": {},\n \"StripeSubscription\": {},\n \"PromotionCodeId\": \"string\"\n }\n ],\n \"StripeSubscriptionItems\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CurrentPeriodStart\": \"string\",\n \"CurrentPeriodEnd\": \"string\",\n \"StripeSubscription\": {},\n \"StripeDiscounts\": [],\n \"StripePrice\": {},\n \"Quantity\": 0,\n \"PriceId\": \"string\"\n }\n ],\n \"StripeSubscriptionSchedules\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n ],\n \"Account\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Name\": \"string\",\n \"ClientIdentifier\": \"string\",\n \"Currency\": \"string\",\n \"InvoiceNotes\": \"string\",\n \"IsDemo\": false,\n \"BillingAddress\": {},\n \"MailingAddress\": {},\n \"AccountStage\": 2,\n \"PaymentInformation\": {},\n \"PersonAccount\": [],\n \"StripeDefaultPaymentMethodId\": \"string\",\n \"StripeInvoices\": [],\n \"StripePaymentMethods\": [],\n \"StripeSubscriptions\": [],\n \"Subscriptions\": [],\n \"Deals\": [],\n \"LastLoginDateTime\": \"string\",\n \"AccountSpecificPageUrl1\": \"string\",\n \"AccountSpecificPageUrl2\": \"string\",\n \"AccountSpecificPageUrl3\": \"string\",\n \"AccountSpecificPageUrl4\": \"string\",\n \"AccountSpecificPageUrl5\": \"string\",\n \"AccountSpecificPageUrl6\": \"string\",\n \"AccountSpecificPageUrl7\": \"string\",\n \"AccountSpecificPageUrl8\": \"string\",\n \"AccountSpecificPageUrl9\": \"string\",\n \"AccountSpecificPageUrl10\": \"string\",\n \"RewardFulReferralId\": \"string\",\n \"ToltReferralId\": \"string\",\n \"TaxIds\": [],\n \"TaxStatus\": \"string\",\n \"AccountStageLabel\": \"string\",\n \"CurrentStripeProducts\": \"string\",\n \"CurrentStripeProductInstances\": [],\n \"CurrentSubscription\": {},\n \"DomainName\": \"string\",\n \"TenantBillingSystem\": 1,\n \"HasLoggedIn\": false,\n \"LatestSubscription\": {},\n \"LifetimeRevenue\": 0,\n \"NextStripeInvoiceDate\": \"string\",\n \"Nonce\": \"string\",\n \"PrimaryContact\": {},\n \"PrimarySubscription\": {},\n \"PrimaryStripeSubscription\": {},\n \"RecaptchaToken\": \"string\",\n \"StripeCheckoutMetadata\": {},\n \"StripeNextInvoiceSequence\": 0,\n \"StripePrice\": [],\n \"StripePriceIds\": \"string\",\n \"StripePromotionCode\": \"string\",\n \"TaxId\": \"string\",\n \"TaxIdIsInvalid\": false,\n \"TaxIdType\": \"string\",\n \"WebflowSlug\": \"string\"\n },\n \"AccountUid\": \"string\",\n \"BillingCycleAnchor\": \"string\",\n \"CollectionMethod\": \"string\",\n \"CustomerId\": \"string\",\n \"DaysUntilDue\": 0,\n \"ScheduleId\": \"string\",\n \"StripeDiscountIds\": [\n \"string\"\n ],\n \"StripePriceIds\": \"string\",\n \"TrialPeriodDays\": 0,\n \"CurrentStripeSubscriptionSchedule\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/billing/stripe/subscriptions/{subscriptionUid}/change-preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"ApplicationFeePercent\": 0,\n \"CancelAt\": \"string\",\n \"CancelAtPeriodEnd\": false,\n \"StripeSubscriptionCancellation\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"Comment\": \"string\",\n \"Feedback\": \"string\",\n \"Reason\": \"string\",\n \"Account\": {},\n \"CancelationReason\": \"string\",\n \"LastProduct\": {},\n \"SubmittedDateTime\": \"string\",\n \"SubscribingStartDate\": \"string\"\n },\n \"Currency\": \"string\",\n \"EndedAt\": \"string\",\n \"PauseCollection_Behavior\": \"string\",\n \"PauseCollection_ResumesAt\": \"string\",\n \"StartDate\": \"string\",\n \"Status\": \"string\",\n \"TrialEnd\": \"string\",\n \"StripeDiscounts\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Account\": {},\n \"CheckoutSessionId\": \"string\",\n \"End\": \"string\",\n \"InvoiceId\": \"string\",\n \"InvoiceItemId\": \"string\",\n \"IsDeleted\": false,\n \"Start\": \"string\",\n \"StripeCoupon\": {},\n \"StripePromotionCode\": {},\n \"SubscriptionId\": \"string\",\n \"SubscriptionItemId\": \"string\",\n \"CouponId\": \"string\",\n \"CustomerId\": \"string\",\n \"StripeInvoice\": {},\n \"StripeSubscription\": {},\n \"PromotionCodeId\": \"string\"\n }\n ],\n \"StripeSubscriptionItems\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CurrentPeriodStart\": \"string\",\n \"CurrentPeriodEnd\": \"string\",\n \"StripeSubscription\": {},\n \"StripeDiscounts\": [],\n \"StripePrice\": {},\n \"Quantity\": 0,\n \"PriceId\": \"string\"\n }\n ],\n \"StripeSubscriptionSchedules\": [\n {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n ],\n \"Account\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"Name\": \"string\",\n \"ClientIdentifier\": \"string\",\n \"Currency\": \"string\",\n \"InvoiceNotes\": \"string\",\n \"IsDemo\": false,\n \"BillingAddress\": {},\n \"MailingAddress\": {},\n \"AccountStage\": 2,\n \"PaymentInformation\": {},\n \"PersonAccount\": [],\n \"StripeDefaultPaymentMethodId\": \"string\",\n \"StripeInvoices\": [],\n \"StripePaymentMethods\": [],\n \"StripeSubscriptions\": [],\n \"Subscriptions\": [],\n \"Deals\": [],\n \"LastLoginDateTime\": \"string\",\n \"AccountSpecificPageUrl1\": \"string\",\n \"AccountSpecificPageUrl2\": \"string\",\n \"AccountSpecificPageUrl3\": \"string\",\n \"AccountSpecificPageUrl4\": \"string\",\n \"AccountSpecificPageUrl5\": \"string\",\n \"AccountSpecificPageUrl6\": \"string\",\n \"AccountSpecificPageUrl7\": \"string\",\n \"AccountSpecificPageUrl8\": \"string\",\n \"AccountSpecificPageUrl9\": \"string\",\n \"AccountSpecificPageUrl10\": \"string\",\n \"RewardFulReferralId\": \"string\",\n \"ToltReferralId\": \"string\",\n \"TaxIds\": [],\n \"TaxStatus\": \"string\",\n \"AccountStageLabel\": \"string\",\n \"CurrentStripeProducts\": \"string\",\n \"CurrentStripeProductInstances\": [],\n \"CurrentSubscription\": {},\n \"DomainName\": \"string\",\n \"TenantBillingSystem\": 1,\n \"HasLoggedIn\": false,\n \"LatestSubscription\": {},\n \"LifetimeRevenue\": 0,\n \"NextStripeInvoiceDate\": \"string\",\n \"Nonce\": \"string\",\n \"PrimaryContact\": {},\n \"PrimarySubscription\": {},\n \"PrimaryStripeSubscription\": {},\n \"RecaptchaToken\": \"string\",\n \"StripeCheckoutMetadata\": {},\n \"StripeNextInvoiceSequence\": 0,\n \"StripePrice\": [],\n \"StripePriceIds\": \"string\",\n \"StripePromotionCode\": \"string\",\n \"TaxId\": \"string\",\n \"TaxIdIsInvalid\": false,\n \"TaxIdType\": \"string\",\n \"WebflowSlug\": \"string\"\n },\n \"AccountUid\": \"string\",\n \"BillingCycleAnchor\": \"string\",\n \"CollectionMethod\": \"string\",\n \"CustomerId\": \"string\",\n \"DaysUntilDue\": 0,\n \"ScheduleId\": \"string\",\n \"StripeDiscountIds\": [\n \"string\"\n ],\n \"StripePriceIds\": \"string\",\n \"TrialPeriodDays\": 0,\n \"CurrentStripeSubscriptionSchedule\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"SchemaLessData\": {},\n \"StripeId\": \"string\",\n \"IsLivemode\": false,\n \"CompletedAt\": \"string\",\n \"CurrentPhase_EndDate\": \"string\",\n \"CurrentPhase_StartDate\": \"string\",\n \"EndBehavior\": \"string\",\n \"StripeSubscriptionSchedulePhases\": [],\n \"ReleasedAt\": \"string\",\n \"Status\": \"string\",\n \"StripeSubscription\": {},\n \"SubscriptionId\": \"string\",\n \"ReleasedSubscriptionId\": \"string\"\n }\n}"
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"AmountDue": 0,
"AmountPaid": 0,
"AmountShipping": 0,
"AttemptCount": 0,
"Attempted": false,
"Currency": "string",
"Description": "string",
"FinalizedAt": "string",
"HostedInvoiceUrl": "string",
"InvoicePdf": "string",
"NextPaymentAttempt": "string",
"Number": "string",
"PeriodEnd": "string",
"PeriodStart": "string",
"Status": "string",
"StripeDiscounts": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Account": {},
"CheckoutSessionId": "string",
"End": "string",
"InvoiceId": "string",
"InvoiceItemId": "string",
"IsDeleted": false,
"Start": "string",
"StripeCoupon": {},
"StripePromotionCode": {},
"SubscriptionId": "string",
"SubscriptionItemId": "string",
"CouponId": "string",
"CustomerId": "string",
"StripeInvoice": {},
"StripeSubscription": {},
"PromotionCodeId": "string"
}
],
"StripeInvoiceDiscountAmounts": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Amount": 0,
"DiscountId": "string",
"StripeInvoice": {},
"CurrencyAmount": 0,
"StripeDiscount": {}
}
],
"StripeInvoiceLineItems": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"StripeInvoice": {},
"Amount": 0,
"Currency": "string",
"PeriodStart": "string",
"PeriodEnd": "string",
"Quantity": 0,
"StripeDiscounts": [],
"StripePrice": {},
"EndDate": "string",
"CurrencyAmount": 0,
"PriceId": "string",
"Proration": false
}
],
"StripeInvoicePayments": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"AmountPaid": 0,
"AmountRequested": 0,
"Currency": "string",
"Payment_ChargeId": "string",
"Payment_PaymentIntentId": "string",
"Payment_Type": "string",
"StripeInvoice": {},
"Status": "string",
"InvoiceId": "string",
"StripeCharges": []
}
],
"SubTotal": 0,
"SubTotalExcludingTax": 0,
"SubscriptionId": "string",
"Tax": 0,
"Total": 0,
"TotalExcludingTax": 0,
"Account": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Name": "string",
"ClientIdentifier": "string",
"Currency": "string",
"InvoiceNotes": "string",
"IsDemo": false,
"BillingAddress": {},
"MailingAddress": {},
"AccountStage": 2,
"PaymentInformation": {},
"PersonAccount": [],
"StripeDefaultPaymentMethodId": "string",
"StripeInvoices": [],
"StripePaymentMethods": [],
"StripeSubscriptions": [],
"Subscriptions": [],
"Deals": [],
"LastLoginDateTime": "string",
"AccountSpecificPageUrl1": "string",
"AccountSpecificPageUrl2": "string",
"AccountSpecificPageUrl3": "string",
"AccountSpecificPageUrl4": "string",
"AccountSpecificPageUrl5": "string",
"AccountSpecificPageUrl6": "string",
"AccountSpecificPageUrl7": "string",
"AccountSpecificPageUrl8": "string",
"AccountSpecificPageUrl9": "string",
"AccountSpecificPageUrl10": "string",
"RewardFulReferralId": "string",
"ToltReferralId": "string",
"TaxIds": [],
"TaxStatus": "string",
"AccountStageLabel": "string",
"CurrentStripeProducts": "string",
"CurrentStripeProductInstances": [],
"CurrentSubscription": {},
"DomainName": "string",
"TenantBillingSystem": 1,
"HasLoggedIn": false,
"LatestSubscription": {},
"LifetimeRevenue": 0,
"NextStripeInvoiceDate": "string",
"Nonce": "string",
"PrimaryContact": {},
"PrimarySubscription": {},
"PrimaryStripeSubscription": {},
"RecaptchaToken": "string",
"StripeCheckoutMetadata": {},
"StripeNextInvoiceSequence": 0,
"StripePrice": [],
"StripePriceIds": "string",
"StripePromotionCode": "string",
"TaxId": "string",
"TaxIdIsInvalid": false,
"TaxIdType": "string",
"WebflowSlug": "string"
},
"IsImported": false,
"IsRefunded": false,
"CurrencyAmountCreditedPostPayment": 0,
"CurrencyAmountCreditedPrePayment": 0,
"CurrencyAmountDue": 0,
"CurrencyAmountPaid": 0,
"CurrencySymbol": "string",
"CurrencyTotal": 0,
"CurrencyTotalExcludingTax": 0,
"CurrencySubTotal": 0,
"CurrencySubTotalExcludingTax": 0,
"CurrencyTax": 0,
"DaysUntilDue": 0,
"CustomerId": "string",
"PaymentStatus": "string",
"StripeCreditNotes": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"StripeId": "string",
"IsLivemode": false,
"Currency": "string",
"CustomerId": "string",
"InvoiceId": "string",
"OutOfBandAmount": 0,
"PostPaymentAmount": 0,
"PrePaymentAmount": 0,
"Reason": "string",
"Status": "string",
"Total": 0,
"Type": "string",
"CurrencySymbol": "string",
"CurrencyTotal": 0
}
],
"StripePaymentMethodId": "string"
}Authorizations
Enter your access token (OAuth / JWT).
Path Parameters
The subscription's unique identifier
Body
The subscription as it should be after the change
10Show child attributes
Show child attributes
255Show child attributes
Show child attributes
33030Show child attributes
Show child attributes
Show child attributes
Show child attributes
Circular reference to Account (not expanded here).
Show child attributes
Show child attributes
Response
1110Show child attributes
Show child attributes
25535005005030Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
255Circular reference to Account (not expanded here).
Show child attributes
Show child attributes