# Create a Subscription Plan Create a Subscription Plan resource to group and manage recurring payments for individual Subscription resources. You can create a Subscription Plan with or without a trial period. Endpoint: POST /subscription_plans Version: 2022-02-01 Security: BasicAuth ## Header parameters: - `Finix-Version` (string) Specify the API version of your request. For more details, see Versioning. Example: "2022-02-01" ## Request fields (application/json): - `amount` (integer, required) The total amount that will be debited in cents (e.g. 100 cents to debit $1.00). Example: 5000 - `currency` (string, required) ISO 4217 3-letter currency code. Currently, the only currency supported is USD. Enum: "USD" - `default_total_billing_intervals` (integer,null) The total number of billing intervals for subscriptions created from this plan. This is the count of recurring billing cycles, with the interval unit defined by the plan’s billing_interval, such as weekly, monthly, etc. If included, the plan’s duration_type will be set to FIXED_TERM. Subscriptions created with this plan will use the default duration in the total_billing_intervals field. The subscription's expires_at field will be set to the datetime when the subscription expires based on the plan's default_total_billing_intervals. - `plan_name` (string, required) A human-friendly name for the Subscription Plan. - `description` (string) A description of the Subscription Plan. - `linked_to` (string, required) The ID of the [Merchant](#Merchants) resource that you wish to link to the Subscription Plan (i.e., the merchant that the subscription plan belongs to). At this time, only approved merchants with one of the following processors are valid: - DUMMY_V1 - FINIX_V1 - `linked_type` (string, required) The type of the resource that is specified in the linked_to field. Enum: "MERCHANT" - `nickname` (string) A human-readable name for the resource. - `billing_interval` (string, required) How often the customer subscriber is billed. Enum: "DAILY", "WEEKLY", "MONTHLY", "QUARTERLY", "YEARLY" - `billing_defaults` (object, required) Object containing default billing settings. - `billing_defaults.collection_method` (string, required) The method by which subscription payments are collected. Enum: "BILL_AUTOMATICALLY", "ACH" - `trial_defaults` (object) Object containing default trial settings. - `trial_defaults.interval_type` (string, required) The unit of time for the trial period. Enum: "DAY", "WEEK", "MONTH", "YEAR" - `trial_defaults.interval_count` (integer, required) The number of intervals of interval_type used to describe the duration of the trial. - `discount_phase_defaults` (object) - `discount_phase_defaults.billing_interval_count` (integer) The number of billing intervals the discount applies. After this period, the subscriber is charged the full amount from the Subscription. - `tags` (object,null) Include up to 50 key: value pairs to annotate requests with custom metadata. - Maximum character length for individual keys is 40. - Maximum character length for individual values is 500. (For example, order_number: 25, item_type: produce, department: sales) ## Response 201 fields (application/json): - `id` (string) The ID of the Subscription Plan resource. - `created_at` (string) Timestamp of when the object was created. - `updated_at` (string) Timestamp of when the object was last updated. - `application_id` (string) The ID of the Application associated with the Subscription Plan. - `linked_to` (string) The ID of the [Merchant](#Merchants) resource that you wish to link to the Subscription Plan (i.e., the merchant that the subscription plan belongs to). At this time, only approved merchants with one of the following processors are valid: - DUMMY_V1 - FINIX_V1 - `linked_type` (string) The type of the resource that is specified in the linked_to field. Enum: "MERCHANT" - `billing_interval` (string) How often the subscriber is billed. Enum: "DAILY", "WEEKLY", "MONTHLY", "QUARTERLY", "YEARLY" - `nickname` (string) A human-readable name for the resource. - `plan_name` (string) A human-friendly name for the Subscription Plan. - `description` (string) A description of the Subscription Plan. - `amount` (integer) The total amount that will be debited in cents (e.g. 100 cents to debit $1.00). Example: 5000 - `currency` (string) ISO 4217 3-letter currency code. Enum: "USD", "CAD" - `default_total_billing_intervals` (integer,null) The total number of billing intervals for subscriptions created from this plan. This is the count of recurring billing cycles, with the interval unit defined by the plan’s billing_interval, such as weekly, monthly, etc. If included, the plan’s duration_type will be set to FIXED_TERM. Subscriptions created with this plan will use the default duration in the total_billing_intervals field. The subscription's expires_at field will be set to the datetime when the subscription expires based on the plan's default_total_billing_intervals. - `duration_type` (string,null) Whether subscriptions created from this plan will have a fixed term or will continue until canceled. If default_total_billing_intervals is set, this plan's duration_type is automatically set to FIXED_TERM. Otherwise, the duration_type is set to EVERGREEN. Enum: "FIXED_TERM", "EVERGREEN" - `billing_defaults` (object) Object containing default billing settings. - `billing_defaults.collection_method` (string) The method by which subscription payments are collected. At this time, only BILL_AUTOMATICALLY is supported. Enum: "BILL_AUTOMATICALLY" - `billing_defaults.send_invoice` (boolean) This feature has yet to be implemented. - `billing_defaults.send_receipt` (boolean) This feature has yet to be implemented. - `trial_defaults` (object) Object containing default trial settings. - `trial_defaults.interval_type` (string) The unit of time for the trial period. Enum: "DAY", "WEEK", "MONTH", "YEAR" - `trial_defaults.interval_count` (integer) The number of intervals of interval_type used to describe the duration of the trial. - `discount_phase_defaults` (object) - `discount_phase_defaults.billing_interval_count` (integer) The number of billing intervals the discount applies. After this period, the subscriber is charged the full amount. - `state` (string) The state of the Subscription Plan. Enum: "ACTIVE", "INACTIVE" - `tags` (object,null) Include up to 50 key: value pairs to annotate requests with custom metadata. - Maximum character length for individual keys is 40. - Maximum character length for individual values is 500. (For example, order_number: 25, item_type: produce, department: sales) - `_links` (object) An object containing link(s) relevant to the request. You can store these links for follow-up requests. - `_links.self` (object) - `_links.self.href` (string) The path to the new Subscription Plan resource. ## Response 401 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.code` (string) Enum: "UNKNOWN" - `_embedded.errors.logref` (string) A log reference identifier for the error, useful for debugging and support purposes. - `_embedded.errors.message` (string) - `_embedded.errors._links` (object) - `_embedded.errors._links.self` (object) - `_embedded.errors._links.self.href` (string) - `_embedded.errors._links.source` (object) ## Response 403 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.code` (string) Enum: "FORBIDDEN" - `_embedded.errors.logref` (string) A log reference identifier for the error, useful for debugging and support purposes. - `_embedded.errors.message` (string) - `_embedded.errors._links` (object) - `_embedded.errors._links.source` (object) - `_embedded.errors._links.source.href` (string) ## Response 404 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.code` (string) Enum: "NOT_FOUND" - `_embedded.errors.logref` (string) A log reference identifier for the error, useful for debugging and support purposes. - `_embedded.errors.message` (string) - `_embedded.errors._links` (object) - `_embedded.errors._links.source` (object) - `_embedded.errors._links.source.href` (string) ## Response 422 fields (application/json): - `total` (integer) - `_embedded` (object) - `_embedded.errors` (array) - `_embedded.errors.code` (string) Enum: "INVALID_FIELD" - `_embedded.errors.field` (string) - `_embedded.errors.logref` (string) A log reference identifier for the error, useful for debugging and support purposes. - `_embedded.errors.message` (string) - `_embedded.errors._links` (object) - `_embedded.errors._links.source` (object) - `_embedded.errors._links.source.href` (string)