{"method":"POST","path":"https://api.revcent.com/v2/subscription_profiles","summary":"Create A Subscription Profile","description":"Create a Subscription Profile, which will issue a unique Subscription Profile ID. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/CreateSubscriptionProfile.md for an in-depth overview of this operation.","operationId":"CreateSubscriptionProfile","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"description":"The subscription profile name. Must be unique across all subscription profiles.","type":"string"},"description":{"description":"The subscription profile description.","type":"string"},"enabled":{"description":"Whether the subscription profile is currently enabled.","type":"boolean"},"frequency":{"description":"The subscription billing frequency type. Unit: Renews every value and unit. I.e. Every 30 (value) days (unit). Calendar: Renews on the nth unit of every parent unit. I.e. On the 2nd (nth) week (unit) of every month (parent unit). Fiscal: Renews every standard or infrequent fiscal period. Standard: Renews quarterly. Infrequent: renews every nth quarter.","type":"string","enum":["unit","calendar","fiscal"]},"frequency_unit":{"type":"object","additionalProperties":false,"description":"If frequency is 'unit', this defines the subscription billing frequency based on the unit and value. For example, if the frequency value is 30, and the frequency unit is 'days', then the subscription will renew every 30 days.","properties":{"unit":{"description":"The subscription billing frequency unit. This is used in conjunction with the frequency value to determine the subscription billing cycle.","type":"string","enum":["days","weeks","months","years"]},"value":{"description":"The subscription billing frequency value. This is used in conjunction with the frequency unit to determine the subscription billing cycle.","type":"integer"}},"required":["unit","value"]},"frequency_calendar":{"type":"object","additionalProperties":false,"description":"If frequency is 'calendar', this defines the subscription billing frequency based on the calendar unit and nth value. For example, if the frequency is 'calendar', and the calendar unit is 'day', and the nth value is 1, and the parent unit is 'month', then the subscription will renew on the 1st day of every month.","properties":{"unit":{"description":"The subscription billing frequency calendar unit. This is used in conjunction with the nth value and parent to determine the subscription billing cycle.","type":"string","enum":["day","week","month"]},"value":{"description":"The subscription billing frequency nth value. This is used in conjunction with the calendar unit and parent to determine the subscription billing cycle.","type":"integer"},"parent":{"description":"The subscription billing frequency calendar parent unit. This is used in conjunction with the calendar unit and nth value to determine the subscription billing cycle.","type":"string","enum":["week","month","year"]}},"required":["unit","value","parent"]},"frequency_fiscal":{"type":"object","additionalProperties":false,"description":"If frequency is 'fiscal', this defines the subscription billing frequency based on the fiscal period type.","properties":{"unit":{"description":"The subscription billing frequency fiscal unit. This is used in conjunction with the fiscal value and fiscal setting to determine the subscription billing cycle based on fiscal periods.","type":"string","enum":["quarter","year"]},"value":{"description":"The subscription billing frequency fiscal nth value. Only applies if the fiscal setting is set to 'infrequent'. For example, if the fiscal setting is set to 'infrequent', and the fiscal unit is quarter, and the fiscal value is 2, then the subscription will renew every 2nd quarter.","type":"integer"},"setting":{"description":"The subscription billing frequency fiscal period type. Standard fiscal periods renew quarterly or yearly. Infrequent fiscal periods renew every nth fiscal unit, based on the fiscal value.","type":"string","enum":["standard","infrequent"]}},"required":["unit","setting"]},"occurrences":{"type":"string","description":"Specify whether subscriptions associated with this profile should renew indefinitely or for a specific number of renewals. If set to specific, the subscription will renew for the number of times specified in the occurrences_value property. If set to indefinite, the subscription will continue to renew until suspended or cancelled. Default is indefinite.","enum":["indefinite","specific"]},"occurrences_value":{"type":"integer","description":"If the occurrences property is set to 'specific', the maximum number of times to renew subscriptions associated with this profile."},"overdue_limit":{"type":"integer","description":"The maximum number of overdue renewals a subscription associated with this profile can have before it is automatically suspended."},"prefer_gateway":{"type":"object","additionalProperties":false,"description":"","properties":{"enabled":{"description":"Whether to force the subscription to renew on the last successful transaction gateway. This will limit the subscription to renew on a single fixed gateway and ignore the subscription profiles' associated payment profile. For advanced users. Recommended set to False.","type":"boolean"},"lock_gateway":{"description":"If prefer_gateway.enabled = true, whether to force the subscription to renew only on the originating sales' successful transaction gateway. This will limit the subscription to renew on a single fixed gateway and ignore the subscription profiles' associated payment profile. For advanced users. Recommended set to False.","type":"boolean"},"max":{"description":"If prefer_gateway.enabled = true, the maximum number of times to use the preferred gateway for renewals of subscriptions associated with this profile. If the preferred gateway has been used for the number of times specified in the max property, RevCent will attempt to process subsequent renewals using the subscription profiles' associated payment profile.","type":"integer"}}},"shipping_profile":{"type":"string","description":"A 20 character shipping profile ID. Optional. Meant for granting a specific shipping rate for all subscriptions associated with this subscription profile. Provide a shipping profile if shippable products will use this subscription profile and you wish to set a specific rate, regardless of shipment destination. Otherwise, RevCent will calculate shipping by finding a match within all shipping profiles. Important: If provided, the first rate listed in the shipping profile will be used, i.e. no product, product group, revenue rules or country restrictions are taken into account within the shipping profile.","minLength":20,"maxLength":20},"payment_profile":{"type":"string","description":"A 20 character payment profile ID. The payment profile which determines the processing flow of subscription renewals using this subscription profile.","minLength":20,"maxLength":20},"subscription_specific":{"description":"Indicates whether the subscription profile is being made for a specific subscription. You have the ability to create a customized subscription profile and have it automatically attach it to an individual subscription in order to tailor the renewal frequency to a specific customer's needs.<br><br>If true, you must also provide the subscription_id of the subscription you wish to associate this profile with. Only create a subscription profile specific to a subscription if the customer wishes to have a custom billing frequency. Note: if a subscription profile is specific to a subscription, then it cannot be used for any other subscription. This is meant for one-time use subscription profiles that are customized for a specific subscription's needs.<br><br>If false, the subscription profile can be used for any subscription and is not limited to a specific subscription.","type":"boolean"},"subscription_id":{"type":"string","description":"If subscription_specific = true, the 20 character subscription ID of the subscription which you want this profile to associate with. The subscription will be automatically updated to use the newly created profile and no longer use the subscription profile it inherited from the original purchased product.<br><br>Note: If the target subscription already has a custom profile attached, an error will be returned, and you must instead edit the target subscription's current custom profile.","minLength":20,"maxLength":20}},"required":["name","payment_profile","frequency"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"subscription_profile_id":{"type":"string","description":"A 20 character subscription profile ID.","minLength":20,"maxLength":20},"result":{"type":"string"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}