Recurly · Schema

SubscriptionCreatePreviewRequest

SubscriptionBillingPaymentsRecurring RevenueInvoicingDunningRevenue RecognitionChurnMCPShopifyWebhook
View JSON Schema on GitHub

JSON Schema

recurly-subscription-create-preview-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recurly/json-schema/recurly-subscription-create-preview-request-schema.json",
  "title": "SubscriptionCreatePreviewRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recurly-subscriptions-api-openapi.yml#/components/schemas/SubscriptionCreatePreviewRequest",
  "type": "object",
  "oneOf": [
    {
      "$ref": "#/$defs/SubscriptionRequest"
    },
    {
      "$ref": "#/$defs/SubscriptionRequestWithFeatures"
    },
    {
      "$ref": "#/$defs/SubscriptionRequestManualInvoicingWithShipping"
    }
  ],
  "$defs": {
    "AccountCode": {
      "type": "string",
      "description": "The unique identifier of the account."
    },
    "AccountMini": {
      "allOf": [
        {
          "$ref": "#/$defs/AccountWithCodeOnly"
        },
        {
          "properties": {
            "first_name": {
              "allOf": [
                {
                  "$ref": "#/$defs/FirstName"
                },
                {
                  "description": "The first name of the account."
                }
              ]
            },
            "last_name": {
              "allOf": [
                {
                  "$ref": "#/$defs/LastName"
                },
                {
                  "description": "The last name of the account."
                }
              ]
            },
            "email": {
              "allOf": [
                {
                  "$ref": "#/$defs/Email"
                },
                {
                  "description": "The email address of the account."
                }
              ]
            }
          }
        }
      ]
    },
    "AccountWithCodeOnly": {
      "type": "object",
      "title": "Account",
      "required": [
        "account_code"
      ],
      "properties": {
        "account_code": {
          "$ref": "#/$defs/AccountCode"
        }
      }
    },
    "Address": {
      "type": "object",
      "properties": {
        "address1": {
          "type": "string"
        },
        "address2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        },
        "country": {
          "type": "string",
          "maxLength": 2
        },
        "phone": {
          "type": "string"
        }
      }
    },
    "AddressWithName": {
      "allOf": [
        {
          "$ref": "#/$defs/Address"
        },
        {
          "properties": {
            "first_name": {
              "$ref": "#/$defs/FirstName"
            },
            "last_name": {
              "$ref": "#/$defs/LastName"
            }
          }
        }
      ]
    },
    "BankAccountAuthorizedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Merchants importing recurring subscriptions paid with ACH into Recurly can backdate the subscription's authorization with this attribute using an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, liquidthis timestamp is cleared.",
      "default": ""
    },
    "BillingInfoCC": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string"
        },
        "month": {
          "type": "string"
        },
        "year": {
          "type": "string"
        }
      }
    },
    "CollectionMethodEnum": {
      "type": "string",
      "enum": [
        "manual",
        "automatic"
      ],
      "default": "automatic",
      "description": "Optional field to set the collection for an invoice as `automatic` or `manual`. The default is `automatic` if it's not set."
    },
    "CouponCode": {
      "type": "string",
      "default": "",
      "description": "Optional coupon code to redeem on the account and discount the subscription. Please note, the subscription request will fail if the coupon is invalid."
    },
    "CouponCodes": {
      "type": "array",
      "description": "Provide this elements if you want to redeem multiple coupons. You must have Multiple Coupons Per Account enabled in Coupon Settings in order to redeem multiple coupons.",
      "items": {
        "properties": {
          "coupon_code": {
            "$ref": "#/$defs/CouponCode"
          }
        }
      }
    },
    "CurrencyCode": {
      "type": "string",
      "maxLength": 3,
      "description": "3-letter ISO 4217 currency code."
    },
    "CustomField": {
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 50,
          "pattern": "/^[a-z0-9_-]+$/i",
          "title": "Field name",
          "description": "Fields must be created in the UI before values can be assigned to them."
        },
        "value": {
          "type": "string",
          "maxLength": 255,
          "title": "Field value",
          "description": "Any values that resemble a credit card number or security code (CVV/CVC) will be rejected."
        }
      }
    },
    "CustomFields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CustomField"
      },
      "title": "Custom Fields",
      "description": "The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value."
    },
    "CustomerNotes": {
      "type": "string",
      "default": "",
      "description": "Optional notes field. This will default to the Customer Notes text specified on the Invoice Settings page in your Recurly admin. Specify custom notes with this tag to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. Custom notes made on an invoice for a one time charge will not carry over to subsequent invoices."
    },
    "Email": {
      "type": "string",
      "maxLength": 255
    },
    "FirstName": {
      "type": "string",
      "title": "First name"
    },
    "GiftCardRedemption": {
      "type": "object",
      "properties": {
        "gift_card": {
          "type": "object",
          "description": "The gift card object is required in order to redeem a redemption code.",
          "properties": {
            "redemption_code": {
              "type": "string",
              "default": "",
              "description": "The redemption code for the gift card being redeemed."
            }
          }
        }
      }
    },
    "ImportedTrial": {
      "type": "boolean",
      "description": "Indicates if the subscription is to be treated as an import for data analysis or a real trial. This value can only be changed on a trial subscription and is persisted for its lifetime.",
      "default": false
    },
    "LastName": {
      "type": "string",
      "title": "Last name"
    },
    "NetTerms": {
      "type": "integer",
      "title": "Net terms",
      "description": "Integer paired with `Net Terms Type` and representing the number\nof days past the current date (for `net` Net Terms Type) or days after\nthe last day of the current month (for `eom` Net Terms Type) that the\ninvoice will become past due. For `manual` collection method, an additional 24 hours is\nadded to ensure the customer has the entire last day to make payment before\nbecoming past due. For example:\n\nIf an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created.\nIf an invoice is due `net 30`, it will become past due at 31 days exactly.\nIf an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month.\n\nFor `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection.\nWhen `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`.\n\nFor more information on how net terms work with `manual` collection visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms)\nor visit (https://docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.",
      "minimum": 0,
      "default": 0
    },
    "NetTermsTypeEnum": {
      "type": "string",
      "title": "Net Terms Type",
      "description": "Optionally supplied string that may be either `net` or `eom` (end-of-month).\nWhen `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.\nWhen `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.\n",
      "enum": [
        "net",
        "eom"
      ],
      "default": "net"
    },
    "PlanCode": {
      "type": "string",
      "default": "",
      "maxLength": 50,
      "description": "Unique code to identify the plan. This code may only contain the following characters: [a-z 0-9 @ - _ .]. Max of 50 characters."
    },
    "ProrationSettings": {
      "type": "object",
      "title": "Proration Settings",
      "description": "Allows you to control how any resulting charges and credits will be calculated and prorated.",
      "properties": {
        "charge": {
          "$ref": "#/$defs/ProrationSettingsChargeEnum"
        },
        "credit": {
          "$ref": "#/$defs/ProrationSettingsCreditEnum"
        }
      }
    },
    "ProrationSettingsChargeEnum": {
      "type": "string",
      "title": "Charge",
      "description": "Determines how the amount charged is determined for this change",
      "default": "prorated_amount",
      "enum": [
        "full_amount",
        "prorated_amount",
        "none"
      ]
    },
    "ProrationSettingsCreditEnum": {
      "type": "string",
      "title": "Credit",
      "description": "Determines how the amount credited is determined for this change",
      "default": "prorated_amount",
      "enum": [
        "full_amount",
        "prorated_amount",
        "none"
      ]
    },
    "Quantity": {
      "type": "integer",
      "description": "Optionally override the default quantity of 1.",
      "default": 1,
      "minimum": 0
    },
    "RampIntervalStartingBillingCycle": {
      "type": "integer",
      "description": "Represents the billing cycle where a ramp interval starts.",
      "minimum": 1,
      "default": 1
    },
    "RenewalBillingCycles": {
      "type": "integer",
      "description": "The number of billing periods in the subscription's next term. Will default to the plan's `total_billing_cycles` unless specified.",
      "minimum": 0
    },
    "RevenueScheduleTypeEnum": {
      "type": "string",
      "description": "Optional field for setting a revenue schedule type. This will determine how revenue for the associated Subscription should be recognized. When creating a Subscription, available schedule types are `never`, `evenly`, `at_range_start`, or `at_range_end`. If no `revenue_schedule_type` is set, the Subscription will inherit the `revenue_schedule_type` from its Plan.",
      "enum": [
        "never",
        "evenly",
        "at_range_start",
        "at_range_end"
      ]
    },
    "ShippingAddress": {
      "allOf": [
        {
          "$ref": "#/$defs/AddressWithName"
        },
        {
          "type": "object",
          "required": [
            "first_name",
            "last_name",
            "address1",
            "city",
            "state",
            "zip",
            "country"
          ],
          "description": "Optional nested object to use if you want to create a new shipping\naddress on a new subscription/account. The nested object contains\nthe information for the account shipping address:\n`first_name`, `last_name`, `company_name`, `email`, `phone`,\n`vat_number`,  `address1`, `address2`, `city`, `state`,\n`zip`, `country`, `nickname`. When providing a shipping\naddress, the following are required: first_name, last_name,\naddress1, city, state, zip, and country. Required if using\n`shipping_method_code` and no `shipping_address_id` is\nspecified.",
          "properties": {
            "first_name": {
              "description": "The first name for the account. Max of 255 characters."
            },
            "last_name": {
              "description": "The last name for the account.  Max of 255 characters."
            },
            "phone": {
              "description": "The phone number for the shipping address."
            },
            "address1": {
              "description": "Address line 1."
            },
            "address2": {
              "description": "Address line 2."
            },
            "city": {
              "description": "City"
            },
            "state": {
              "description": "State or region"
            },
            "zip": {
              "description": "Zip or postal code"
            },
            "country": {
              "description": "Country,  [2-letter ISO code](http://www.iso.org/iso/country_names_and_code_elements)."
            },
            "nickname": {
              "type": "string",
              "description": "A nickname for the shipping address. Defaults to \"first_name last_name\". Max of 255 characters.",
              "maxLength": 255,
              "default": ""
            },
            "company": {
              "type": "string",
              "description": "The company name for the shipping address. Max of 50 characters.",
              "maxLength": 50,
              "default": ""
            },
            "email": {
              "allOf": [
                {
                  "$ref": "#/$defs/Email"
                },
                {
                  "description": "The email address for the shipping address."
                }
              ]
            },
            "vat_number": {
              "type": "string",
              "description": "Customer's VAT number (to avoid having VAT applied, if applicable).",
              "default": "",
              "maxLength": 20
            }
          }
        }
      ]
    },
    "StartsAt": {
      "type": "string",
      "format": "date-time",
      "default": "",
      "description": "If set, the subscription will begin on this specified date. The subscription will apply the setup fee and trial period, unless the plan has no trial. Omit this field if the subscription should be started immediately."
    },
    "SubscriptionAddOns": {
      "type": "array",
      "description": "Nested add-on information for the subscription. When creating, the new subscription will have no add-ons unless specified.",
      "items": {
        "type": "object"
      },
      "default": []
    },
    "SubscriptionBase": {
      "type": "object",
      "title": "Subscription"
    },
    "SubscriptionInvoicing": {
      "type": "object",
      "properties": {
        "po_number": {
          "type": "string",
          "default": "",
          "description": "Optional notes field. Attach a PO number to the invoice."
        },
        "net_terms": {
          "$ref": "#/$defs/NetTerms"
        },
        "net_terms_type": {
          "$ref": "#/$defs/NetTermsTypeEnum"
        },
        "collection_method": {
          "$ref": "#/$defs/CollectionMethodEnum"
        }
      }
    },
    "SubscriptionRampInterval": {
      "type": "object",
      "title": "Subscription Ramp Interval",
      "properties": {
        "starting_billing_cycle": {
          "$ref": "#/$defs/RampIntervalStartingBillingCycle"
        },
        "unit_amount_in_cents": {
          "type": "integer",
          "description": "Represents the price for the ramp interval.",
          "minimum": 0
        }
      }
    },
    "SubscriptionRampIntervals": {
      "type": "object",
      "properties": {
        "ramp_intervals": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubscriptionRampInterval"
          }
        }
      }
    },
    "SubscriptionRequest": {
      "title": "Subscription (Basic Features)",
      "allOf": [
        {
          "$ref": "#/$defs/SubscriptionBase"
        },
        {
          "type": "object",
          "required": [
            "plan_code",
            "account",
            "currency"
          ],
          "properties": {
            "plan_code": {
              "$ref": "#/$defs/PlanCode"
            },
            "currency": {
              "$ref": "#/$defs/CurrencyCode"
            },
            "account": {
              "allOf": [
                {
                  "$ref": "#/$defs/AccountMini"
                },
                {
                  "properties": {
                    "billing_info": {
                      "$ref": "#/$defs/BillingInfoCC"
                    }
                  }
                }
              ]
            },
            "quantity": {
              "$ref": "#/$defs/Quantity"
            },
            "unit_amount_in_cents": {
              "type": "integer",
              "maximum": 10000000,
              "minimum": 0,
              "description": "Override the unit amount of the subscription plan by setting this value in cents. If not provided, the subscription will inherit the price from the subscription plan for the provided currency. Max 10000000."
            },
            "total_billing_cycles": {
              "$ref": "#/$defs/TotalBillingCycles"
            },
            "renewal_billing_cycles": {
              "$ref": "#/$defs/RenewalBillingCycles"
            },
            "revenue_schedule_type": {
              "$ref": "#/$defs/RevenueScheduleTypeEnum"
            },
            "trial_ends_at": {
              "$ref": "#/$defs/TrialEndsAt"
            },
            "imported_trial": {
              "$ref": "#/$defs/ImportedTrial"
            },
            "starts_at": {
              "$ref": "#/$defs/StartsAt"
            },
            "next_bill_date": {
              "type": "string",
              "format": "date-time",
              "default": "",
              "description": "Indicates the subscription's next billing period start date. Subsequent billing period start dates will be offset from this date. The first invoice will be prorated appropriately so that the customer only pays for the portion of the first billing period for which the subscription applies. Useful for forcing a subscription to bill on the first of the month."
            },
            "coupon_code": {
              "$ref": "#/$defs/CouponCode"
            },
            "terms_and_conditions": {
              "$ref": "#/$defs/TermsAndConditions"
            },
            "customer_notes": {
              "$ref": "#/$defs/CustomerNotes"
            },
            "bulk": {
              "type": "boolean",
              "description": "Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API. Set to `true` or `false`. Defaults to `false`.",
              "default": false
            },
            "transaction_type": {
              "type": "string",
              "description": "An optional type designation for the payment gateway transaction created by this request. Supports `'moto'` value, which is the acronym for mail order and telephone transactions.",
              "enum": [
                "moto"
              ],
              "default": ""
            },
            "subscription_add_ons": {
              "$ref": "#/$defs/SubscriptionAddOns"
            },
            "custom_fields": {
              "$ref": "#/$defs/CustomFields"
            },
            "proration_settings": {
              "$ref": "#/$defs/ProrationSettings"
            }
          }
        },
        {
          "$ref": "#/$defs/GiftCardRedemption"
        },
        {
          "$ref": "#/$defs/SubscriptionInvoicing"
        }
      ]
    },
    "SubscriptionRequestManualInvoicingWithShipping": {
      "title": "Manual Invoicing with Shipping",
      "allOf": [
        {
          "$ref": "#/$defs/SubscriptionBase"
        },
        {
          "allOf": [
            {
              "$ref": "#/$defs/SubscriptionInvoicing"
            },
            {
              "properties": {
                "shipping_amount_in_cents": {},
                "collection_method": {}
              }
            }
          ]
        },
        {
          "$ref": "#/$defs/SubscriptionShipping"
        },
        {
          "type": "object",
          "required": [
            "plan_code",
            "account",
            "currency"
          ],
          "properties": {
            "plan_code": {
              "$ref": "#/$defs/PlanCode"
            },
            "currency": {
              "$ref": "#/$defs/CurrencyCode"
            },
            "account": {
              "allOf": [
                {
                  "$ref": "#/$defs/AccountMini"
                },
                {
                  "properties": {
                    "billing_info": {
                      "$ref": "#/$defs/BillingInfoCC"
                    }
                  }
                }
              ]
            },
            "shipping_address": {
              "$ref": "#/$defs/ShippingAddress"
            }
          }
        }
      ]
    },
    "SubscriptionRequestWithFeatures": {
      "title": "Subscription (Extended Features)",
      "allOf": [
        {
          "$ref": "#/$defs/SubscriptionRequest"
        },
        {
          "type": "object",
          "properties": {
            "billing_info_uuid": {
              "type": "string",
              "description": "The `billing_info_uuid` is the value that represents a specific billing info for an end customer. When `billing_info_uuid` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_uuid` can ONLY be used for sites utilizing the Wallet feature."
            },
            "coupon_codes": {
              "$ref": "#/$defs/CouponCodes"
            },
            "tax_inclusive": {
              "$ref": "#/$defs/TaxInclusive"
            },
            "vat_reverse_charge_notes": {
              "$ref": "#/$defs/VatReverseChargeNotes"
            },
            "bank_account_authorized_at": {
              "$ref": "#/$defs/BankAccountAuthorizedAt"
            },
            "shipping_address": {
              "$ref": "#/$defs/ShippingAddress"
            },
            "shipping_address_id": {
              "type": "string",
              "default": "",
              "description": "Optional field to use when you want to associate an existing shipping address with a new subscription. Required if using `shipping_method_code` and no `shipping_address` is specified."
            }
          }
        },
        {
          "$ref": "#/$defs/SubscriptionRampIntervals"
        },
        {
          "$ref": "#/$defs/SubscriptionShipping"
        }
      ]
    },
    "SubscriptionShipping": {
      "type": "object",
      "description": "Subscription shipping details",
      "properties": {
        "shipping_amount_in_cents": {
          "type": "integer",
          "minimum": 0
        },
        "shipping_method_code": {
          "type": "string",
          "description": "The reference code for the shipping method used, such as shipping_method.code `'fedex_ground'`. Required if `shipping_amount_in_cents` is specified."
        }
      }
    },
    "TaxInclusive": {
      "type": "boolean",
      "description": "Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.",
      "default": false
    },
    "TermsAndConditions": {
      "type": "string",
      "default": "",
      "description": "Optional notes field. This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes with this tag to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals."
    },
    "TotalBillingCycles": {
      "type": "integer",
      "minimum": 0,
      "description": "The total number of billing cycles for the current subscription term."
    },
    "TrialEndsAt": {
      "type": "string",
      "format": "date-time",
      "default": "",
      "description": "If set, overrides the default trial behavior for the subscription. This must be a date and time, preferably in UTC. If the date is in the past, the subscription will skip the trial."
    },
    "VatReverseChargeNotes": {
      "type": "string",
      "default": "",
      "description": "VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription. Specify custom notes with this tag to add or override VAT Reverse Charge Notes. Custom notes will stay with a subscription on all renewals."
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/recurly-subscription-create-preview-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.