Subscriptions
Get subscriptions
Retrieves all subscriptions for the specified customer token.
Authorization: Customer TOKEN.Show fieldsHide fields
customerStorefrontCustomerDtoRequiredA storefront representation of a customer in the PayNow system with their associated profiles and metadata.
minecraftStorefrontCustomerMinecraftProfileDtoOptionalA storefront representation of a customers Minecraft profile.
unknownjavabedrock
profileCustomerGenericProfileDtoOptionalRepresents a generic platform profile for a customer.
steamStorefrontCustomerSteamProfileDtoOptionalA storefront representation of a customers Steam profile.
invaliddayweekmonthyear
linesStorefrontSubscriptionLineDto[]RequiredLine items associated with this subscription.
next_billing_amountSubscriptionBillingAmountDtoRequiredRepresents a billing amount breakdown for a subscription.
next_billing_presentment_amountSubscriptionBillingAmountDtoRequiredRepresents a billing amount breakdown for a subscription.
invalidcreatedThe subscription has been created but is not yet active.
activeThe subscription is currently active and will renew.
canceledThe subscription has been canceled and will no longer renew.
tax_jurisdictionsSalesTaxJurisdictionDto[]RequiredList of tax jurisdictions applicable to this subscription.
taxesSalesTaxJurisdictionTaxDto[]RequiredList of taxes applied within this jurisdiction.
pending_changeSubscriptionChangeDtoOptionalA pending or applied change to a subscription.
linesSubscriptionChangeLineDto[]RequiredA single line item within a subscription change.
next_billing_amountSubscriptionChangeAmountDtoRequiredPricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents).
next_billing_presentment_amountSubscriptionChangeAmountDtoRequiredPricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents).
prorated_amountSubscriptionChangeProratedAmountDtoRequiredThe total prorated charge for a subscription change, expressed in both settlement and presentment currencies.
invalidimmediateSubscription will be updated instantly, and a proration charge will be applied.
next_billing_periodSubscription will be updated at the end of the billing period, no proration will be applied.
noneNo proration is applied, subscription is updated instantly.
invalidpending_paymentThe change is pending payment before it can be applied.
pending_renewalThe change will be applied at the next renewal.
appliedThe change has been applied to the subscription.
canceledThe change was canceled and will not be applied.
pending_verificationThe change requires a verification code sent to the customer's e-mail.
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/store/customer/subscriptions" \
-H "Authorization: Customer TOKEN"import { createStorefrontClient } from "@paynow-gg/typescript-sdk";
const paynow = createStorefrontClient({
storeId: "STORE_ID",
customerToken: "CUSTOMER_TOKEN",
});
const result = await paynow.subscriptions.getSubscriptions();import requests
headers = {"Authorization": "Customer TOKEN"}
response = requests.get("https://api.paynow.gg/v1/store/customer/subscriptions", headers=headers)[
{
"cancel_at_period_end": true,
"coupon_ids": [
"411486491630370816"
],
"created_at": "2024-01-01T00:00:00Z",
"currency": "string",
"customer": {
"id": "411486491630370816",
"store_id": "411486491630370816",
"profile": {
"id": "string",
"name": "string",
"platform": "steam",
"avatar_url": "string"
},
"steam_id": "76561197960287930",
"steam": {
"avatar_url": "string",
"id": "76561197960287930",
"name": "string"
},
"minecraft_uuid": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
"minecraft": {
"avatar_url": "string",
"id": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
"name": "notch"
},
"minecraft_platform": "unknown",
"xbox_xuid": "string",
"name": "m0uka"
},
"discount_amount": 0,
"discount_amount_str": "string",
"id": "411486491630370816",
"initial_discount_amount": 0,
"initial_discount_amount_str": "string",
"initial_giftcard_usage_amount": 0,
"initial_giftcard_usage_amount_str": "string",
"initial_subtotal_amount": 0,
"initial_subtotal_amount_str": "string",
"initial_tax_amount": 0,
"initial_tax_amount_str": "string",
"initial_total_amount": 0,
"initial_total_amount_str": "string",
"interval_scale": "invalid",
"interval_value": 0,
"lines": [
{
"currency": "string",
"discount_amount": 0,
"discount_amount_str": "string",
"id": "411486491630370816",
"initial_discount_amount": 0,
"initial_discount_amount_str": "string",
"initial_giftcard_usage_amount": 0,
"initial_giftcard_usage_amount_str": "string",
"initial_subtotal_amount": 0,
"initial_subtotal_amount_str": "string",
"initial_tax_amount": 0,
"initial_tax_amount_str": "string",
"initial_total_amount": 0,
"initial_total_amount_str": "string",
"price": 0,
"product_id": "411486491630370816",
"product_name": "string",
"product_version_id": "411486491630370816",
"store_id": "411486491630370816",
"subscription_id": "411486491630370816",
"subtotal_amount": 0,
"subtotal_amount_str": "string",
"tax_amount": 0,
"tax_amount_str": "string",
"tax_inclusive": true,
"total_amount": 0,
"total_amount_str": "string",
"checkout_line_id": "411486491630370816",
"initial_order_line_id": "411486491630370816",
"pricing_region_id": "string",
"gift_to_customer_id": "411486491630370816",
"selected_gameserver_id": "411486491630370816",
"sale_id": "411486491630370816",
"sale_version_id": "411486491630370816",
"trial_id": "411486491630370816",
"product_image_url": "string",
"presentment_currency": "string",
"presentment_subtotal_amount": 0,
"presentment_subtotal_amount_str": "string",
"presentment_discount_amount": 0,
"presentment_discount_amount_str": "string",
"presentment_tax_amount": 0,
"presentment_tax_amount_str": "string",
"presentment_total_amount": 0,
"presentment_total_amount_str": "string",
"initial_presentment_discount_amount": 0,
"initial_presentment_discount_amount_str": "string",
"initial_presentment_subtotal_amount": 0,
"initial_presentment_subtotal_amount_str": "string",
"initial_presentment_giftcard_usage_amount": 0,
"initial_presentment_giftcard_usage_amount_str": "string",
"initial_presentment_tax_amount": 0,
"initial_presentment_tax_amount_str": "string",
"initial_presentment_total_amount": 0,
"initial_presentment_total_amount_str": "string"
}
],
"next_billing_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"next_billing_presentment_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"past_due": true,
"pretty_id": "string",
"status": "invalid",
"store_id": "411486491630370816",
"subtotal_amount": 0,
"subtotal_amount_str": "string",
"tax_amount": 0,
"tax_amount_str": "string",
"tax_jurisdictions": [
{
"name": "EU OSS",
"taxes": [
{
"tax_amount": "string",
"tax_name": "string",
"tax_rate": "string",
"taxable_amount": "string"
}
],
"not_taxed_reason": "string"
}
],
"total_amount": 0,
"total_amount_str": "string",
"pending_change": {
"created_at": "2024-01-01T00:00:00Z",
"id": "411486491630370816",
"lines": [
{
"amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"id": "411486491630370816",
"is_deleted": true,
"presentment_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"price": 0,
"product": {
"custom_variables": {},
"id": "411486491630370816",
"name": "string",
"version_id": "411486491630370816",
"image_url": "string",
"selected_gameserver_id": "411486491630370816",
"pricing_region_id": "string"
},
"prorated_amount": 0,
"prorated_presentment_amount": 0,
"remaining_minutes": 0,
"tax_inclusive": true,
"total_minutes": 0,
"subscription_line_id": "411486491630370816"
}
],
"next_billing_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"next_billing_presentment_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"off_session": true,
"prorated_amount": {
"currency": "string",
"presentment_currency": "string",
"presentment_prorated_amount": 0,
"prorated_amount": 0
},
"proration_behavior": "invalid",
"status": "invalid",
"subscription_id": "411486491630370816",
"prorated_order_id": "411486491630370816",
"applied_at": "2024-01-01T00:00:00Z"
},
"checkout_id": "411486491630370816",
"presentment_currency": "string",
"presentment_subtotal_amount": 0,
"presentment_subtotal_amount_str": "string",
"presentment_discount_amount": 0,
"presentment_discount_amount_str": "string",
"presentment_tax_amount": 0,
"presentment_tax_amount_str": "string",
"presentment_total_amount": 0,
"presentment_total_amount_str": "string",
"initial_presentment_discount_amount": 0,
"initial_presentment_discount_amount_str": "string",
"initial_presentment_subtotal_amount": 0,
"initial_presentment_subtotal_amount_str": "string",
"initial_presentment_giftcard_usage_amount": 0,
"initial_presentment_giftcard_usage_amount_str": "string",
"initial_presentment_tax_amount": 0,
"initial_presentment_tax_amount_str": "string",
"initial_presentment_total_amount": 0,
"initial_presentment_total_amount_str": "string",
"fx_rate": "string",
"current_period_start": "2024-01-01T00:00:00Z",
"current_period_end": "2024-01-01T00:00:00Z",
"billing_cycle_sequence": 0,
"next_attempt_at": "2024-01-01T00:00:00Z",
"attempt_count": 0,
"updated_at": "2024-01-01T00:00:00Z",
"active_at": "2024-01-01T00:00:00Z",
"canceled_at": "2024-01-01T00:00:00Z",
"cancel_reason": "string",
"cancellation_requested_at": "2024-01-01T00:00:00Z"
}
]Get subscription by ID
Retrieves a subscription for the specified store by the supplied customer token.
Authorization: Customer TOKEN.Show fieldsHide fields
customerStorefrontCustomerDtoRequiredA storefront representation of a customer in the PayNow system with their associated profiles and metadata.
minecraftStorefrontCustomerMinecraftProfileDtoOptionalA storefront representation of a customers Minecraft profile.
unknownjavabedrock
profileCustomerGenericProfileDtoOptionalRepresents a generic platform profile for a customer.
steamStorefrontCustomerSteamProfileDtoOptionalA storefront representation of a customers Steam profile.
invaliddayweekmonthyear
linesStorefrontSubscriptionLineDto[]RequiredLine items associated with this subscription.
next_billing_amountSubscriptionBillingAmountDtoRequiredRepresents a billing amount breakdown for a subscription.
next_billing_presentment_amountSubscriptionBillingAmountDtoRequiredRepresents a billing amount breakdown for a subscription.
invalidcreatedThe subscription has been created but is not yet active.
activeThe subscription is currently active and will renew.
canceledThe subscription has been canceled and will no longer renew.
tax_jurisdictionsSalesTaxJurisdictionDto[]RequiredList of tax jurisdictions applicable to this subscription.
taxesSalesTaxJurisdictionTaxDto[]RequiredList of taxes applied within this jurisdiction.
pending_changeSubscriptionChangeDtoOptionalA pending or applied change to a subscription.
linesSubscriptionChangeLineDto[]RequiredA single line item within a subscription change.
next_billing_amountSubscriptionChangeAmountDtoRequiredPricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents).
next_billing_presentment_amountSubscriptionChangeAmountDtoRequiredPricing breakdown for a subscription change, in the smallest units of the given currency (e.g. cents).
prorated_amountSubscriptionChangeProratedAmountDtoRequiredThe total prorated charge for a subscription change, expressed in both settlement and presentment currencies.
invalidimmediateSubscription will be updated instantly, and a proration charge will be applied.
next_billing_periodSubscription will be updated at the end of the billing period, no proration will be applied.
noneNo proration is applied, subscription is updated instantly.
invalidpending_paymentThe change is pending payment before it can be applied.
pending_renewalThe change will be applied at the next renewal.
appliedThe change has been applied to the subscription.
canceledThe change was canceled and will not be applied.
pending_verificationThe change requires a verification code sent to the customer's e-mail.
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/store/customer/subscriptions/{subscriptionId}" \
-H "Authorization: Customer TOKEN"import { createStorefrontClient } from "@paynow-gg/typescript-sdk";
const paynow = createStorefrontClient({
storeId: "STORE_ID",
customerToken: "CUSTOMER_TOKEN",
});
const result = await paynow.subscriptions.getSubscriptionById("411486491630370816");import requests
headers = {"Authorization": "Customer TOKEN"}
response = requests.get("https://api.paynow.gg/v1/store/customer/subscriptions/{subscriptionId}", headers=headers){
"cancel_at_period_end": true,
"coupon_ids": [
"411486491630370816"
],
"created_at": "2024-01-01T00:00:00Z",
"currency": "string",
"customer": {
"id": "411486491630370816",
"store_id": "411486491630370816",
"profile": {
"id": "string",
"name": "string",
"platform": "steam",
"avatar_url": "string"
},
"steam_id": "76561197960287930",
"steam": {
"avatar_url": "string",
"id": "76561197960287930",
"name": "string"
},
"minecraft_uuid": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
"minecraft": {
"avatar_url": "string",
"id": "f84c6a79-0a4e-45e0-879b-cd49ebd4c4e2",
"name": "notch"
},
"minecraft_platform": "unknown",
"xbox_xuid": "string",
"name": "m0uka"
},
"discount_amount": 0,
"discount_amount_str": "string",
"id": "411486491630370816",
"initial_discount_amount": 0,
"initial_discount_amount_str": "string",
"initial_giftcard_usage_amount": 0,
"initial_giftcard_usage_amount_str": "string",
"initial_subtotal_amount": 0,
"initial_subtotal_amount_str": "string",
"initial_tax_amount": 0,
"initial_tax_amount_str": "string",
"initial_total_amount": 0,
"initial_total_amount_str": "string",
"interval_scale": "invalid",
"interval_value": 0,
"lines": [
{
"currency": "string",
"discount_amount": 0,
"discount_amount_str": "string",
"id": "411486491630370816",
"initial_discount_amount": 0,
"initial_discount_amount_str": "string",
"initial_giftcard_usage_amount": 0,
"initial_giftcard_usage_amount_str": "string",
"initial_subtotal_amount": 0,
"initial_subtotal_amount_str": "string",
"initial_tax_amount": 0,
"initial_tax_amount_str": "string",
"initial_total_amount": 0,
"initial_total_amount_str": "string",
"price": 0,
"product_id": "411486491630370816",
"product_name": "string",
"product_version_id": "411486491630370816",
"store_id": "411486491630370816",
"subscription_id": "411486491630370816",
"subtotal_amount": 0,
"subtotal_amount_str": "string",
"tax_amount": 0,
"tax_amount_str": "string",
"tax_inclusive": true,
"total_amount": 0,
"total_amount_str": "string",
"checkout_line_id": "411486491630370816",
"initial_order_line_id": "411486491630370816",
"pricing_region_id": "string",
"gift_to_customer_id": "411486491630370816",
"selected_gameserver_id": "411486491630370816",
"sale_id": "411486491630370816",
"sale_version_id": "411486491630370816",
"trial_id": "411486491630370816",
"product_image_url": "string",
"presentment_currency": "string",
"presentment_subtotal_amount": 0,
"presentment_subtotal_amount_str": "string",
"presentment_discount_amount": 0,
"presentment_discount_amount_str": "string",
"presentment_tax_amount": 0,
"presentment_tax_amount_str": "string",
"presentment_total_amount": 0,
"presentment_total_amount_str": "string",
"initial_presentment_discount_amount": 0,
"initial_presentment_discount_amount_str": "string",
"initial_presentment_subtotal_amount": 0,
"initial_presentment_subtotal_amount_str": "string",
"initial_presentment_giftcard_usage_amount": 0,
"initial_presentment_giftcard_usage_amount_str": "string",
"initial_presentment_tax_amount": 0,
"initial_presentment_tax_amount_str": "string",
"initial_presentment_total_amount": 0,
"initial_presentment_total_amount_str": "string"
}
],
"next_billing_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"next_billing_presentment_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"past_due": true,
"pretty_id": "string",
"status": "invalid",
"store_id": "411486491630370816",
"subtotal_amount": 0,
"subtotal_amount_str": "string",
"tax_amount": 0,
"tax_amount_str": "string",
"tax_jurisdictions": [
{
"name": "EU OSS",
"taxes": [
{
"tax_amount": "string",
"tax_name": "string",
"tax_rate": "string",
"taxable_amount": "string"
}
],
"not_taxed_reason": "string"
}
],
"total_amount": 0,
"total_amount_str": "string",
"pending_change": {
"created_at": "2024-01-01T00:00:00Z",
"id": "411486491630370816",
"lines": [
{
"amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"id": "411486491630370816",
"is_deleted": true,
"presentment_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"price": 0,
"product": {
"custom_variables": {},
"id": "411486491630370816",
"name": "string",
"version_id": "411486491630370816",
"image_url": "string",
"selected_gameserver_id": "411486491630370816",
"pricing_region_id": "string"
},
"prorated_amount": 0,
"prorated_presentment_amount": 0,
"remaining_minutes": 0,
"tax_inclusive": true,
"total_minutes": 0,
"subscription_line_id": "411486491630370816"
}
],
"next_billing_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"next_billing_presentment_amount": {
"currency": "string",
"discount": 0,
"subtotal": 0,
"tax": 0,
"total": 0
},
"off_session": true,
"prorated_amount": {
"currency": "string",
"presentment_currency": "string",
"presentment_prorated_amount": 0,
"prorated_amount": 0
},
"proration_behavior": "invalid",
"status": "invalid",
"subscription_id": "411486491630370816",
"prorated_order_id": "411486491630370816",
"applied_at": "2024-01-01T00:00:00Z"
},
"checkout_id": "411486491630370816",
"presentment_currency": "string",
"presentment_subtotal_amount": 0,
"presentment_subtotal_amount_str": "string",
"presentment_discount_amount": 0,
"presentment_discount_amount_str": "string",
"presentment_tax_amount": 0,
"presentment_tax_amount_str": "string",
"presentment_total_amount": 0,
"presentment_total_amount_str": "string",
"initial_presentment_discount_amount": 0,
"initial_presentment_discount_amount_str": "string",
"initial_presentment_subtotal_amount": 0,
"initial_presentment_subtotal_amount_str": "string",
"initial_presentment_giftcard_usage_amount": 0,
"initial_presentment_giftcard_usage_amount_str": "string",
"initial_presentment_tax_amount": 0,
"initial_presentment_tax_amount_str": "string",
"initial_presentment_total_amount": 0,
"initial_presentment_total_amount_str": "string",
"fx_rate": "string",
"current_period_start": "2024-01-01T00:00:00Z",
"current_period_end": "2024-01-01T00:00:00Z",
"billing_cycle_sequence": 0,
"next_attempt_at": "2024-01-01T00:00:00Z",
"attempt_count": 0,
"updated_at": "2024-01-01T00:00:00Z",
"active_at": "2024-01-01T00:00:00Z",
"canceled_at": "2024-01-01T00:00:00Z",
"cancel_reason": "string",
"cancellation_requested_at": "2024-01-01T00:00:00Z"
}Cancel subscription by ID
Cancels a subscription for the specified store by the supplied customer token.
Authorization: Customer TOKEN.curl -X DELETE "https://api.paynow.gg/v1/store/customer/subscriptions/{subscriptionId}" \
-H "Authorization: Customer TOKEN"import { createStorefrontClient } from "@paynow-gg/typescript-sdk";
const paynow = createStorefrontClient({
storeId: "STORE_ID",
customerToken: "CUSTOMER_TOKEN",
});
await paynow.subscriptions.cancelSubscription("411486491630370816");import requests
headers = {"Authorization": "Customer TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/store/customer/subscriptions/{subscriptionId}", headers=headers)