swagger: '2.0' info: version: v1 title: Chargify description: |- ## Welcome This is a place to put general notes and extra information, for internal use. To get started designing/documenting this API, select a version on the left. # Title No Description schemes: - https consumes: - application/json produces: - application/json securityDefinitions: <>: type: basic Authorization: name: Authorization type: apiKey in: header paths: '/subscriptions/{subscription_id}/adjustments.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: integer post: operationId: POST_subscriptions-subscription_id-adjustments-json summary: Create Adjustment tags: - Adjustment - Adjustments description: |- ## Adjustments Documentation Full documentation on how to record Adjustments in the Chargify UI can be located [here](http://help.chargify.com/subscriptions/adjustments.html). It goes into greater detail on how the user interface will react when applying adjustments. ## Scenarios for adjustments | Scenario 1 | To create an Adjustment on a Subscription to increase the balance by a certain dollar amount, include the following to your request: | `"amount":"4.00"` | |------------|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------| | Scenario 2 | To increase the Subscription balance by a certain amount of cents, use the following attribute in your request: | `"amount_in_cents":100` | | Scenario 3 | To decrease the Subscription balance by a certain dollar amount, the request must contain: | `"amount":"-4.00"` | | Scenario 4 | To decrease the Subscription balance by a certain amount of cents, use: | `"amount_in_cents":"-400"` | | Scenario 5 | To set the Subscription balance to an exact dollar amount, include the following attributes to the request: | `"adjustment_method":"target", "amount":"100.00"` | | Scenario 6 | To set the Subscription balance to an exact positive amount of cents, the request must contain the following attributes: | `"adjustment_method":"target",` `"amount_in_cents":"10000"` | | Scenario 7 | To set the Subscription balance to an exact negative amount of cents, use the following attributes in the request: | `"adjustment_method":"target",` `"amount_in_cents":"-10000"` | parameters: - name: body in: body schema: $ref: '#/definitions/create-adjustment-request' example: adjustment: amount: '75' memo: Recording usage for May 2020 responses: '201': description: Created schema: $ref: '#/definitions/adjustment-response' examples: application/json: adjustment: amount: '75' memo: Recording usage for May 2020 '404': description: '' '422': description: '' schema: type: object properties: errors: type: array enum: - period_range_start must be a valid date. - period_range_end can't be greater than 20 years from now. - Performing this adjustment will take the balance negative. description: The error about a negative balance is only applicable to Relationship Invoicing sites. items: type: string security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-adjustmentsjson beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 201 '/portal/customers/{customer_id}/enable.json': parameters: - name: customer_id in: path required: true type: integer post: operationId: POST_portal-customers-customer_id-enable-json summary: Enable Billing Portal for Customer tags: - Billing Portal description: |- ## Billing Portal Documentation Full documentation on how the Billing Portal operates within the Chargify UI can be located [here](https://help.chargify.com/billing-portal/introduction.html). This documentation is focused on how the to configure the Billing Portal Settings, as well as Subscriber Interaction and Merchant Management of the Billing Portal. You can use this endpoint to enable Billing Portal access for a Customer, with the option of sending the Customer an Invitation email at the same time. ## Billing Portal Security If your customer has been invited to the Billing Portal, then they will receive a link to manage their subscription (the “Management URL”) automatically at the bottom of their statements, invoices, and receipts. **This link changes periodically for security and is only valid for 65 days.** If you need to provide your customer their Management URL through other means, you can retrieve it via the API. Because the URL is cryptographically signed with a timestamp, it is not possible for merchants to generate the URL without requesting it from Chargify. In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), please **do not** make an API request to Chargify every time. parameters: - name: auto_invite in: query description: 'When set to 1, an Invitation email will be sent to the Customer. When set to 0, or not sent, an email will not be sent.' type: boolean responses: '200': description: '' schema: $ref: '#/definitions/enable-billing-portal-response' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Portal is already enabled for this customer. security: - <>: [] x-stoplight: id: POST_portal-customers-customerid-enablejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/portal/customers/{customer_id}/management_link.json': parameters: - name: customer_id in: path description: The Customer ID. required: true type: integer get: operationId: GET_portal-customers-customer_id-management_link-format summary: Read Billing Portal Management Link tags: - Billing Portal - incomplete description: |- ## Read the Management Link This method will provide to the API user the exact URL required for a subscriber to access the Billing Portal. ## Rules for Management Link API + When retrieving a management URL, multiple requests for the same customer in a short period will return the **same** URL + We will not generate a new URL for 15 days + You must cache and remember this URL if you are going to need it again within 15 days + Only request a new URL after the `new_link_available_at` date + You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you will be blocked from further Management URL requests (with a response code `429`) responses: '200': description: OK schema: type: object properties: url: type: string fetch_count: type: integer created_at: type: string new_link_available_at: type: string expires_at: type: string last_invite_sent_at: type: - 'null' - string examples: application/json: url: 'https://www.billingportal.com/manage/19804639/1517596469/bd16498719a7d3e6' fetch_count: 1 created_at: '2018-02-02T18:34:29Z' new_link_available_at: '2018-02-17T18:34:29Z' expires_at: '2018-04-08T17:34:29Z' last_invite_sent_at: '2018-02-02T18:34:29Z' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Billing Portal is not enabled for this customer. '429': description: '' schema: type: object properties: errors: type: object properties: error: type: string examples: application/json: errors: error: Too many requests for this customer's management link security: - <>: [] x-stoplight: id: GET_portal-customers-customer_id-management_link-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/portal/customers/{customer_id}/invitations/invite.json': parameters: - name: customer_id in: path required: true type: integer post: operationId: POST_portal-customers-customer_id-invitations-invite-json summary: Resend Billing Portal Invitation for Customer tags: - Billing Portal description: |- ## Resend Billing Portal Invitation for Customer You can resend a customer's Billing Portal invitation. If you attempt to resend an invitation 5 times within 30 minutes, you will receive a `422` response with `error` message in the body. If you attempt to resend an invitation when the Billing Portal is already disabled for a Customer, you will receive a `422` error response. If you attempt to resend an invitation when the Billing Portal is already disabled for a Customer, you will receive a `422` error response. If you attempt to resend an invitation when the Customer does not exist a Customer, you will receive a `404` error response. ## Limitations This endpoint will only return a JSON response. responses: '200': description: '' schema: type: object properties: last_sent_at: type: string last_accepted_at: type: string send_invite_link_text: type: string uninvited_count: type: number examples: application/json: last_sent_at: enim Duis esse dolore last_accepted_at: adipisicing magna do in irure send_invite_link_text: veniam sit uninvited_count: 66254678 '404': description: '' schema: type: object '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Too many requests for this customer. You can perform 5 requests within 00:30:00.' security: - <>: [] x-stoplight: id: POST_portal-customers-customerid-invitations-invitejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/portal/customers/{customer_id}/invitations/revoke.json': parameters: - name: customer_id in: path required: true type: integer delete: operationId: DELETE_portal-customers-customer_id-invitations-revoke-json summary: Revoke Billing Portal Invitation for Customer tags: - Billing Portal description: |- ## Revoke Billing Portal Invitation for Customer You can revoke a customer's Billing Portal invitation. If you attempt to revoke an invitation when the Billing Portal is already disabled for a Customer, you will receive a 422 error response. ## Limitations This endpoint will only return a JSON response. responses: '200': description: '' schema: type: object properties: last_sent_at: type: string last_accepted_at: type: string uninvited_count: type: integer examples: application/json: last_sent_at: Not Invited last_accepted_at: Invite Revoked uninvited_count: 8 '422': description: '' schema: type: object security: - <>: [] x-stoplight: id: DELETE_portal-customers-customerid-invitations-revokejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/product_families/{product_family_id}/{plural_kind}.json': parameters: - name: product_family_id in: path required: true type: integer - name: plural_kind in: path required: true type: string enum: - metered_components - quantity_based_components - on_off_components - prepaid_usage_components post: operationId: POST_product_families-product_family_id-plural_kind-json summary: Create Component tags: - Component - Components description: "## Create Component\n\nThis request will create a component definition under the specified product family. These component definitions determine what components are named, how they are measured, and how much they cost.\n\nComponents can then be added and “allocated” for each subscription to a product in the product family. These component line-items affect how much a subscription will be charged, depending on the current allocations (i.e. 4 IP Addresses, or SSL “enabled”)\n\nThis documentation covers both component definitions and component line-items. Please understand the difference.\n\nPlease note that you may not edit components via API. To do so, please log into the application.\n\n### Component Documentation\n\nFor more information on components, please see our documentation [here](https://help.chargify.com/products/product-components.html).\n\nFor information on how to record component usage against a subscription, please see the following resources:\n\n+ [Proration and Component Allocations](https://help.chargify.com/subscriptions/setting-component-allocations.html)\n+ [Recording component usage against a subscription](https://help.chargify.com/subscriptions/subscription-summary.html#components-line-items)\n\n## Plural Kind \n\nIn order to create a component via API, a `plural_kind` is required. Plural kind is defined as the endpoint for the type of component you wish to create.\n\nUse one of the following:\n\n+ metered_components\n+ quantity_based_components\n+ on_off_components\n+ prepaid_usage_components\n\n## Metered Component Example\n\n```\n{\n \"metered_component\": {\n \"name\": \"Text messages\",\n \"unit_name\": \"text message\",\n \"taxable\": false,\n \"pricing_scheme\": \"stairstep\",\n \"prices\": [\n {\n \"starting_quantity\": 1,\n \"unit_price\": 1,\n \"component\": null\n }\n ]\n }\n}\n```\n\n## Quantity Based Example\n\n**Per Unit Example**\n\n```\n{\n \"quantity_based_component\": {\n \"name\": \"Quantity Based Component\",\n \"unit_name\": \"Component\",\n \"description\": \"Example of JSON per-unit component example\",\n \"pricing_scheme\": \"per_unit\",\n \"unit_price\": \"10\",\n \"taxable\": \"1\"\n \"display_on_hosted_page\": \"1\",\n \"allow_fractional_quantities\": \"1\",\n \"public_signup_page_ids\": [\"323397\"],\n \"recurring\": true\n}\n```\n\n**Stairstep Example**\n\n```\n{\n \"quantity_based_component\": {\n \"name\": \"Quantity Based Component\",\n \"unit_name\": \"Quantity Based Component\",\n \"description\": \"Example of JSON stairstep example\",\n \"pricing_scheme\": \"stairstep\",\n \"taxable\": \"1\",\n \"prices_attributes\": \n [\n {\n \"starting_quantity\": \"1\",\n \"ending_quantity\": \"100\",\n \"unit_price\": \"50\"\n },\n {\n \"starting_quantity\": \"101\",\n \"ending_quantity\": \"200\",\n \"unit_price\": \"10\"\n }\n ],\n \"display_on_hosted_page\": \"1\",\n \"allow_fractional_quantities\": \"1\",\n \"public_signup_page_ids\": [\"323397\"]\n }\n}\n```\n\n**Volume Example**\n\n```\n{\n \"quantity_based_component\": {\n \"name\": \"Quantity Based Component\",\n \"unit_name\": \"Quantity Based Component\",\n \"description\": \"Example of JSON volume component example\",\n \"pricing_scheme\": \"volume\",\n \"taxable\": \"1\",\n \"prices_attributes\": [\n {\n \"starting_quantity\": \"1\",\n \"ending_quantity\": \"10\",\n \"unit_price\": \"10\"\n },\n {\n \"starting_quantity\": \"11\",\n \"ending_quantity\": \"20\",\n \"unit_price\": \"5\"\n }\n ],\n \"display_on_hosted_page\": \"1\",\n \"allow_fractional_quantities\": \"1\",\n \"public_signup_page_ids\": [\"323397\"]\n }\n}\n```\n\n**Tiered Example**\n\n```\n{\n \"quantity_based_component\": {\n \"name\": \"Quantity Based Component\",\n \"unit_name\": \"Quantity Based Component\",\n \"description\": \"Example of JSON for tiered quantity based component\",\n \"taxable\": \"1\",\n \"pricing_scheme\": \"tiered\",\n \"prices_attributes\": [\n {\n \"starting_quantity\": \"1\",\n \"ending_quantity\": \"20\",\n \"unit_price\": \"50\"\n },\n {\n \"starting_quantity\": \"21\",\n \"ending_quantity\": \"40\",\n \"unit_price\": \"25\"\n }\n ],\n \"display_on_hosted_page\": \"1\",\n \"allow_fractional_quantities\": \"1\",\n \"public_signup_page_ids\": [\"323397\"]\n }\n}\n```\n\n\n## On/Off Component\n\n```\n{\n \"on_off_component\": {\n \"name\": \"Annual Support Services\",\n \"description\": \"Prepay for support services\",\n \"taxable\": \"1\",\n \"price_attributes\": {\n \"unit_price\": \"100.00\",\n \"starting_quantity\": \"0\"\n },\n \"display_on_hosted_page\": \"1\",\n \"public_signup_page_ids\": [\"320495\"]\n}\n```\n\n## Create a Component with Default Proration Schemes\n\nThis endpoint will allow you to create a component within Chargify with default proration schemes. The example in the definition will allow you to create a component for a quantity-based component.\n\n### On/Off Component with Default Proration Schemes\n\n```\n{\n \"on_off_component\": {\n \"name\": \"Annual Support Services\",\n \"description\": \"Prepay for support services\",\n \"taxable\": \"1\",\n \"price_attributes\": {\n \"unit_price\": \"100.00\",\n \"starting_quantity\": \"0\"\n },\n \"display_on_hosted_page\": \"1\",\n \"public_signup_page_ids\": [\"320495\"],\n \"upgrade_charge\": \"full\",\n \"downgrade_credit\": \"prorated\",\n }\n}\n```\n\n## Prepaid Usage Component Example\n\n```\n{\n \"prepaid_usage_component\":{\n \"name\":\"Minutes\",\n \"unit_name\":\"minutes\",\n \"unit_price\":2.0,\n \"pricing_scheme\":\"per_unit\",\n \"rollover_prepaid_remainder\": true,\n \"renew_prepaid_allocation\": true,\n \"expiration_interval\": 15,\n \"expiration_interval_unit\": \"day\",\n \"overage_pricing\":{\n \"pricing_scheme\":\"stairstep\",\n \"prices\":[\n {\n \"starting_quantity\":1,\n \"ending_quantity\":100,\n \"unit_price\":3.0,\n \"formatted_unit_price\":\"$3.00\"\n },\n {\n \"starting_quantity\":101,\n \"unit_price\":5.0,\n \"formatted_unit_price\":\"$5.00\"\n }\n ]\n }\n }\n}\n```\n\n\n## On/Off Component with Price Points\n\n```\n{\n\t\"on_off_component\": {\n\t\t\"name\": \"Annual Support Services\",\n\t\t\"description\": \"Prepay for support services\",\n\t\t\"taxable\": \"1\",\n\t\t\"pricing_scheme\": \"per_unit\",\n\t\t\"price_attributes\": {\n\t\t\t\"unit_price\": \"100.00\",\n\t\t\t\"starting_quantity\": \"0\"\n\t\t},\n\t\t\"display_on_hosted_page\": \"1\",\n\t\t\"public_signup_page_ids\": [\"320495\"],\n\t\t\"price_points\": [{\n\t\t\t\"name\": \"Wholesale\",\n\t\t\t\"handle\": \"wholesale-handle\",\n\t\t\t\"pricing_scheme\": \"per_unit\",\n\t\t\t\"prices\": [{\n\t\t\t\t\"starting_quantity\": \"0\",\n\t\t\t\t\"unit_price\": \"89.00\"\n\t\t\t}]\n\t\t}]\n\t}\n}\n```" parameters: - name: body in: body schema: $ref: '#/definitions/create-component' example: metered_component: name: Text messages unit_name: text message taxable: false pricing_scheme: stairstep prices: - starting_quantity: 1 unit_price: 1 component: null responses: '201': description: '' schema: $ref: '#/definitions/component' examples: application/json: component: id: 292609 name: Text messages pricing_scheme: stairstep unit_name: text message unit_price: null product_family_id: 528484 price_per_unit_in_cents: null kind: metered_component archived: false taxable: false description: null created_at: '2019-08-02T05:54:53-04:00' prices: - id: 47 component_id: 292609 starting_quantity: 1 ending_quantity: null unit_price: '1.0' price_point_id: 173 formatted_unit_price: $1.00 default_price_point_name: Original '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Name: cannot be blank.' - 'Unit name: cannot be blank.' - 'Pricing scheme: cannot be blank.' - At least 1 price bracket must be defined security: - <>: [] x-stoplight: id: POST_productfamilies-productfamilyid-pluralkindjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /components/lookup.json: get: operationId: GET_components-lookup-json summary: Read Component tags: - Component - Components description: |- ## Read Component by Handle This request will return information regarding a component having the handle you provide. You can identify your components with a handle so you don't have to save or reference the IDs we generate. parameters: - name: handle in: query description: The handle of the component you wish to retrieve. required: true type: string responses: '200': description: '' schema: $ref: '#/definitions/component' examples: application/json: component: id: 399853 name: Annual Support Services pricing_scheme: null unit_name: on/off unit_price: '100.0' product_family_id: 997233 price_per_unit_in_cents: null kind: on_off_component archived: false taxable: true description: Prepay for support services default_price_point_id: 121003 price_point_count: 4 price_points_url: 'https://general-goods.chargify.com/components/399853/price_points' tax_code: D0000000 recurring: true upgrade_charge: null downgrade_credit: null created_at: '2019-08-02T05:54:53-04:00' default_price_point_name: Original product_family_name: Chargify security: - <>: [] x-stoplight: id: GET_components-lookupjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/product_families/{product_family_id}/components/{component_id}.json': parameters: - name: product_family_id in: path required: true type: integer - name: component_id in: path description: 'A component identifier. Either a Chargify ID or the handle you have attached to the component, prefixed with "handle:"' required: true type: integer pattern: '\Ahandle:[a-z0-9][a-z0-9\-_:]*\z/' get: operationId: GET_product_families-product_family_id-components-component_id-json summary: Read Component by Id tags: - Component - Components description: |- ## Read a Specific Component for a Product Family This request will return information regarding a component from a specific product family. responses: '200': description: '' schema: $ref: '#/definitions/component' examples: application/json: |- { "component": { "id": 399853, "name": "Annual Support Services", "pricing_scheme": null, "unit_name": "on/off", "unit_price": "100.0", "product_family_id": 997233, "price_per_unit_in_cents": null, "kind": "on_off_component", "archived": false, "taxable": true, "description": "Prepay for support services", "default_price_point_id": 121003, "price_point_count": 4, "price_points_url": "https://general-goods.chargify.com/components/399853/price_points", "tax_code": "D0000000", "recurring": true, "upgrade_charge": null, "downgrade_credit": null, "created_at": "2019-08-02T05:54:53-04:00", "default_price_point_name": "Original", "product_family_name": "Chargify } } security: - <>: [] x-stoplight: id: GET_productfamilies-productfamilyid-components-componentidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_product_families-product_family_id-components-component_id-json summary: Archive Component tags: - Component - Components description: Sending a DELETE request to this endpoint will archive the component. All current subscribers will be unffected; their subscription/purchase will continue to be charged as usual. responses: '200': description: '' schema: $ref: '#/definitions/component' examples: application/json: component: id: 25407138 name: cillum aute pricing_scheme: in incididu unit_name: nulla in unit_price: Excepteur veniam product_family_id: -56705047 kind: prepaid_usage_component archived: true taxable: false description: reprehenderit laborum qui fugiat default_price_point_id: -64328176 price_point_count: 15252407 price_points_url: dolor mollit consequat tax_code: ea nisi recurring: false created_at: dolor qui deserunt tempor default_price_point_name: cupidatat Lorem non aliqua product_family_name: do elit hide_date_range_on_invoice: false '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Component cannot be archived. Please make sure it hasn't already been archived. security: - <>: [] x-stoplight: id: DELETE_productfamilies-productfamilyid-components-componentidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/product_families/{product_family_id}/components/handle:{component_handle}.json': parameters: - name: product_family_id in: path required: true type: integer - name: component_handle in: path required: true type: string get: operationId: 'GET_product_families-product_family_id-components-handle:component_handle-json' summary: Read Component by Handle tags: - Component - Components description: |- ## Read a Specific Component for a Product Family This request will return information regarding a component from a specific product family. You can now pass either an integer as the `component_id` or the component handle as a string prefixed by `handle:` ### Simplified example using component_id as handle: ``` curl mysub.chargify.com/product_families/999/components/handle:foo ``` ### Simplified example using component_id as integer ``` curl mysub.chargify.com/product_families/999/components/999 ``` both examples assume component with id 999 has handle 'foo' responses: '200': description: '' schema: $ref: '#/definitions/component' examples: application/json: component: id: 24 name: 24/7 Support handle: my-handle pricing_scheme: null unit_name: on/off unit_price: '1.0' product_family_id: 4 price_per_unit_in_cents: null kind: on_off_component archived: false taxable: false description: null default_price_point_id: 104 price_point_count: 1 price_points_url: 'http://acme.chargify.test/components/24/price_points' tax_code: null recurring: true upgrade_charge: null downgrade_credit: null created_at: '2019-08-02T05:54:53-04:00' default_price_point_name: Original security: - <>: [] x-stoplight: id: GET_productfamilies-productfamilyid-components-handlecomponenthandlejson beforeScript: null afterScript: null public: true mock: enabled: true dynamic: false statusCode: 200 /components.json: get: operationId: GET_components-json summary: Read Components for Site tags: - incomplete - Component - Components description: |- ## Read Components for a Site This request will return a list of components for a site. parameters: - $ref: '#/parameters/trait:componentQueryString:date_field' - $ref: '#/parameters/trait:componentQueryString:start_date' - $ref: '#/parameters/trait:componentQueryString:end_date' - $ref: '#/parameters/trait:componentQueryString:start_datetime' - $ref: '#/parameters/trait:componentQueryString:end_datetime' - $ref: '#/parameters/trait:includesArchive:include_archived' - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: '' schema: type: array items: $ref: '#/definitions/component' examples: application/json: - component: id: 399850 name: $1.00 component pricing_scheme: per_unit unit_name: Component unit_price: '1.0' product_family_id: 997233 price_per_unit_in_cents: null kind: quantity_based_component archived: false taxable: false description: Component default_price_point_id: 121000 prices: - id: 630687 component_id: 399850 starting_quantity: 1 ending_quantity: null unit_price: '1.0' price_point_id: 121000 formatted_unit_price: $1.00 price_point_count: 2 price_points_url: 'https://general-goods.chargify.com/components/399850/price_points' tax_code: null recurring: true upgrade_charge: null downgrade_credit: null created_at: '2019-08-01T09:35:38-04:00' default_price_point_name: Original product_family_name: Chargify - component: id: 399853 name: Annual Support Services pricing_scheme: null unit_name: on/off unit_price: '100.0' product_family_id: 997233 price_per_unit_in_cents: null kind: on_off_component archived: false taxable: true description: Prepay for support services default_price_point_id: 121003 price_point_count: 4 price_points_url: 'https://general-goods.chargify.com/components/399853/price_points' tax_code: D0000000 recurring: true upgrade_charge: null downgrade_credit: null created_at: '2019-08-01T09:35:37-04:00' default_price_point_name: Original product_family_name: Chargify - component: id: 386937 name: Cancellation fee pricing_scheme: null unit_name: on/off unit_price: '35.0' product_family_id: 997233 price_per_unit_in_cents: null kind: on_off_component archived: false taxable: false description: '' default_price_point_id: 108307 price_point_count: 1 price_points_url: 'https://general-goods.chargify.com/components/386937/price_points' tax_code: null recurring: true upgrade_charge: null downgrade_credit: null created_at: '2019-08-01T09:35:38-04:00' default_price_point_name: Original product_family_name: Chargify security: - <>: [] x-stoplight: id: GET_componentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/product_families/{product_family_id}/components.json': parameters: - name: product_family_id in: path required: true type: integer get: operationId: GET_product_families-product_family_id-components-json summary: List Components for Product Family tags: - incomplete - Component - Components description: |- ## Read Components for a Product Family This request will return a list of components for a particular product family. parameters: - $ref: '#/parameters/trait:includesArchive:include_archived' responses: '200': description: '' schema: type: array items: $ref: '#/definitions/component' examples: application/json: - component: id: 399850 name: $1.00 component pricing_scheme: per_unit unit_name: Component unit_price: '1.0' product_family_id: 997233 price_per_unit_in_cents: null kind: quantity_based_component archived: false taxable: false description: Component default_price_point_id: 121000 prices: - id: 630687 component_id: 399850 starting_quantity: 1 ending_quantity: null unit_price: '1.0' price_point_id: 121000 formatted_unit_price: $1.00 price_point_count: 2 price_points_url: 'https://general-goods.chargify.com/components/399850/price_points' tax_code: null recurring: true upgrade_charge: null downgrade_credit: null created_at: '2019-08-01T09:35:38-04:00' default_price_point_name: Original product_family_name: Chargify - component: id: 399853 name: Annual Support Services pricing_scheme: null unit_name: on/off unit_price: '100.0' product_family_id: 997233 price_per_unit_in_cents: null kind: on_off_component archived: false taxable: true description: Prepay for support services default_price_point_id: 121003 price_point_count: 4 price_points_url: 'https://general-goods.chargify.com/components/399853/price_points' tax_code: D0000000 recurring: true upgrade_charge: null downgrade_credit: null created_at: '2019-08-01T09:35:37-04:00' default_price_point_name: Original product_family_name: Chargify - component: id: 386937 name: Cancellation fee pricing_scheme: null unit_name: on/off unit_price: '35.0' product_family_id: 997233 price_per_unit_in_cents: null kind: on_off_component archived: false taxable: false description: '' default_price_point_id: 108307 price_point_count: 1 price_points_url: 'https://general-goods.chargify.com/components/386937/price_points' tax_code: null recurring: true upgrade_charge: null downgrade_credit: null created_at: '2019-08-01T09:35:38-04:00' default_price_point_name: Original product_family_name: Chargify security: - <>: [] x-stoplight: id: GET_productfamilies-productfamilyid-componentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/components/{component_id}/price_points.json': parameters: - name: component_id in: path required: true type: string post: operationId: POST_components-component_id-price_points-json summary: Create Price Point tags: - Components description: |- ## Create a Component Price Point This endpoint can be used to create a new price point for an existing component. ## Example for Prepaid Usage Component Creating a price point for a prepaid usage component works similarly to creating a price point for any other type of component except that the `overage_pricing` object is **required**. This object must include the relevant overage pricing details (`pricing_scheme` and `prices`) for the price point being created. In addition, parameters can be sent to control prepaid-specific behavior such as allocation renewal, rollover of unused units and expiration dates. ``` { "price_point": { "name": "MSRP", "handle": "msrp", "pricing_scheme": "stairstep", "renew_prepaid_allocation": false, "rollover_prepaid_remainder": true, "expiration_interval": 2, "expiration_interval_unit": "month", "prices": [ { "starting_quantity": 1, "ending_quantity": 100, "unit_price": 5 }, { "starting_quantity": 101, "unit_price": 4 } ], "overage_pricing": { "pricing_scheme": "stairstep", "prices": [ { "starting_quantity": 1, "ending_quantity": 100, "unit_price": 4, "formatted_unit_price": "$4.00" } ] } } }``` parameters: - name: body in: body schema: $ref: '#/definitions/components-price-points-create-price-point-request' example: price_point: name: Wholesale handle: wholesale-handle pricing_scheme: stairstep prices: - starting_quantity: '1' ending_quantity: '100' unit_price: '5.00' - starting_quantity: '101' unit_price: '4.00' responses: '200': description: '' schema: $ref: '#/definitions/components-price-points-create-price-point-response' examples: application/json: price_point: id: 79 default: false name: Wholesale pricing_scheme: stairstep component_id: 74 handle: wholesale-handle archived_at: null created_at: '2017-07-05T13:44:30-04:00' updated_at: '2017-07-05T13:44:30-04:00' prices: - id: 119 component_id: 74 starting_quantity: 1 ending_quantity: 100 unit_price: '5.0' - id: 120 component_id: 74 starting_quantity: 101 ending_quantity: null unit_price: '4.0' security: - <>: [] x-stoplight: id: POST_components-componentid-pricepointsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_components-component_id-price_points-json summary: Read Price Points tags: - Components description: |- ## Read Price Points Use this endpoint to read current price points that are associated with a component. You may specify the component by using either the numeric id or the `handle:gold` syntax. When fetching a component's price points, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. If the price point is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. parameters: - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': $ref: '#/responses/trait:pagination20:200' '201': description: '' schema: $ref: '#/definitions/components-price-points-list-price-points-response' examples: application/json: price_points: - id: 80 default: false name: Wholesale Two pricing_scheme: per_unit component_id: 74 handle: wholesale-two archived_at: null created_at: '2017-07-05T13:55:40-04:00' updated_at: '2017-07-05T13:55:40-04:00' prices: - id: 121 component_id: 74 starting_quantity: 1 ending_quantity: null unit_price: '5.0' - id: 81 default: false name: MSRP pricing_scheme: per_unit component_id: 74 handle: msrp archived_at: null created_at: '2017-07-05T13:55:40-04:00' updated_at: '2017-07-05T13:55:40-04:00' prices: - id: 122 component_id: 74 starting_quantity: 1 ending_quantity: null unit_price: '4.0' security: - <>: [] x-stoplight: id: GET_components-componentid-pricepointsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/components/{component_id}/price_points/{price_point_id}/default.json': parameters: - name: component_id in: path required: true type: string - name: price_point_id in: path required: true type: string put: operationId: PUT_components-component_id-price_points-price_point_id-default-json summary: Promoting Price Point to Default tags: - Components description: |- Sets a new default price point for the component. This new default will apply to all new subscriptions going forward - existing subscriptions will remain on their current price point. See [Price Points Documentation](https://help.chargify.com/products/product-components.html#price-points) for more information on price points and moving subscriptions between price points. responses: '201': description: '' schema: $ref: '#/definitions/components-create-response-post' security: - <>: [] x-stoplight: id: PUT_components-componentid-pricepoints-pricepointid-defaultjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/components/{component_id}/price_points/bulk.json': parameters: - name: component_id in: path required: true type: string post: operationId: POST_components-component_id-price_points-bulk-json summary: Create Bulk Price Points tags: - Components parameters: - name: body in: body schema: $ref: '#/definitions/components-price-points-bulk-create-price-points-request' example: price_points: - name: Wholesale handle: wholesale pricing_scheme: per_unit prices: - starting_quantity: 1 unit_price: 5 - name: MSRP handle: msrp pricing_scheme: per_unit prices: - starting_quantity: 1 unit_price: 4 responses: '200': description: '' schema: $ref: '#/definitions/components-price-points-list-price-points-response' examples: application/json: price_points: - id: 80 default: false name: Wholesale Two pricing_scheme: per_unit component_id: 74 handle: wholesale-two archived_at: null created_at: '2017-07-05T13:55:40-04:00' updated_at: '2017-07-05T13:55:40-04:00' prices: - id: 121 component_id: 74 starting_quantity: 1 ending_quantity: null unit_price: '5.0' - id: 81 default: false name: MSRP pricing_scheme: per_unit component_id: 74 handle: msrp archived_at: null created_at: '2017-07-05T13:55:40-04:00' updated_at: '2017-07-05T13:55:40-04:00' prices: - id: 122 component_id: 74 starting_quantity: 1 ending_quantity: null unit_price: '4.0' security: - <>: [] x-stoplight: id: POST_components-componentid-pricepoints-bulkjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/components/{component_id}/price_points/{price_point_id}.json': parameters: - name: component_id in: path required: true type: string - name: price_point_id in: path required: true type: string put: operationId: PUT_components-component_id-price_points-price_point_id-json summary: Update Price Point tags: - Components description: |- When updating a price point, it's prices can be updated as well by creating new prices or editing / removing existing ones. Passing in a price bracket without an `id` will attempt to create a new price. Including an `id` will update the corresponding price, and including the `_destroy` flag set to true along with the `id` will remove that price. parameters: - name: body in: body schema: $ref: '#/definitions/components-price-points-update-price-point-request' example: price_point: name: Default prices: - id: 1 ending_quantity: 100 unit_price: 5 - id: 2 _destroy: 'true' - starting_quantity: 101 unit_price: 4 responses: '200': description: '' schema: $ref: '#/definitions/components-price-points-create-price-point-response' security: - <>: [] x-stoplight: id: PUT_components-componentid-pricepoints-pricepointidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/components/{component_id}/price_points/{price_point_id}.{format}': parameters: - name: component_id in: path required: true type: string - name: price_point_id in: path required: true type: string - name: format in: path required: true type: string delete: operationId: DELETE_components-component_id-price_points-price_point_id-format summary: Archive Price Point tags: - Components description: A price point can be archived at any time. Subscriptions using a price point that has been archived will continue using it until they're moved to another price point. responses: '201': description: '' schema: type: object properties: price_point: type: object properties: id: type: integer default: type: boolean name: type: string pricing_scheme: type: string component_id: type: integer handle: type: string archived_at: type: string created_at: type: string updated_at: type: string prices: type: array items: type: object properties: id: type: integer component_id: type: integer starting_quantity: type: integer ending_quantity: type: - integer - 'null' unit_price: type: string examples: application/json: price_point: id: 79 default: false name: Wholesale pricing_scheme: stairstep component_id: 74 handle: wholesale-handle archived_at: '2017-07-06T15:04:00-04:00' created_at: '2017-07-05T13:44:30-04:00' updated_at: '2017-07-05T13:44:30-04:00' prices: - id: 119 component_id: 74 starting_quantity: 1 ending_quantity: 100 unit_price: '5.0' - id: 120 component_id: 74 starting_quantity: 101 ending_quantity: null unit_price: '4.0' security: - <>: [] x-stoplight: id: DELETE_components-componentid-pricepoints-pricepointidformat beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/components/{component_id}/price_points/{price_point_id}/unarchive.json': parameters: - name: component_id in: path required: true type: string - name: price_point_id in: path required: true type: string put: operationId: PUT_components-component_id-price_points-price_point_id-unarchive-json summary: Unarchive Price Point tags: - Components responses: '200': description: '' schema: $ref: '#/definitions/components-price-points-create-price-point-response' examples: application/json: price_point: id: 79 default: false name: Wholesale pricing_scheme: stairstep component_id: 74 handle: wholesale-handle archived_at: null created_at: '2017-07-05T13:44:30-04:00' updated_at: '2017-07-05T13:44:30-04:00' prices: - id: 119 component_id: 74 starting_quantity: 1 ending_quantity: 100 unit_price: '5.0' - id: 120 component_id: 74 starting_quantity: 101 ending_quantity: null unit_price: '4.0' security: - <>: [] x-stoplight: id: PUT_components-componentid-pricepoints-pricepointid-unarchivejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/price_points/{price_point_id}/currency_prices.json': parameters: - name: price_point_id in: path required: true type: string put: operationId: PUT_price_points-price_point_id-currency_prices-json summary: Update Currency Prices tags: - Components description: This endpoint allows you to update currency prices for a given currency that has been defined on the site level in your settings. parameters: - name: body in: body schema: type: object properties: currency_prices: type: array items: type: object properties: id: type: integer description: ID of the currency price record being updated. price: type: integer description: New price for the given currency. required: - id - price required: - currency_prices example: currency_prices: - id: 100 price: 51 - id: 101 price: 41 responses: '200': description: '' schema: type: array items: $ref: '#/definitions/price-point-currency-price' security: - <>: [] x-stoplight: id: PUT_pricepoints-pricepointid-currencypricesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 post: operationId: POST_price_points-price_point_id-currency_prices-json summary: Create Currency Prices tags: - Components description: |- This endpoint allows you to create currency prices for a given currency that has been defined on the site level in your settings. When creating currency prices, they need to mirror the structure of your primary pricing. For each price level defined on the component price point, there should be a matching price level created in the given currency. parameters: - name: body in: body schema: type: object properties: currency_prices: type: array items: type: object properties: currency: type: string description: ISO code for a currency defined on the site level. price: type: integer description: Price for the price level in this currency. price_id: type: integer description: ID of the price that this corresponds with. required: - currency - price - price_id required: - currency_prices example: currency_prices: - currency: EUR price: 50 price_id: 20 - currency: EUR price: 40 price_id: 21 responses: '200': description: '' schema: type: array items: $ref: '#/definitions/price-point-currency-price' security: - <>: [] x-stoplight: id: POST_pricepoints-pricepointid-currencypricesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/components/{component_id}.json': parameters: - name: subscription_id in: path description: The ID of the Subscription from which you want to get a listing of applied Components. required: true type: integer - name: component_id in: path description: 'The ID of the Component you want to retrieve information about. Alternatively, the component''s handle prefixed by "handle:"' required: true type: integer get: operationId: GET_subscriptions-subscription_id-components-component_id-json summary: Read Component for Subscription tags: - Component - Subscriptions Components description: |- ## Read Component for Subscription This request will list information regarding a specific component owned by a subscription. responses: '200': description: OK schema: $ref: '#/definitions/subscriptions-component' examples: application/json: component: component_id: 193028 subscription_id: 14593192 allocated_quantity: 1 pricing_scheme: per_unit name: Users kind: quantity_based_component unit_name: Users '404': description: Not Found security: - <>: [] x-stoplight: id: GET_subscriptions-subscriptionid-components-componentidjson beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/components.json': parameters: - name: subscription_id in: path description: The ID of the Subscription from which you want to get a listing of applied Components. required: true type: integer get: operationId: GET_subscriptions-subscription_id-components-format summary: List Components for a Subscription tags: - Component - Subscriptions Components description: |- ## Read Components for a Subscription This request will list a subscription's applied components. ## Archived Components When requesting to list components for a given subscription, if the subscription contains **archived** components they will be listed in the server response. responses: '200': description: OK schema: $ref: '#/definitions/list-subscriptions-components' examples: application/json: - {} - component: unit_name: Text messages name: text_messages kind: metered_component component_id: 98322708341 subscription_id: 38855254509 allocated_quantity: 1500 unit_balance: 5000 - component: enabled: true subscription_id: 30336331837 unit_balance: 5000 name: text messages - {} security: - <>: [] x-stoplight: id: GET_subscriptions-subscription_id-components-format beforeScript: null afterScript: null public: true mock: enabled: true statusCode: 200 '/subscriptions/{subscription_id}/price_points.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-price_points-json summary: Bulk Update a Subscription's Component's Price Points tags: - Subscriptions Components description: |- ## Bulk Update a Subscription's Component's Price Points Updates the price points on one or more of a subscription's components. The `price_point` key can take either a: 1. Price point id (integer) 2. Price point handle (string) 3. `"_default"` string, which will reset the price point to the component's current default price point. parameters: - name: body in: body schema: $ref: '#/definitions/components-price-points-bulk-update-a-subscriptions-components-price-points' example: components: - component_id: 997 price_point: 1022 - component_id: 998 price_point: wholesale-handle - component_id: 999 price_point: _default responses: '200': description: '' schema: $ref: '#/definitions/components-price-points-bulk-update-a-subscriptions-components-price-points' examples: application/json: components: - component_id: 997 price_point: 1022 - component_id: 998 price_point: wholesale-handle - component_id: 999 price_point: _default '422': description: '' schema: type: array items: type: object properties: component_id: type: integer price_point: type: - integer - string message: type: string examples: application/json: - component_id: 997 price_point: 10023 message: Price Point does not belong to Component security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-pricepointsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/price_points/reset.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-price_points-reset-json summary: Bulk Reset a Subscription's Component's Price Points tags: - Subscriptions Components description: |- Resets all of a subscription's components to use the current default. **Note**: this will update the price point for all of the subscription's components, even ones that have not been allocated yet. responses: '200': description: '' schema: $ref: '#/definitions/components-price-points-bulk-reset-a-subscriptions-components-price-points' examples: application/json: subscription: id: -80293620 state: mollit exercitation ipsum trial_started_at: null trial_ended_at: null activated_at: nostrud nulla et created_at: qui L updated_at: in veniam aute in expires_at: null balance_in_cents: 50504234 current_period_ends_at: Lorem anim eu next_assessment_at: adipisicing ullamco canceled_at: null cancellation_message: mol next_product_id: null cancel_at_end_of_period: false payment_collection_method: Duis qui Excepteur laboris reprehenderit snap_day: null cancellation_method: eiusmod ipsum pariatur et adipisicing current_period_started_at: Ut quis non previous_state: 'occaecat proident sunt cillum ' signup_payment_id: -45156092 signup_revenue: do aliquip ea delayed_cancel_at: null coupon_code: null total_revenue_in_cents: -49740952 product_price_in_cents: 87617888 product_version_number: 13656635 payment_type: null referral_code: null coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: null current_billing_amount_in_cents: -26151968 customer: id: 15208337 first_name: ipsum culpa in labore eiusmod last_name: esse organization: null email: ex eiusmod created_at: ad occaecat cillum updated_at: ut aute proident est reference: laboris ea cupidatat address: null address_2: null city: id eiusmod proident state: magna eiusmod anim non zip: null country: null phone: null portal_invite_last_sent_at: null portal_invite_last_accepted_at: reprehenderit labore voluptate verified: null portal_customer_created_at: nisi aute reprehenderit Excepteur Duis cc_emails: eiusmod sunt tax_exempt: true product: id: -74447756 name: eu mollit nulla ut aute handle: esse dolor anim description: Lorem ut et non accounting_code: nisi request_credit_card: false expiration_interval: null expiration_interval_unit: fugiat aute do culpa dolor created_at: officia sint updated_at: sed price_in_cents: -4151649 interval: 20680876 interval_unit: nisi qui incididunt initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: sit archived_at: null require_credit_card: true return_params: magna eu taxable: true update_return_url: exercitation in tax_code: Excepteur aliqua sunt in initial_charge_after_trial: true version_number: 41642597 update_return_params: dolore labore product_family: id: -5356997 name: officia amet Lorem proident enim description: Duis handle: ea dolore dolore sunt accounting_code: null public_signup_pages: null security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-pricepoints-resetjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/components/{component_id}/allocations.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: integer - name: component_id in: path description: The Component ID. required: true type: integer post: operationId: POST_subscriptions-sub_id-components-comp_id-allocations-format summary: Allocate Component tags: - Allocation - Subscriptions Components description: "## Allocations Documentation\n\nFull documentation on how to record Allocations in the Chargify UI can be located [here](http://help.chargify.com/subscriptions/setting-component-allocations.html).It is focused on how allocations operate within the Chargify UI. It goes into greater detail on how the user interface will react when recording allocations.\n\nThis documentation also goes into greater detail on how proration is taken into consideration when applying component allocations.\n\n## Create Allocation\n\nThis endpoint creates a new allocation, setting the current allocated quantity for the Component and recording a memo.\n\n**Notice**: Allocations can only be updated for Quantity, On/Off, and Prepaid Components.\n\n## Proration Schemes\n\nChanging the allocated quantity of a component mid-period can result in either a Charge or Credit being applied to the subscription. When creating an allocation via the API, you can pass the `upgrade_charge`, `downgrade_credit`, and `accrue_charge` to be applied.\n\n**Notice:** These proration and accural fields will be ignored for Prepaid Components since this component type always generate charges immediately without proration.\n\nFor background information on prorated components and upgrade/downgrade schemes, see: API: [Setting Component Allocations.](). See the tables below for valid values.\n\n| upgrade_charge | Definition \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_|\n|----------------|-------------------------------------------------------------------|\n| `full` \_ \_ \_ \_ |\_A charge is added for the full price of the component. \_\_\_ \_ \_ \_ \_|\n| `prorated` \_ \_ |\_A charge is added for the prorated price of the component change. |\n| `none` \_ \_ \_ \_ |\_No charge is added. \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ |\n\n| downgrade_credit | Definition \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_|\n|------------------|---------------------------------------------------|\n| `full` \_ \_ \_ \_ \_ |\_A full price credit is added for the amount owed. |\n| `prorated` \_ \_ \_ |\_A prorated credit is added for the amount owed. \_ |\n| `none` \_ \_ \_ \_ \_ |\_No charge is added. \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ |\n\n| accrue_charge | Definition \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ \_ |\n|---------------|------------------------------------------------------------------------------------------------------------|\n| `true` \_ \_ \_ \_| Attempt to charge the customer at next renewal. |\n| `false` \_ \_ \_ |\_Attempt to charge the customer right away.\_If it fails, the charge will be accrued until the next renewal. |\n\n### Order of Resolution for upgrade_charge and downgrade_credit\n\n1. Per allocation in API call (within a single allocation of the `allocations` array)\n2. [Component-level default value]()\n3. Allocation API call top level (outside of the `allocations` array)\n4. [Site-level default value]()\n\n### Order of Resolution for accrue_charge\n\n1. Allocation API call top level (outside of the `allocations` array)\n2. [Site-level default value]()\n\n**NOTE: Proration uses the current price of the component as well as the current tax rates. Changes to either may cause the prorated charge/credit to be wrong.**\n\n## Quantity-Based Components\n\nThe following example will set a quantity of 5 for a quantity-based component.\n\n```\n{\n \"allocation\": {\n \"quantity\": 5,\n \"memo\": \"Recoding component purchase of Acme Support\"\n }\n}\n```\n\n## On/Off Components\n\nThe following example will toggle an on/off component to ON. A value of `0` will toggle the component to OFF.\n\n**Toggle OFF**\n\n```\n{\n \"allocation\": {\n \"quantity\": 0,\n \"memo\": \"Recoding component purchase of Acme Support\"\n }\n}\n```\n\n**Toggle ON**\n\n```\n{\n \"allocation\": {\n \"quantity\": 1,\n \"memo\": \"Recoding component purchase of Acme Support\"\n }\n}\n```" parameters: - name: body in: body schema: $ref: '#/definitions/create-allocation-request' example: allocation: quantity: 5 memo: Recoding component purchase of Acme Support responses: '201': description: Created schema: $ref: '#/definitions/allocation-response' examples: application/json: allocation: previous_quantity: 49 quantity: 85 subscription_id: 34187461132 timestamp: '2016-07-12T07:48:08.611Z' security: - <>: [] x-stoplight: id: POST_subscriptions-sub_id-components-comp_id-allocations-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 get: operationId: GET_subscriptions-sub_id-components-comp_id-allocations-format summary: Read Allocations tags: - Allocation - Subscriptions Components description: |- ## Read Allocations This endpoint returns the 50 most recent Allocations, ordered by most recent first. ## On/Off Components When a subscription's on/off component has been toggled to on (`1`) or off (`0`), usage will be logged in this response. ## Querying data via Chargify gem You can also query the current quantity via the [official Chargify Gem.]( http://github.com/chargify/chargify_api_ares) ```# First way component = Chargify::Subscription::Component.find(1, :params => {:subscription_id => 7}) puts component.allocated_quantity # => 23 # Second way component = Chargify::Subscription.find(7).component(1) puts component.allocated_quantity # => 23 ``` parameters: - name: body in: body schema: type: 'null' - $ref: '#/parameters/trait:pagination50:page' responses: '200': description: OK schema: type: array items: $ref: '#/definitions/allocation-response' examples: application/json: - allocation: memo: moving to 7 timestamp: '2012-11-20T22:00:37Z' quantity: 7 previous_quantity: 3 component_id: 11960 subscription_id: 2585595 proration_upgrade_scheme: no-prorate proration_downgrade_scheme: no-prorate - allocation: memo: null timestamp: '2012-11-20T21:48:09Z' quantity: 3 previous_quantity: 0 component_id: 11960 subscription_id: 2585595 proration_upgrade_scheme: no-prorate proration_downgrade_scheme: no-prorate '401': description: '' schema: type: string '404': description: '' '422': description: '' security: - <>: [] x-stoplight: id: GET_subscriptions-sub_id-components-comp_id-allocations-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/allocations.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: integer post: operationId: POST_subscriptions-subscription_id-allocations-json summary: Allocate Components tags: - Allocation - Subscriptions Components description: |- ## Create Multiple Allocations Creates multiple allocations, setting the current allocated quantity for each of the components and recording a memo. The charges and/or credits that are created will be rolled up into a single total which is used to determine whether this is an upgrade or a downgrade. Be aware of the Order of Resolutions explained below in determining the proration scheme. A `component_id` is required for each allocation. This endpoint only responds to JSON. It is not available for XML. parameters: - name: body in: body schema: $ref: '#/definitions/create-allocations-request' example: proration_upgrade_scheme: prorate-attempt-capture proration_downgrade_scheme: no-prorate allocations: - component_id: 123 quantity: 10 memo: foo - component_id: 456 quantity: 5 memo: bar responses: '201': description: OK schema: type: array items: $ref: '#/definitions/allocation-response' examples: application/json: - allocation: component_id: 193159 subscription_id: 15540611 quantity: 10 previous_quantity: 0 memo: foo timestamp: '2016-12-08T19:09:15Z' proration_upgrade_scheme: prorate-attempt-capture proration_downgrade_scheme: no-prorate payment: amount_in_cents: 1451 success: true memo: 'Payment for: Prorated component allocation changes.' id: 165473487 - allocation: component_id: 277221 subscription_id: 15540611 quantity: 5 previous_quantity: 0 memo: bar timestamp: '2016-12-08T19:09:15Z' proration_upgrade_scheme: prorate-attempt-capture proration_downgrade_scheme: no-prorate payment: amount_in_cents: 1451 success: true memo: 'Payment for: Prorated component allocation changes.' id: 165473487 '401': description: '' '404': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Quantity: cannot be blank.' security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-allocationsjson beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/allocations/preview.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST-preview-allocation summary: Preview Allocations tags: - Allocation - Subscriptions Components description: |- ## Preview Allocations Chargify offers the ability to preview a potential subscription's **quantity-based** or **on/off** component allocation in the middle of the current billing period. This is useful if you want users to be able to see the effect of a component operation before actually doing it. ## Fine-grained Component Control: Use with multiple `upgrade_charge`s or `downgrade_credits` When the allocation uses multiple different types of `upgrade_charge`s or `downgrade_credit`s, the Allocation is viewed as an Allocation which uses "Fine-Grained Component Control". As a result, the response will not include `direction` and `proration` within the `allocation_preview` at the `line_items` and `allocations` level respectfully. See example below for Fine-Grained Component Control response. parameters: - name: body in: body schema: $ref: '#/definitions/create-allocation-request' example: proration_upgrade_scheme: prorate-attempt-capture proration_downgrade_scheme: prorate allocations: - component_id: 554108 price_point_id: 325826 quantity: 10 memo: NOW - component_id: 565236 price_point_id: 341315 quantity: 10 memo: NOW responses: '201': description: '' schema: type: object properties: allocation_preview: type: object properties: start_date: type: string end_date: type: string subtotal_in_cents: type: integer total_tax_in_cents: type: integer total_discount_in_cents: type: integer total_in_cents: type: integer direction: type: string proration_scheme: type: string line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer component_id: type: integer direction: type: string accrue_charge: type: boolean allocations: type: array items: type: object properties: component_id: type: integer subscription_id: type: integer quantity: type: - number - integer previous_quantity: type: integer memo: type: string timestamp: type: - string - 'null' proration_upgrade_scheme: type: string proration_downgrade_scheme: type: string accrue_charge: type: boolean upgrade_charge: type: string downgrade_credit: type: string examples: application/json: allocation_preview: start_date: '2019-05-02T15:26:46Z' end_date: '2019-05-08T15:26:46Z' period_type: prorated total_in_cents: 150 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 150 existing_balance_in_cents: 0 accrue_charge: true line_items: - direction: upgrade transaction_type: charge kind: quantity_based_component amount_in_cents: 100 taxable_amount_in_cents: 0 discount_amount_in_cents: 0 memo: 'Foo: 0 to 10 foo' component_id: 123 component_handle: foo - direction: downgrade transaction_type: credit kind: quantity_based_component amount_in_cents: -20 taxable_amount_in_cents: 0 discount_amount_in_cents: 0 memo: 'Foo: 10 to 5 bar' component_id: 456 component_handle: bar - direction: upgrade transaction_type: credit kind: quantity_based_component amount_in_cents: 70 taxable_amount_in_cents: 0 discount_amount_in_cents: 0 memo: 'Foo: 0 to 10 baz' component_id: 789 component_handle: baz allocations: - accrue_charge: true upgrade_charge: prorated downgrade_credit: full component_handle: foo component_id: 123 memo: foo previous_price_point_id: 123 previous_quantity: 0 price_point_id: 123 proration_downgrade_scheme: full proration_upgrade_scheme: prorate-delay-capture quantity: 10 subscription_id: 123456 timestamp: null - accrue_charge: true upgrade_charge: full downgrade_credit: prorated component_handle: bar component_id: 456 memo: foo previous_price_point_id: 456 previous_quantity: 10 price_point_id: 456 proration_downgrade_scheme: prorate proration_upgrade_scheme: full-price-delay-capture quantity: 5 subscription_id: 123456 timestamp: null - accrue_charge: true upgrade_charge: full downgrade_credit: none component_handle: baz component_id: 789 memo: foo previous_price_point_id: 789 previous_quantity: 0 price_point_id: 789 proration_downgrade_scheme: no-prorate proration_upgrade_scheme: full-price-delay-capture quantity: 10 subscription_id: 123456 timestamp: null '422': description: '' schema: type: object properties: errors: type: array items: type: object properties: kind: type: string component_id: type: integer 'on': type: string message: type: string examples: application/json: errors: - kind: allocation component_id: 379512 'on': base message: Allocations can only be updated for quantity and on/off components. security: - <>: [] x-stoplight: id: POST-preview-allocation beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/components/{component_id}/allocations/{allocation_id}.json': parameters: - name: subscription_id in: path required: true type: string - name: component_id in: path required: true type: string - name: allocation_id in: path required: true type: string put: operationId: PUT_subscriptions-subscription_id-components-component_id-allocations-allocation_id-json summary: Update Prepaid Usage Allocation Expiration Date tags: - Subscriptions Components description: |- ## Updating a Prepaid Usage Allocation's Expiration Date When the expiration interval options are selected on a prepaid usage component price point, all allocations will be created with an expiration date. This expiration date can be changed after the fact to allow for extending or shortening the allocation's active window. In order to change a prepaid usage allocation's expiration date, a PUT call must be made to the allocation's endpoint with a new expiration date. ## Limitations A few limitations exist when changing an allocation's expiration date: - An expiration date can only be changed for an allocation that belongs to a price point with expiration interval options explicitly set. - An expiration date can be changed towards the future with no limitations. - An expiration date can be changed towards the past (essentially expiring it) up to the subscription's current period beginning date. parameters: - name: body in: body schema: type: object properties: allocation: type: object properties: expires_at: type: string example: allocation: expires_at: 05/07/2021 responses: '200': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: object properties: kind: type: string message: type: string examples: application/json: errors: - kind: base message: 'Credit scheme must be one of credit, refund or none.' security: - <>: [] x-stoplight: id: PUT_subscriptions-subscriptionid-components-componentid-allocations-allocationidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_subscriptions-subscription_id-components-component_id-allocations-allocation_id-json summary: Delete Prepaid Usage Allocation tags: - Subscriptions Components description: |- ## Delete Prepaid Usage Allocation Prepaid Usage components are unique in that their allocations are always additive. In order to reduce a subscription's allocated quantity for a prepaid usage component each allocation must be destroyed individually via this endpoint. ## Credit Scheme By default, destroying an allocation will generate a service credit on the subscription. This behavior can be modified with the optional `credit_scheme` parameter on this endpoint. The accepted values are: 1. `none`: The allocation will be destroyed and the balances will be updated but no service credit or refund will be created. 2. `credit`: The allocation will be destroyed and the balances will be updated and a service credit will be generated. This is also the default behavior if the `credit_scheme` param is not passed. 3. `refund`: The allocation will be destroyed and the balances will be updated and a refund will be issued along with a Credit Note. parameters: - name: body in: body schema: type: object properties: credit_scheme: type: string example: credit_scheme: none responses: '200': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: object properties: kind: type: string message: type: string examples: application/json: errors: - kind: base message: 'Credit scheme must be one of credit, refund or none.' security: - <>: [] x-stoplight: id: DELETE_subscriptions-subscriptionid-components-componentid-allocations-allocationidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/components/{component_id}/usages.json': parameters: - name: subscription_id in: path required: true type: string - name: component_id in: path description: 'either an integer or a string prefixed by "handle:"' required: true type: string post: operationId: POST_subscriptions-subscription_id-components-component_id-usages-json summary: Create Usage for Subscription tags: - Subscriptions Components description: |- ## Documentation Full documentation on how to create Components in the Chargify UI can be located [here](https://help.chargify.com/products/product-components.html). Additionally, for information on how to record component usage against a subscription, please see the following resources: + [Recording Metered Component Usage](https://help.chargify.com/subscriptions/setting-component-allocations.html#reporting-metered-component-usage) + [Reporting Prepaid Component Status](https://help.chargify.com/subscriptions/setting-component-allocations.html#reporting-prepaid-component-status) You may choose to report metered or prepaid usage to Chargify as often as you wish. You may report usage as it happens. You may also report usage periodically, such as each night or once per billing period. If usage events occur in your system very frequently (on the order of thousands of times an hour), it is best to accumulate usage into batches on your side, and then report those batches less frequently, such as daily. This will ensure you remain below any API throttling limits. If your use case requires higher rates of usage reporting, we recommend utilizing Events Based Components. ## Create Usage for Subscription This endpoint allows you to record an instance of metered or prepaid usage for a subscription. The `quantity` from usage for each component is accumulated to the `unit_balance` on the [Component Line Item](https://reference.chargify.com/v1/component-line-items/component-line-items) for the subscription. ## Price Point ID usage If you are using price points, for metered and prepaid usage components, Chargify gives you the option to specify a price point in your request. You do not need to specify a price point ID. If a price point is not included, the default price point for the component will be used when the usage is recorded. If an invalid `price_point_id` is submitted, the endpoint will return an error. ## Deducting Usage In the event that you need to reverse a previous usage report or otherwise deduct from the current usage balance, you may provide a negative quantity. Example: Previously recorded: ```{ "usage": { "quantity": 5000, "memo": "Recording 5000 units" } } ``` At this point, `unit_balance` would be `5000`. To reduce the balance to `0`, POST the following payload: ```{ "usage": { "quantity": -5000, "memo": "Deducting 5000 units" } } ``` The `unit_balance` has a floor of `0`; negative unit balances are never allowed. For example, if the usage balance is 100 and you deduct 200 units, the unit balance would then be `0`, not `-100`. ## FAQ Q. Is it possible to record metered usage for more than one component at a time? A. No. Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each. parameters: - name: body in: body schema: $ref: '#/definitions/create-usage' example: usage: quantity: 1000 price_point_id: '149416' memo: My memo responses: '200': description: '' schema: $ref: '#/definitions/usage' examples: application/json: usage: id: 138522957 memo: My memo created_at: '2017-11-13T10:05:32-06:00' price_point_id: 149416 quantity: 1000 '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Price point: could not be found.' security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-components-componentid-usagesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_subscriptions-subscription_id-components-component_id-usages-json summary: List Usages for Subscription tags: - Subscriptions Components description: |- ## Read Usage by Component This request will return a list of the usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription. This endpoint is not compatible with quantity-based components. ## Since Date and Until Date Usage Note: The `since_date` and `until_date` attributes each default to midnight on the date specified. For example, in order to list usages for January 20th, you would need to append the following to the URL. ``` ?since_date=2016-01-20&until_date=2016-01-21 ``` ## Read Usage by Handle Use this endpoint to read the previously recorded components for a subscription. You can now specify either the component id (integer) or the component handle prefixed by "handle:" to specify the unique identifier for the component you are working with. parameters: - $ref: '#/parameters/trait:componentParameters:since_id' - $ref: '#/parameters/trait:componentParameters:max_id' - $ref: '#/parameters/trait:componentParameters:since_date' - $ref: '#/parameters/trait:componentParameters:until_date' - $ref: '#/parameters/trait:componentParameters:page' - $ref: '#/parameters/trait:componentParameters:per_page' responses: '200': description: '' schema: type: array items: $ref: '#/definitions/usage' examples: application/json: - usage: id: 178534642 memo: '20' created_at: '2018-08-03T11:58:42-05:00' price_point_id: 242632 quantity: '20.0' component_id: 500093 component_handle: handle subscription_id: 22824464 - usage: id: 178534591 memo: '10' created_at: '2018-08-03T11:58:29-05:00' price_point_id: 242632 quantity: '10.0' component_id: 500093 component_handle: handle subscription_id: 22824464 security: - <>: [] x-stoplight: id: GET_subscriptions-subscriptionid-components-componentid-usagesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/event_based_billing/subscriptions/{subscription_id}/components/{component_id}/activate.json': parameters: - name: subscription_id in: path description: Subscription ID required: true type: string - name: component_id in: path description: Component ID required: true type: string post: operationId: POST_event_based_billing-subscriptions-subscription_id-components-component_id-activate-json summary: Activate Event-Based Component for Subscription tags: - Subscriptions Components description: |- In order to bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. Learn more about the role of activation in the [Events-Based Billing docs](https://help.chargify.com/events/billing-guide.html#activating-components-for-subscribers). Use this endpoint to activate an event-based component for a single subscription. Activating an event-based component causes Chargify to bill for events when the subscription is renewed. *Note: it is possible to stream events for a subscription at any time, regardless of component activation status. The activation status only determines if the subscription should be billed for event-based component usage at renewal.* responses: '200': description: '' schema: type: object security: - <>: [] x-stoplight: id: POST_eventbasedbilling-subscriptions-subscriptionid-components-componentid-activatejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/event_based_billing/subscriptions/{subscription_id}/components/{component_id}/deactivate.json': parameters: - name: subscription_id in: path description: Subscription ID required: true type: string - name: component_id in: path description: Component ID required: true type: string post: operationId: POST_event_based_billing-subscriptions-subscription_id-components-component_id-deactivate-json summary: Deactivate Event-Based Component for Subscription tags: - Subscriptions Components description: Use this endpoint to deactivate an event-based component for a single subscription. Deactivating the event-based component causes Chargify to ignore related events at subscription renewal. responses: '200': description: '' schema: type: object security: - <>: [] x-stoplight: id: POST_eventbasedbilling-subscriptions-subscriptionid-components-componentid-deactivatejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /subscriptions.json: post: operationId: POST_subscriptions-json summary: Create Usage When Creating a New Subscription tags: - Subscriptions Components description: |- ## Create Usage When Creating a New Subscription This example will show you how to create usage while creating a new subscription. Please be aware that this example POSTs to the `subscriptions.json` endpoint. This example does not post to the a parameters: - name: body in: body schema: $ref: '#/definitions/components-metered-create-usage-when-creating-a-new-subscription-input' example: subscription: product_handle: basic customer_attributes: first_name: Joe last_name: Blow email: joe1049am@example.com credit_card_attributes: full_number: '1' expiration_month: '10' expiration_year: '2020' components: - component_id: 195268 unit_balance: 20 price_point_id: 12345 responses: '201': description: '' schema: $ref: '#/definitions/subscription-read-subscription' examples: application/json: subscription: id: 15569578 state: active trial_started_at: null trial_ended_at: null activated_at: '2016-12-09T11:49:23-05:00' created_at: '2016-12-09T11:49:20-05:00' updated_at: '2016-12-09T11:49:23-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2016-12-10T11:49:20-05:00' next_assessment_at: '2016-12-10T11:49:20-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2016-12-09T11:49:20-05:00' previous_state: active signup_payment_id: 165589525 signup_revenue: '30010.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 3001000 product_price_in_cents: 1000 product_version_number: 7 payment_type: credit_card referral_code: zf6s86 coupon_use_count: null coupon_uses_allowed: null customer: id: 15029690 first_name: Joe last_name: Blow organization: null email: joe@example.com created_at: '2016-12-09T11:49:20-05:00' updated_at: '2016-12-09T11:49:25-05:00' reference: null address: null address_2: null city: null state: null zip: null country: null phone: null portal_invite_last_sent_at: '2016-12-09T11:49:25-05:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2016-12-09T11:49:25-05:00' cc_emails: null tax_exempt: false product: id: 3792003 name: $10 Basic Plan handle: basic description: lorem ipsum accounting_code: basic request_credit_card: false expiration_interval: null expiration_interval_unit: never created_at: '2016-03-24T13:38:39-04:00' updated_at: '2016-11-03T13:03:05-04:00' price_in_cents: 1000 interval: 1 interval_unit: day initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 7 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 281054 return_url: 'http://www.example.com?successfulsignup' return_params: '' url: 'https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic' - id: 281240 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic' - id: 282694 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic' credit_card: id: 10405758 first_name: Joe last_name: Blow masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 10 expiration_year: 2020 customer_id: 15029690 current_vault: bogus vault_token: '1' billing_address: null billing_city: null billing_state: null billing_zip: null billing_country: null customer_vault_token: null billing_address_2: null payment_type: credit_card x-stoplight: id: POST_subscriptionsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_subscriptions-json summary: List Subscriptions tags: - Subscriptions description: |- ## List Subscriptions This method will return an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. ## Search for a subscription Use the query strings below to search for a subscription using the criteria available. The return value will be an array. ### Self-Service Page token Self-Service Page token for the subscriptions is not returned by default. If this information is desired, the include[]=self_service_page_token parameter must be provided with the request. parameters: - name: sort in: query description: | Allowed sort keys. type: string default: signup_date enum: - signup_date - period_start - period_end - next_assessment - updated_at - created_at - $ref: '#/parameters/trait:subscriptionQueryString:page' - $ref: '#/parameters/trait:subscriptionQueryString:per_page' - $ref: '#/parameters/trait:subscriptionQueryString:state' - $ref: '#/parameters/trait:subscriptionQueryString:product' - $ref: '#/parameters/trait:subscriptionQueryString:product_price_point_id' - $ref: '#/parameters/trait:subscriptionQueryString:coupon' - $ref: '#/parameters/trait:subscriptionQueryString:date_field' - $ref: '#/parameters/trait:subscriptionQueryString:start_date' - $ref: '#/parameters/trait:subscriptionQueryString:end_date' - $ref: '#/parameters/trait:subscriptionQueryString:start_datetime' - $ref: '#/parameters/trait:subscriptionQueryString:end_datetime' - $ref: '#/parameters/trait:subscriptionQueryString:metadata[Field Name]' - $ref: '#/parameters/trait:subscriptionQueryString:direction' - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: '' schema: type: array items: $ref: '#/definitions/subscription-read-subscription' examples: application/json: - subscription: id: -11823623 state: adipisicing balance_in_cents: -96287041 total_revenue_in_cents: -25152484 product_price_in_cents: 67836376 product_version_number: -73181688 current_period_ends_at: eu ad tempor next_assessment_at: ullamco velit aute sed aliquip activated_at: et labore deserunt in created_at: fugiat ipsum Lorem updated_at: laborum Lorem aliqua velit current_period_started_at: sint voluptate previous_state: laboris veniam nisi minim qui signup_payment_id: -40978135 signup_revenue: mollit coupon_code: enim payment_collection_method: ipsum anim Excepteur in in receives_invoice_emails: false net_terms: 74274302 reference: magna enim ad sunt dolor customer: first_name: ipsum last_name: ea nulla est consequat nostrud email: adip cc_emails: quis ipsum amet esse organization: do ad id: 34566138 created_at: amet occaecat updated_at: aliquip commodo in nulla velit address: labo address_2: commodo dolor city: in in elit ut state: eiusm zip: elit magna ullamco country: laboris dolor ut Excepteur aliquip phone: velit cillum commodo cupidatat do verified: true portal_customer_created_at: ullamco esse voluptate portal_invite_last_sent_at: minim sunt tax_exempt: true vat_number: reprehenderit ex veniam magna adipisicing product: id: 28248851 name: veniam id dolor incididunt handle: sunt laboris non dolore description: et veniam amet nisi ea accounting_code: laboris Excepteur Lorem price_in_cents: -68291364 interval: -22713649 interval_unit: enim labore Excepteur i expiration_interval_unit: mollit sit trial_interval_unit: dolore Duis initial_charge_after_trial: true return_params: nisi in reprehenderit tempor request_credit_card: true require_credit_card: true created_at: voluptate ad aute dolor updated_at: mollit consequat update_return_url: cillum commodo mollit magna adipisicing update_return_params: dol product_family: id: -94283401 name: Ut labore mollit nostrud handle: reprehenderit non exercitation description: dolor in esse aute public_signup_pages: - url: sunt id: -14952618 taxable: false version_number: 52958571 product_price_point_name: sed credit_card: id: 41539882 payment_type: fugiat est sed minim incididunt first_name: occaecat last_name: nulla fugiat sint tempor dolore masked_card_number: 'incididunt ' card_type: fugiat expiration_month: -57160880 expiration_year: -30975777 billing_address: aute billing_address_2: velit nisi Lorem Ut billing_city: ex labore incididunt ea billing_country: et reprehenderit sit ni billing_zip: id amet eiusmod deserunt eu current_vault: 'deserunt qui ' vault_token: cillum customer_id: 4972509 payment_type: tempor nisi referral_code: laboris coupon_use_count: 90476416 coupon_uses_allowed: -25038700 stored_credential_transaction_id: -8772090 scheduled_cancellation_at: in - subscription: id: -86802866 state: sint sed do esse balance_in_cents: -10957242 total_revenue_in_cents: 32292655 product_price_in_cents: -86417570 product_version_number: 2627916 current_period_ends_at: minim proident Ut commodo reprehenderit next_assessment_at: irure activated_at: ad created_at: in nulla reprehenderit updated_at: esse aliquip current_period_started_at: sed previous_state: anim aute signup_payment_id: -10468041 signup_revenue: dolore veniam irure officia coupon_code: consequat id aliqua non payment_collection_method: proid receives_invoice_emails: false net_terms: -7167324 reference: do labore magna elit irure customer: first_name: in nisi irure last_name: Ut in magna email: minim exercitation elit cc_emails: dolore culpa organization: Excepteur veniam id: -46291409 created_at: elit Excepteur commodo aute updated_at: sint non magna dolor address: eiusmod labore id laboris Lorem address_2: cillum sed city: occaecat officia pariatur in state: irure cupidatat zip: culpa et eiusmod country: Ut proident phone: velit sint esse ad verified: false portal_customer_created_at: ipsum Ut portal_invite_last_sent_at: aliquip dolor deserunt tax_exempt: false vat_number: nisi deserunt Ut product: id: 5640425 name: minim id handle: magna description: occaecat voluptate l accounting_code: 'exercitation tempor ' price_in_cents: 18462362 interval: 2514527 interval_unit: nostrud laborum sunt expiration_interval_unit: culpa minim mollit dolore trial_interval_unit: esse Excepteur officia conse initial_charge_after_trial: false return_params: in request_credit_card: true require_credit_card: true created_at: ex aliqua cillum nulla non updated_at: do update_return_url: in nisi tempor update_return_params: culpa product_family: id: 23999340 name: cupidatat ut handle: aliqua description: in public_signup_pages: - url: ex ut et dolor minim id: -16171269 - url: exercitation mollit culpa esse pariatur id: -72174665 taxable: false version_number: -17282410 product_price_point_name: voluptate nisi credit_card: id: -17795449 payment_type: do first_name: cillum aliquip ipsum ea last_name: eiusmod ullamco tempor qui mollit masked_card_number: quis card_type: qui amet Lorem dolor expiration_month: 84988526 expiration_year: 74037011 billing_address: ex Lorem Ut amet billing_address_2: in nostrud billing_city: fugiat dolor billing_country: aliquip consectetur enim billing_zip: anim Excepteur laboris aliquip quis current_vault: eu adipisicing labore id vault_token: adipisicing velit aute non customer_id: -11090723 payment_type: ullamco referral_code: velit am coupon_use_count: 22223275 coupon_uses_allowed: -27671065 stored_credential_transaction_id: 30873929 scheduled_cancellation_at: velit cillum - subscription: id: -34052792 state: sint Excepteur id Lorem magna balance_in_cents: 86817426 total_revenue_in_cents: 32173775 product_price_in_cents: 49119449 product_version_number: 32682300 current_period_ends_at: sint eiusmod next_assessment_at: Ut cupidatat sed activated_at: ea laboris incididunt nostrud dolore created_at: veniam commodo minim et anim updated_at: sed Ut current_period_started_at: proident fugiat laboris Excepteur aliqua previous_state: elit signup_payment_id: -15324035 signup_revenue: aliquip ad tempor id coupon_code: culp payment_collection_method: est nostrud eu Duis cupidatat receives_invoice_emails: false net_terms: -87301537 reference: consequat dolor customer: first_name: in last_name: velit dolore email: officia ullamco Ut elit cc_emails: eu organization: Excepteur id: -93503270 created_at: est cillum in esse updated_at: id address: sunt ut address_2: nostrud deserunt Excepteur sed city: cupid state: velit occaecat zip: commodo ut magna p country: et Excepteur phone: Excepteur verified: true portal_customer_created_at: ullamco portal_invite_last_sent_at: pariatur tax_exempt: false vat_number: in labore esse laborum Excepteur product: id: -53303494 name: ullamco nostrud handle: nost description: proident laboris dolore accounting_code: cupidatat price_in_cents: -17275838 interval: -27934135 interval_unit: nisi velit anim expiration_interval_unit: minim dolor sint dolor culpa trial_interval_unit: aute consectetur minim proident ad initial_charge_after_trial: true return_params: ex request_credit_card: false require_credit_card: true created_at: culpa voluptate cillum ipsum esse updated_at: la update_return_url: reprehenderit non qui mollit adipisicing update_return_params: ex elit quis nulla dolore product_family: id: 35738311 name: reprehenderit volu handle: cillum veniam description: officia occaecat ex amet public_signup_pages: - id: 34140924 url: dolor - url: aliquip elit proident id: -40397442 taxable: false version_number: 85142031 product_price_point_name: cillum ut velit amet credit_card: id: -68836615 payment_type: occaecat Lorem first_name: proident Lorem culpa est reprehenderit last_name: '' masked_card_number: amet labore card_type: mollit expiration_month: 30840801 expiration_year: 29440776 billing_address: dolor laborum ut ad billing_address_2: aliqua dolor se billing_city: ipsum billing_country: aute billing_zip: esse ullamco current_vault: sunt laborum laboris vault_token: Lorem voluptate nisi customer_id: 79568843 payment_type: cupidatat anim incididunt et dolor referral_code: 'n' coupon_use_count: -80545060 coupon_uses_allowed: -45209638 stored_credential_transaction_id: 87066437 scheduled_cancellation_at: reprehenderit - subscription: id: -29957607 state: est amet ad ut balance_in_cents: -4958742 total_revenue_in_cents: 94939156 product_price_in_cents: -2310976 product_version_number: 84443627 current_period_ends_at: adipisicing nulla incididunt Ut Duis next_assessment_at: dolore activated_at: deserunt tempor veniam created_at: Excepteur dolore laboris incididunt nulla updated_at: reprehenderit commodo current_period_started_at: Lorem deserunt esse et veniam previous_state: veniam id ut signup_payment_id: -99755141 signup_revenue: aute ut minim proident coupon_code: labore tempor sit enim payment_collection_method: ex aute officia laboris receives_invoice_emails: true net_terms: 7432473 reference: quis customer: first_name: in eiusmod last_name: magna nisi ullamco email: irure enim ad la cc_emails: ea Duis eu do organization: nulla veniam nisi Du id: 33995400 created_at: in c updated_at: laboris laborum sint address: id labore nostrud deserunt address_2: consequat city: dolor sed state: ut minim zip: cillum e country: eu consequat phone: nulla magna aute verified: true portal_customer_created_at: non sint cupidatat dolor dolor portal_invite_last_sent_at: quis tax_exempt: true vat_number: eu ut reprehenderit product: id: -4161731 name: ex handle: dolore do exercitation esse description: qui eu sunt accounting_code: ut ullamco quis price_in_cents: -94028013 interval: -40463669 interval_unit: do laborum expiration_interval_unit: proident in Lorem trial_interval_unit: ullamco irure do dolore commodo initial_charge_after_trial: true return_params: adipisicing es request_credit_card: true require_credit_card: false created_at: non dolore mollit culpa dolor updated_at: exercitation veniam cupidatat update_return_url: aute sunt cillum laboris update_return_params: voluptate product_family: id: -99840944 name: cillum aute handle: laborum description: Duis Lorem ullamco ea Ut public_signup_pages: - url: ut veniam - url: est sed id: 67405143 - id: -86199551 taxable: true version_number: 10853110 product_price_point_name: Duis eiusmod est credit_card: id: 73134598 payment_type: aliquip Duis ullamco first_name: laborum Ut last_name: in pariatur qui esse masked_card_number: ullamco dolore id elit card_type: deserunt expiration_month: 43975874 expiration_year: 89249131 billing_address: adipisicing aliqua pariatur esse ullamco billing_address_2: laboris aliquip id eiusmod billing_city: mollit aliqua Excepteur sit sint billing_country: labore billing_zip: tempor ea eiusmod current_vault: eiusmod vault_token: elit customer_id: -70677969 payment_type: aliqua adipisicing aliquip voluptate referral_code: Excepteur ipsum en coupon_use_count: 2777673 coupon_uses_allowed: 34857086 stored_credential_transaction_id: -88906037 scheduled_cancellation_at: repre security: - <>: [] x-stoplight: id: GET_subscriptionsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /chargify_js_keys.json: get: operationId: GET_chargify_js_keys-json summary: List Chargify.js Public Keys tags: - Chargify Js description: |- ## List Chargify.js Public Keys This endpoint returns public keys used for Chargify.js. parameters: - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: '' schema: type: object properties: chargify_js_keys: type: array items: $ref: '#/definitions/chargify-js-key' meta: type: object properties: total_count: type: number current_page: type: number total_pages: type: number per_page: type: number examples: application/json: chargify_js_keys: - public_key: chjs_ftrxt7c4fv6f74wchjs_5zyn7gnwv requires_security_token: false created_at: '2021-01-01T05:00:00-04:00' meta: total_count: 1 current_page: 1 total_pages: 1 per_page: 10 security: - <>: [] x-stoplight: id: GET_chargifyjskeysjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/product_families/{product_family_id}/coupons.json': parameters: - name: product_family_id in: path required: true type: string post: operationId: POST_coupons-format summary: Create Coupon tags: - Coupon - Coupons description: |- ## Coupons Intro Coupons can be administered in the Chargify application or created via API. Please view our section on [creating coupons](https://help.chargify.com/products/product-coupons.html) for more information. Additionally, for documentation on how to apply a coupon to a subscription within the Chargify UI, please see our documentation [here](https://help.chargify.com/subscriptions/subscription-summary.html#coupon). ## Flat Amount v. Discount In this endpoint, there are two JSON examples listed on how to create coupons. The first example is how to create a percentage based coupon, using `percentage`. This server response indicates a percentage based amount as the coupon's attributes, versus a flat amount. The second example is how to create a coupon for a flat amount using `amount_in_cents` as the parameter to define the discount amount. Please be aware of the different types of coupons that can be created in Chargify. ## Coupon Attributes When creating a coupon, you must specify a product family using the `product_family_id`. If no `product_family_id` is passed, the first product family available is used. You will also need to formulate your URL to cite the Product Family ID in your request. ## Create a Coupon This request will create a coupon, based on the provided information. You can restrict a coupon to only apply to specific products / components by optionally passing in hashes of `restricted_products` and/or `restricted_components` in the format: `{ "": boolean_value }` The coupon's `code` may contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.” parameters: - name: body in: body schema: oneOf: - $ref: '#/definitions/coupons-create-coupon-input-percentage' - $ref: '#/definitions/coupons-create-coupon-input-flat-amount' example: coupon: name: 15% off code: 15OFF description: 15% off for life percentage: '15' allow_negative_balance: 'false' recurring: 'false' end_date: '2012-08-29T12:00:00-04:00' product_family_id: '2' stackable: 'true' compounding_strategy: compound restricted_products: '1': true restricted_components: '1': true '2': false responses: '201': description: Created schema: oneOf: - $ref: '#/definitions/coupons-create-coupon-input-percentage' - $ref: '#/definitions/coupons-create-coupon-input-flat-amount' examples: application/json: coupon: name: 15% off code: 15OFF description: 15% off for life percentage: 33.3333 allow_negative_balance: 'false' recurring: 'false' end_date: '2012-08-29T12:00:00-04:00' product_family_id: '2' stackable: 'true' compounding_strategy: compound restricted_products: '1': true restricted_components: '1': true '2': false security: - <>: [] x-stoplight: id: POST_coupons-format beforeScript: null afterScript: null public: true mock: statusCode: 200 enabled: false get: operationId: GET_product_families-product_family_id-coupons-json summary: List Coupons in Product Family tags: - Coupons description: |- ## Read Coupons for a Specific Product Family List coupons for a specific Product Family in a Site. When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. produces: - application/xml parameters: - $ref: '#/parameters/trait:pagination30:page' - $ref: '#/parameters/trait:pagination30:per_page' responses: '200': description: '' schema: type: array items: $ref: '#/definitions/coupons-list-coupons-for-a-site-output' examples: application/json: - coupon: id: 999999 name: 50% coupon code: 50PERCENT description: 50 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 50 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] - coupon: id: 123456 name: 100% coupon code: 100PERCENT description: 100 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 50 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] - coupon: id: 888888 name: 25% coupon code: 25PERCENT description: 25 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 25 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] security: - <>: [] x-stoplight: id: GET_productfamilies-productfamilyid-couponsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /coupons/find.json: get: operationId: GET_coupons-find-json summary: Find Coupon tags: - Coupons description: |- ## Find Coupon You can search for a coupon via the API with the find method. By passing a code parameter, the find will attempt to locate a coupon that matches that code. If no coupon is found, a 404 is returned. If you have more than one product family and if the coupon you are trying to find does not belong to the first product family in your site, then you will need to specify (either in the url or as a query string param) the product family id. You can retrieve a coupon via the API with the show method. You must identify the coupon in this call by the id parameter that Chargify assigns. If instead you would like to find a coupon using a coupon code, see the Coupon Find method. ``` https://.chargify.com/product_families//coupons/find.?code= ``` **OR** ``` https://.chargify.com/coupons/find.?code=&product_family_id=1 ``` parameters: - name: product_family_id in: query type: integer - name: code in: query type: string responses: '200': description: '' schema: $ref: '#/definitions/coupons-create-coupon-output-percentage' examples: application/json: coupon: id: 67 name: Foo Bar code: YEPPER99934 description: my cool coupon amount_in_cents: 10000 product_family_id: 4 created_at: '2017-11-08T10:01:15-05:00' updated_at: '2017-11-08T10:01:15-05:00' start_date: '2017-11-08T10:01:15-05:00' end_date: null percentage: null recurring: false duration_period_count: null duration_interval: null duration_interval_unit: null allow_negative_balance: false archived_at: null conversion_limit: null stackable: true compounding_strategy: compound coupon_restrictions: [] security: - <>: [] x-stoplight: id: GET_coupons-findjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/product_families/{product_family_id}/coupons/{coupon_id}.json': parameters: - name: product_family_id in: path required: true type: string - name: coupon_id in: path required: true type: string get: operationId: GET_coupons-coupon_id-format summary: Read Coupon tags: - Coupon - Coupons description: |- ## Read a Coupon You can retrieve the Coupon via the API with the Show method. You must identify the Coupon in this call by the ID parameter that Chargify assigns. If instead you would like to find a Coupon using a Coupon code, see the Coupon Find method. When fetching a coupon, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. parameters: - $ref: '#/parameters/trait:couponQueryString:date_field' - $ref: '#/parameters/trait:couponQueryString:start_date' - $ref: '#/parameters/trait:couponQueryString:end_date' - $ref: '#/parameters/trait:couponQueryString:start_datetime' - $ref: '#/parameters/trait:couponQueryString:end_datetime' responses: '200': description: OK schema: $ref: '#/definitions/coupons-create-coupon-output-percentage' examples: application/json: coupon: id: 67 name: Foo Bar code: YEPPER99934 description: my cool coupon amount_in_cents: null product_family_id: 4 product_family_name: Billing Plans created_at: '2017-11-08T10:01:15-05:00' updated_at: '2017-11-08T10:01:15-05:00' start_date: '2017-11-08T10:01:15-05:00' end_date: null percentage: '33.3333' duration_period_count: null duration_interval: null duration_interval_unit: null allow_negative_balance: false archived_at: null conversion_limit: null stackable: true compounding_strategy: compound coupon_restrictions: [] security: - <>: [] x-stoplight: id: GET_coupons-coupon_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 put: operationId: PUT_coupons-coupon_id-format summary: Update Coupon tags: - Coupon - Coupons description: |- ## Update Coupon You can update a Coupon via the API with a PUT request to the resource endpoint. You can restrict a coupon to only apply to specific products / components by optionally passing in hashes of `restricted_products` and/or `restricted_components` in the format: `{ "": boolean_value }` parameters: - name: body in: body schema: $ref: '#/definitions/coupons-create-coupon-input-percentage' example: coupon: name: 15% off code: 15OFF description: 15% off for life percentage: '15' allow_negative_balance: 'false' recurring: 'false' end_date: '2012-08-29T12:00:00-04:00' product_family_id: '2' stackable: 'true' compounding_strategy: compound restricted_products: '1': true restricted_components: '1': true '2': false responses: '200': description: OK schema: $ref: '#/definitions/coupons-create-coupon-output-percentage' examples: application/json: coupon: id: 67 name: Foo Bar code: YEPPER99934 description: my cool coupon amount_in_cents: 10000 product_family_id: 4 created_at: '2017-11-08T10:01:15-05:00' updated_at: '2017-11-08T10:01:15-05:00' start_date: '2017-11-08T10:01:15-05:00' end_date: null percentage: null recurring: false duration_period_count: null duration_interval: null duration_interval_unit: null allow_negative_balance: false archived_at: null conversion_limit: null stackable: true compounding_strategy: compound coupon_restrictions: [] security: - <>: [] x-stoplight: id: PUT_coupons-coupon_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 delete: operationId: DELETE_coupons-coupon_id-format summary: Archive Coupon tags: - Coupon - Coupons description: |- ## Archive a Coupon You can archive a Coupon via the API with the archive method. Archiving makes that Coupon unavailable for future use, but allows it to remain attached and functional on existing Subscriptions that are using it. The `archived_at` date and time will be assigned. responses: '200': description: OK schema: $ref: '#/definitions/coupons-create-coupon-output-percentage' examples: application/json: coupon: id: 67 name: Foo Bar code: YEPPER99934 description: my cool coupon amount_in_cents: 10000 product_family_id: 4 created_at: '2017-11-08T10:01:15-05:00' updated_at: '2017-11-08T10:01:15-05:00' start_date: '2017-11-08T10:01:15-05:00' end_date: null percentage: null recurring: false duration_period_count: null duration_interval: null duration_interval_unit: null allow_negative_balance: false archived_at: '2016-12-02T13:09:33-05:00' conversion_limit: null stackable: true compounding_strategy: compound coupon_restrictions: [] security: - <>: [] x-stoplight: id: DELETE_coupons-coupon_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /coupons.json: get: operationId: GET_coupons-format summary: List Coupons in Default Product Family tags: - Coupon - incomplete - Coupons description: |- ## Read Coupons for the Default Product Family You can retrieve a list of coupons that belong to the default product family for a site via this method. The default product family is the one that was created first for the site, (with the lowest ID number,) that has not been archived. When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. parameters: - $ref: '#/parameters/trait:pagination30:page' - $ref: '#/parameters/trait:pagination30:per_page' - $ref: '#/parameters/trait:couponQueryString:date_field' - $ref: '#/parameters/trait:couponQueryString:start_date' - $ref: '#/parameters/trait:couponQueryString:end_date' - $ref: '#/parameters/trait:couponQueryString:start_datetime' - $ref: '#/parameters/trait:couponQueryString:end_datetime' responses: '200': description: OK schema: $ref: '#/definitions/coupons-list-coupons-for-a-site-output' examples: application/json: - coupon: id: 999999 name: 50% coupon code: 50PERCENT description: 50 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 50 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] - coupon: id: 123456 name: 100% coupon code: 100PERCENT description: 100 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 50 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] - coupon: id: 888888 name: 25% coupon code: 25PERCENT description: 25 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 25 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] security: - <>: [] x-stoplight: id: GET_coupons-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/product_families/{product_family_id}/coupons/{coupon_id}/usage.json': parameters: - name: product_family_id in: path required: true type: string - name: coupon_id in: path required: true type: string get: operationId: GET_product_families-product_family_id-coupons-coupon_id-usage-json summary: List Coupon Usages tags: - Coupons description: |- ## Read Coupon Usage for a Site This request will provide details about the coupon usage as an array of data hashes, one per product. responses: '200': description: '' schema: $ref: '#/definitions/coupons-coupon-usage-output' examples: application/json: - name: No cost product id: 3903594 signups: 0 savings: 0 savings_in_cents: 0 revenue: 0 revenue_in_cents: 0 - name: Product that expires id: 3853680 signups: 0 savings: 0 savings_in_cents: 0 revenue: 0 revenue_in_cents: 0 - name: Trial Product id: 3861800 signups: 1 savings: 30 savings_in_cents: 3000 revenue: 20 revenue_in_cents: 2000 security: - <>: [] x-stoplight: id: GET_productfamilies-productfamilyid-coupons-couponid-usagejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /coupons/validate.json: get: operationId: GET_coupons-validate-format summary: Validate Coupon tags: - Coupon - incomplete - Coupons description: |- ## Validate a Coupon You can verify if a specific coupon code is valid using the `validate` method. This method is useful for validating coupon codes that are entered by a customer. If the coupon is found and is valid, the coupon will be returned with a 200 status code. If the coupon is invalid, the status code will be 404 and the response will say why it is invalid. If the coupon is valid, the status code will be 200 and the coupon will be returned. The following reasons for invalidity are supported: + Coupon not found + Coupon is invalid + Coupon expired If you have more than one product family and if the coupon you are validating does not belong to the first product family in your site, then you will need to specify the product family, either in the url or as a query string param. This can be done by supplying the id or the handle in the `handle:my-family` format. Eg. ``` https://.chargify.com/product_families/handle:/coupons/validate.?code= ``` Or: ``` https://.chargify.com/coupons/validate.?code=&product_family_id= ``` parameters: - name: code in: query description: The Coupon Code. type: string - name: product_family_id in: query description: '' type: number responses: '200': description: '' schema: $ref: '#/definitions/coupons-create-coupon-output-percentage' examples: application/json: coupon: id: 66 name: Foo Bar code: YEPPER9993 description: my cool coupon amount_in_cents: 10000 product_family_id: 4 created_at: '2017-11-07T14:51:52-05:00' updated_at: '2017-11-07T15:14:24-05:00' start_date: '2017-11-07T14:51:52-05:00' end_date: null percentage: null recurring: false duration_period_count: null duration_interval: null duration_interval_unit: null allow_negative_balance: false archived_at: null conversion_limit: null stackable: true compounding_strategy: full-price coupon_restrictions: [] '404': description: Not Found examples: application/json: errors: Coupon code could not be found. security: - <>: [] x-stoplight: id: GET_coupons-validate-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/coupon/{coupon_id}/currency_prices.json': parameters: - name: coupon_id in: path required: true type: string put: operationId: PUT_coupon-coupon_id-currency_prices-json summary: Create / Update Currency Prices tags: - Coupons description: |- This endpoint allows you to create and/or update currency prices for an existing coupon. Multiple prices can be created or updated in a single request but each of the currencies must be defined on the site level already and the coupon must be an amount-based coupon, not percentage. Currency pricing for coupons must mirror the setup of the primary coupon pricing - if the primary coupon is percentage based, you will not be able to define pricing in non-primary currencies. parameters: - name: body in: body schema: type: object properties: currency_prices: type: array items: type: object properties: currency: type: string description: ISO code for the site defined currency. price: type: integer description: Price for the given currency. required: - currency - price required: - currency_prices example: currency_prices: - currency: EUR price: 10 - currency: GBP price: 9 responses: '200': description: '' schema: type: array items: $ref: '#/definitions/coupon-currency-price' security: - <>: [] x-stoplight: id: PUT_coupon-couponid-currencypricesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/coupons/{coupon_id}/codes.json': parameters: - name: coupon_id in: path required: true type: string post: operationId: POST_coupons-coupon_id-codes-json summary: Create Coupon Subcodes tags: - Coupons description: |- ## Coupon Subcodes Intro Coupon Subcodes allow you to create a set of unique codes that allow you to expand the use of one coupon. For example: Master Coupon Code: + SPRING2020 Coupon Subcodes: + SPRING90210 + DP80302 + SPRINGBALTIMORE Coupon subcodes can be administered in the Admin Interface or via the API. When creating a coupon subcode, you must specify a coupon to attach it to using the coupon_id. Valid coupon subcodes are all capital letters, contain only letters and numbers, and do not have any spaces. Lowercase letters will be capitalized before the subcode is created. ## Coupon Subcodes Documentation Full documentation on how to create coupon subcodes in the Chargify UI can be located [here](https://help.chargify.com/products/product-coupons.html#coupon-codes). Additionally, for documentation on how to apply a coupon to a Subscription within the Chargify UI, please see our documentation [here](https://help.chargify.com/subscriptions/subscription-summary.html#coupon). ## Create Coupon Subcode This request allows you to create specific subcodes underneath an existing coupon code. *Note*: If you are using any of the allowed special characters ("%", "@", "+", "-", "_", and "."), you must encode them for use in the URL. % to %25 @ to %40 + to %2B - to %2D _ to %5F . to %2E So, if the coupon subcode is `20%OFF`, the URL to delete this coupon subcode would be: `https://.chargify.com/coupons/567/codes/20%25OFF.` parameters: - name: body in: body schema: $ref: '#/definitions/coupon-subcodes-create-a-coupon-subcode' example: codes: - BALTIMOREFALL - ORLANDOFALL - DETROITFALL responses: '200': description: '' schema: $ref: '#/definitions/coupons-subcodes-create-a-coupon-subcode-output' examples: application/json: created_codes: - BALTIMOREFALL - ORLANDOFALL - DETROITFALL duplicate_codes: [] invalid_codes: [] security: - <>: [] x-stoplight: id: POST_coupons-couponid-codesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_coupons-coupon_id-codes-json summary: List Coupon Subcodes tags: - Coupons description: |- ## List Coupon Subcodes for a Site This request allows you to request the subcodes that are attached to a coupon. parameters: - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: '' schema: $ref: '#/definitions/coupons-subcodes-retrieve-coupon-subcodes-output' examples: application/json: codes: - 3JU6PR - 9RO6MP - 8OG1VV - 5FL7VV - 2SV8XK - 4LW8LH - 3VL4GZ - 9UI9XO - 0LZ0CC - 8XI9JV - 9UV5YE - 3UI4GX - 6SL5ST - 9WC8IJ - 2KA3PZ - 7WR1VR - 3VY7MN - 6KC3KB - 7DF7YT - 9FH1ED security: - <>: [] x-stoplight: id: GET_coupons-couponid-codesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_coupons-coupon_id-codes-format summary: Update Coupon Subcodes tags: - Coupon Subcode - incomplete - Coupons description: |- ## Update Coupon Subcodes You can update the subcodes for the given Coupon via the API with a PUT request to the resource endpoint. Send an array of new coupon subcodes. **Note**: All current subcodes for that Coupon will be deleted first, and replaced with the list of subcodes sent to this endpoint. The response will contain: + The created subcodes, + Subcodes that were not created because they already exist, + Any subcodes not created because they are invalid. parameters: - name: body in: body schema: $ref: '#/definitions/coupon-subcodes-create-a-coupon-subcode' example: codes: - AAAA - BBBB - CCCC - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: OK schema: $ref: '#/definitions/coupons-subcodes-create-a-coupon-subcode-output' examples: application/json: codes: - AAAA - BBBB - CCCC security: - <>: [] x-stoplight: id: PUT_coupons-coupon_id-codes-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/coupons/{coupon_id}/codes/{subcode}.json': parameters: - name: coupon_id in: path description: The Coupon ID. required: true type: number - name: subcode in: path description: The Subcode. required: true type: number delete: operationId: DELETE_coupons-coupon_id-codes-subcode-format summary: Delete Coupon Subcode tags: - Coupon Subcode - incomplete - Coupons description: |- ## Delete the Coupon Subcode If the Coupon subcode is successfully removed, a "200" response code will be returned. Otherwise, a "404" error will be returned. ## Example Given a coupon with an ID of 567, and a coupon subcode of 20OFF, the URL to `DELETE` this coupon subcode would be: ``` http://subdomain.chargify.com/coupons/567/codes/20OFF. ``` Note: If you are using any of the allowed special characters (“%”, “@”, “+”, “-”, “_”, and “.”), you must encode them for use in the URL. | Special character | Encoding | |-------------------|----------| | % | %25 | | @ | %40 | | + | %2B | | – | %2D | | _ | %5F | | . | %2E | ## Percent Encoding Example Or if the coupon subcode is 20%OFF, the URL to delete this coupon subcode would be: @https://.chargify.com/coupons/567/codes/20%25OFF. responses: '404': description: Not Found security: - <>: [] x-stoplight: id: DELETE_coupons-coupon_id-codes-subcode-format beforeScript: null afterScript: null public: true mock: statusCode: 200 enabled: false '/{resource_type}/metafields.json': parameters: - name: resource_type in: path description: '' required: true type: string enum: - subscriptions - customers post: operationId: POST_resource_type-metafields-json summary: Create Metafields tags: - Custom Fields description: |- ## Custom Fields: Metafields Intro **Chargify refers to Custom Fields in the API documentation as metafields and metadata.** + **Metafield is the custom field** + **Metadata is the data populating the custom field.** Chargify Metafields are used to add meaningful attributes to subscription and customer resources. Metafield are the place where you will set up your resource to accept additional data. It is scoped to the site instead of a specific customer or subscription. Think of it as the key, and Metadata as the value on every record. ## Metafields Documentation Within the Chargify UI, metadata and metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based documentation that references custom fields will not cite the terminology metafields or metadata. Full documentation on how to create Custom Fields in the Chargify UI can be located [here](https://help.chargify.com/custom-fields/custom-fields-intro.html). For additional documentation on how to record data within custom fields, please see our subscription-based documentation [here.](https://help.chargify.com/subscriptions/subscription-summary.html#custom-fields) ## Metafields vs Metadata Metadata is the information that populates the metafield. ## Metafields "On-the-Fly" It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existant name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”. ## Metafield Limitations Each site is limited to 100 unique Metafields (i.e. keys, or names) per resource. This means you can have 100 Metafields for Subscription and another 100 for Customer. ## Metafields Scope The scope field has four acceptable attributes, which dictate where metafields will appear: + portal + csv + invoices + statements If configuring metafields in the Admin UI or via the API, be careful sending updates to metafields with the scope attribute – if a partial update is sent it will overwrite the current configuration. ## CSV Metafields Values of ```1``` (include) or ```0``` (exclude) can be used to include or exclude in csv exports. ```“csv”: “1”``` ## Statement Metafields Values of ```1``` (include) or ```0``` (exclude) can be used to include or exclude in statments. ```“statements”: “1”``` ### Invoice Metafields Values of ```1``` (include) or ```0``` (exclude) can be used to include or exclude on invoices. ```“invoices”: “1”``` ### Billing Portal Metafields Values of ```1``` (include) or ```0``` (exclude) can be used to include or exclude on invoices. ```"portal": "1"``` ## Metafield Types Metafields can have three different types defined by the `input_type` attribute: + text (the default) + dropdown + radio The `input_type` indicates how data should be added to the metafield. For example, a `text` type is just a string, so a given metafield of this type can have any value attached. On the other hand, `dropdown` and `radio` have a set of allowed values that can be input, and appear differently on a Public Signup Page. ## Create Metafields Use the following method to create metafields for your Site. Metafields can be populated with metadata after the fact. ## Create Multiple Metafields In order to create multiple metafields in one request, use the following JSON format: ``` { "metafields": [ {"name": "Color"}, {"name": "Brand"} ] } ``` ## Create a Dropdown Metafield The default `input_type` for a custom field is `text`. Here's an example request that creates a metafield with `dropdown` options defined in an `enum` array: ``` { "metafields": { "name": "Dropdown field", "input_type": "dropdown", "enum": [ "option 1", "option 2" ] } } ``` parameters: - name: body in: body schema: $ref: '#/definitions/create-metafields' example: metafields: name: Color scope: csv: '0' invoices: '1' statements: '1' portal: '0' input_type: radio enum: - option 1 - option 2 - $ref: '#/parameters/trait:metafieldsNameRequiredCurrentNameOptional:name' - $ref: '#/parameters/trait:metafieldsNameRequiredCurrentNameOptional:current_name' responses: '200': description: '' schema: type: array items: $ref: '#/definitions/metafield' examples: application/json: - name: Color scope: hosted: [] csv: '0' statements: '0' invoices: '0' portal: '0' data_count: 0 input_type: text enum: null - name: Brand scope: hosted: [] csv: '0' statements: '0' invoices: '0' portal: '0' data_count: 0 input_type: text enum: null security: - <>: [] x-stoplight: id: POST_resourcetype-metafieldsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_resource_type-metafields-json summary: List Metafields tags: - Custom Fields description: |- ## Read Metafields This endpoint lists metafields associated with a Site. The metafield description and usage is contained in the response. parameters: - $ref: '#/parameters/trait:metafieldsNameOptional:name' - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: '' schema: $ref: '#/definitions/paginated-metafields' examples: application/json: total_count: 1 current_page: 1 total_pages: 1 per_page: 20 metafields: - name: Pants scope: hosted: [] csv: '0' statements: '0' invoices: '0' portal: '0' data_count: 1 input_type: text enum: null security: - <>: [] x-stoplight: id: GET_resourcetype-metafieldsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_resource_type-metafields-json summary: Update Metafields tags: - Custom Fields description: |- ## Update Metafields Use the following method to update metafields for your Site. Metafields can be populated with metadata after the fact. parameters: - name: body in: body schema: $ref: '#/definitions/update-metafields' example: metafields: current_name: shirt name: new-shirt scope: hosted: - '1' - '1' - '1' csv: '1' invoices: '1' statements: '1' portal: '0' - $ref: '#/parameters/trait:metafieldsNameRequired:name' responses: '200': description: '' schema: $ref: '#/definitions/metafield' examples: application/json: - name: Shirts scope: hosted: [] csv: '0' statements: '0' invoices: '0' portal: '0' data_count: 0 input_type: text enum: null security: - <>: [] x-stoplight: id: PUT_resourcetype-metafieldsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_resource_type-metafields-json summary: Delete Metafields tags: - Custom Fields description: |- ## Delete Metafields Use the following method to delete a metafield. This will remove the metafield from the Site. Additionally, this will remove the metafield and associated metadata with all Subscriptions on the Site. ## Example If you wanted to delete the metafield for customers named strength you would request: ```https://my-subdomain.chargify.com/customers/metafields.json?name=strength``` parameters: - $ref: '#/parameters/trait:metafieldsNameRequired:name' responses: '200': description: '' '404': description: '' security: - <>: [] x-stoplight: id: DELETE_resourcetype-metafieldsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/{resource_type}/{resource_id}/metadata.json': parameters: - name: resource_type in: path required: true type: string enum: - customers - subscriptions - name: resource_id in: path required: true type: string post: operationId: POST_resource_type-resource_id-metadata-json summary: Create Metadata tags: - Custom Fields description: |- ## Custom Fields: Metadata Intro **Chargify refers to Custom Fields in the API documentation as metafields and metadata.** + **Metafield is the custom field** + **Metadata is the data populating the custom field.** Chargify Metadata is used to add your own meaningful values to subscription or customer records. Metadata is associated to a customer or subscription, and corresponds to a Metafield. When creating a new metadata object for a given record, if the metafield is not present it will be created. ## Metadata Documentation Within the Chargify UI, metadata and metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based documentation that references custom fields will not cite the terminology metafields or metadata. Full documentation on how to create Custom Fields in the Chargify UI can be located [here](https://help.chargify.com/custom-fields/custom-fields-intro.html). For additional documentation on how to record data within custom fields, please see our subscription-based documentation [here.](https://help.chargify.com/subscriptions/subscription-summary.html#custom-fields) ## Metadata versus Metafields Metadata is the information that populates the metafield. ## Metadata limits Metadata values are limited to 2kB in size. Additonally, there are limits on the number of unique “names” available per resource. See [Metafields documentation](#docTextSection:BDXuRKX5n8K4T6Jsh). ## Create Metadata This method will create a metafield for the site on the fly if it does not already exist, and populate the metadata value. ### Subscription or Customer Resource Please pay special attention to the resource you use when creating metadata. parameters: - name: body in: body schema: type: object properties: metadata: type: array items: $ref: '#/definitions/metadata' example: metadata: - name: Color value: Blue - name: Something value: Useful - $ref: '#/parameters/trait:metadataValue:value' responses: default: description: '' schema: {} security: - <>: [] x-stoplight: id: POST_resourcetype-resourceid-metadatajson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_resource_type-resource_id-metadata-json summary: List Metadata for Resource tags: - Custom Fields description: |- ## Read Metadata for a Specific Resource This request will list all of the metadata belonging to a particular resource (ie. subscription, customer) that is specified. ## Metadata Data This endpoint will also display the current stats of your metadata to use as a tool for pagination. parameters: - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: '' schema: $ref: '#/definitions/paginated-metadata' examples: application/json: total_count: 2 current_page: 1 total_pages: 1 per_page: 20 metadata: - value: The quick brown fox resource_id: 15479934 name: Comments - value: L resource_id: 15479934 name: T-Shirt Size security: - <>: [] x-stoplight: id: GET_resourcetype-resourceid-metadatajson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_resource_type-resource_id-metadata-json summary: Update Metadata tags: - Custom Fields description: |- ## Update Metadata This method allows you to update the existing metadata associated with a subscription or customer. ## URL Construction Please note that as you replace the `resource` portion of the URL, use one of the following formations ``` /subscriptions/{subscription_id}/metadata.{format} ``` OR ``` /customers/{customer_id}/metadata.{format} ``` parameters: - name: body in: body schema: type: object properties: metadata: type: object properties: current_name: type: string name: type: string value: type: string example: metadata: current_name: Color name: Shirt Color value: Blue - $ref: '#/parameters/trait:metadataValue:value' responses: '200': description: '' schema: type: array items: $ref: '#/definitions/metadata' examples: application/json: - value: Blue resource_id: 15479934 name: Shirt Color security: - <>: [] x-stoplight: id: PUT_resourcetype-resourceid-metadatajson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_resource_type-resource_id-metadata-json summary: Delete Metadata tags: - Custom Fields description: |- ## Delete Metadata This method removes the metadata from the subscriber/customer cited. ## Query String Usage For instance if you wanted to delete the metadata for customer 99 named weight you would request: ``` https://acme.chargify.com/customers/99/metadata.json?name=weight ``` If you want to delete multiple metadata fields for a customer 99 named: `weight` and `age` you wrould request: ``` https://acme.chargify.com/customers/99/metadata.json?names[]=weight&names[]=age ``` ## Successful Response For a success, there will be a code `200` and the plain text response `true`. ## Unsuccessful Response When a failed response is encountered, you will receive a `404` response and the plain text response of `true`. parameters: - name: name in: query type: string - name: 'names[]' in: query type: array items: type: string responses: default: description: '' schema: {} security: - <>: [] x-stoplight: id: DELETE_resourcetype-resourceid-metadatajson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/{resource_type}/metadata.json': parameters: - name: resource_type in: path required: true type: string enum: - subscriptions - customers get: operationId: GET_resource_type-metadata-json summary: List Metadata for Resource Type tags: - Custom Fields description: |- ## Read Metadata by Resource This method will provide you information on usage of metadata across your selected resource (ie. subscriptions, customers) ## Metadata Data This endpoint will also display the current stats of your metadata to use as a tool for pagination. ### Metadata for multiple records `https://acme.chargify.com/subscriptions/metadata.json?resource_ids[]=1&resource_ids[]=2` ## Read Metadata for a Site This endpoint will list the number of pages of metadata information that are contained within a site. parameters: - name: 'resource_ids[]' in: query type: array items: type: string - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' - $ref: '#/parameters/trait:metadataQueryString:date_field' - $ref: '#/parameters/trait:metadataQueryString:start_date' - $ref: '#/parameters/trait:metadataQueryString:end_date' - $ref: '#/parameters/trait:metadataQueryString:start_datetime' - $ref: '#/parameters/trait:metadataQueryString:end_datetime' - $ref: '#/parameters/trait:metadataQueryString:with_deleted' responses: '200': description: '' schema: $ref: '#/definitions/paginated-metadata' examples: application/json: total_count: 2 current_page: 1 total_pages: 1 per_page: 20 metadata: - value: The quick brown fox resource_id: 15479934 name: Comments - value: L resource_id: 15479934 name: T-Shirt Size security: - <>: [] x-stoplight: id: GET_resourcetype-metadatajson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /customers.json: post: operationId: POST_customers-format summary: Create Customer tags: - Customer - Customers description: |- ## Customers Intro You may create a new Customer at any time, or you may create a Customer at the same time you create a Subscription. The only validation restriction is that you may only create one customer for a given reference value. If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you may choose to leave `reference` blank, and store Chargify’s unique ID for the customer, which is in the `id` attribute. Full documentation on how to locate, create and edit Customers in the Chargify UI can be located [here](https://help.chargify.com/customers/customers-intro.html). ## Create Customer You can create a new Customer at any time, or you may create a Customer at the same time you create a Subscription. The only validation restriction is that you may only create one Customer for a given `reference` value. If provided, the `reference` value must be unique. It represents a unique identifier for the Customer from your own app, i.e. the Customer’s ID. This allows you to retrieve a given Customer via a piece of shared information. Alternatively, you may choose to leave `reference` blank, and store Chargify’s unique ID for the Customer, which is in the `id` attribute. Only those attributes not marked as "read only" may be set via POST (create) or PUT (update) operations. ## Required Country Format Chargify requires that you use the ISO Standard Country codes when formatting country attribute of the customer. Countries should be formatted as 2 characters. For more information, please see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) ## Required State Format Chargify requires that you use the ISO Standard State codes when formatting state attribute of the customer. + US States (2 characters): [ISO_3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) + States Outside the US (2-3 characters): To find the correct state codes outside of the US, please go to [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in the “ISO 3166-2 codes” column next to country you wish to populate. ## Locale Chargify allows you to attribute a language/region to your customer to deliver invoices in any required language. For more: [Customer Locale](https://help.chargify.com/settings/multi-lingual-invoices.html#customer-locale) parameters: - name: body in: body schema: type: object properties: customer: type: object properties: first_name: type: string last_name: type: string email: type: string cc_emails: type: string organization: type: string reference: type: string address: type: string address2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string locale: type: string description: Set a specific language on a customer record. example: customer: first_name: Martha last_name: Washington email: martha@example.com cc_emails: george@example.com organization: 'ABC, Inc.' reference: '1234567890' address: 123 Main Street address2: Unit 10 city: Anytown state: MA zip: '02120' country: US phone: 555-555-1212 locale: es-MX responses: '201': description: Created schema: type: object properties: customer: $ref: '#/definitions/customer' examples: application/json: customer: first_name: Cathryn last_name: Parisian email: Stella.McLaughlin6@example.net cc_emails: null organization: Greenholt - Oberbrunner reference: null id: 76 created_at: '2021-03-29T07:47:00-04:00' updated_at: '2021-03-29T07:47:00-04:00' address: 739 Stephon Bypass address_2: Apt. 386 city: Sedrickchester state: KY state_name: Kentucky zip: 46979-7719 country: US country_name: United States phone: 230-934-3685 verified: false portal_customer_created_at: null portal_invite_last_sent_at: null portal_invite_last_accepted_at: null tax_exempt: false vat_number: null parent_id: null locale: en-US '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'First name: cannot be blank.' - 'Last name: cannot be blank.' - 'Email address: cannot be blank.' security: - <>: [] x-stoplight: id: POST_customers-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 get: operationId: GET_customers-json summary: List Customers tags: - Customers description: |- ## List Customers This request will list all customers associated with your Site. parameters: - $ref: '#/parameters/trait:direction:direction' - $ref: '#/parameters/trait:pagination50:page' - $ref: '#/parameters/trait:customerQueryString:date_field' - $ref: '#/parameters/trait:customerQueryString:start_date' - $ref: '#/parameters/trait:customerQueryString:end_date' - $ref: '#/parameters/trait:customerQueryString:start_datetime' - $ref: '#/parameters/trait:customerQueryString:end_datetime' responses: '200': description: '' schema: type: array items: type: object properties: '': $ref: '#/definitions/customer' examples: application/json: - customer: first_name: Kayla last_name: Test email: kayla@example.com cc_emails: 'john@example.com, sue@example.com' organization: '' reference: null id: 14126091 created_at: '2016-10-04T15:22:27-04:00' updated_at: '2016-10-04T15:22:30-04:00' address: '' address_2: '' city: '' state: '' zip: '' country: '' phone: '' verified: null portal_customer_created_at: '2016-10-04T15:22:29-04:00' portal_invite_last_sent_at: '2016-10-04T15:22:30-04:00' portal_invite_last_accepted_at: null tax_exempt: false - customer: first_name: 'Nick ' last_name: Test email: nick@example.com cc_emails: 'john@example.com, sue@example.com' organization: '' reference: null id: 14254093 created_at: '2016-10-13T16:52:51-04:00' updated_at: '2016-10-13T16:52:54-04:00' address: '' address_2: '' city: '' state: '' zip: '' country: '' phone: '' verified: null portal_customer_created_at: '2016-10-13T16:52:54-04:00' portal_invite_last_sent_at: '2016-10-13T16:52:54-04:00' portal_invite_last_accepted_at: null tax_exempt: false parent_id: 123 - customer: first_name: Don last_name: Test email: don@example.com cc_emails: 'john@example.com, sue@example.com' organization: '' reference: null id: 14332342 created_at: '2016-10-19T10:49:13-04:00' updated_at: '2016-10-19T10:49:19-04:00' address: 1737 15th St address_2: '' city: Boulder state: CO zip: '80302' country: US phone: '' verified: null portal_customer_created_at: '2016-10-19T10:49:19-04:00' portal_invite_last_sent_at: '2016-10-19T10:49:19-04:00' portal_invite_last_accepted_at: null tax_exempt: false parent_id: null security: - <>: [] x-stoplight: id: GET_customersjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/customers/{id}.json': parameters: - name: id in: path description: The ID of a Customer. required: true type: number get: operationId: GET_customers-id-format summary: Read Customer tags: - Customer - incomplete - Customers description: |- ## Read Customer Data This method allows to retrieve the Customer properties by Chargify-generated Customer ID. responses: '200': description: OK schema: type: object properties: customer: $ref: '#/definitions/customer' examples: application/json: customer: first_name: Martha last_name: Washington email: martha@example.com cc_emails: 'john@example.com, sue@example.com' organization: null reference: null id: 14967442 created_at: '2016-12-05T10:33:07-05:00' updated_at: '2016-12-05T10:33:07-05:00' address: null address_2: null city: null state: null zip: null country: null phone: null verified: false portal_customer_created_at: null portal_invite_last_sent_at: null portal_invite_last_accepted_at: null tax_exempt: false vat_number: 012345678 parent_id: 123 security: - <>: [] x-stoplight: id: GET_customers-id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 put: operationId: PUT_customers-id-format summary: Update Customer tags: - Customer - incomplete - Customers description: |- ## Update Customer This method allows to update the Customer. Only those attributes not marked as "read only" may be set via POST (create) or PUT (update) operations. parameters: - name: body in: body schema: type: object properties: customer: type: object properties: first_name: type: string last_name: type: string email: type: string cc_emails: type: string organization: type: string reference: type: string address: type: string address2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string locale: type: string description: Set a specific language on a customer record. example: customer: first_name: Martha last_name: Washington email: martha.washington@example.com responses: '200': description: OK schema: $ref: '#/definitions/customer' examples: application/json: customer: first_name: Martha last_name: Washington email: martha.washington@example.com cc_emails: george.washington@example.com organization: null reference: null id: 14967442 created_at: '2016-12-05T10:33:07-05:00' updated_at: '2016-12-05T10:38:00-05:00' address: null address_2: null city: null state: null zip: null country: null phone: null verified: false portal_customer_created_at: null portal_invite_last_sent_at: null portal_invite_last_accepted_at: null tax_exempt: false vat_number: 012345678 '404': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Email: must be a valid email address' security: - <>: [] x-stoplight: id: PUT_customers-id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 delete: operationId: DELETE_customers-id-format summary: Delete Customer tags: - Customer - incomplete - Customers description: |- ## Delete Customer This method allows to delete the Customer. When a delete response is received, the response status will be `204`. There will be no content sent with the status. responses: '204': description: No Content security: - <>: [] x-stoplight: id: DELETE_customers-id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /customers/lookup.json: get: operationId: GET_customers-lookup-json summary: Read Customer by Reference Value tags: - Customers description: |- ## Read the Customer by Reference Value Use this method to return the customer object if you have the **Reference ID (Your App)** value. parameters: - name: reference in: query description: URL encoded required: true type: string responses: '200': description: '' schema: type: object properties: customer: $ref: '#/definitions/customer' examples: application/json: customer: first_name: Martha last_name: Washington email: martha@example.com cc_emails: 'john@example.com, sue@example.com' organization: null reference: null id: 14967442 created_at: '2016-12-05T10:33:07-05:00' updated_at: '2016-12-05T10:33:07-05:00' address: null address_2: null city: null state: null zip: null country: null phone: null verified: false portal_customer_created_at: null portal_invite_last_sent_at: null portal_invite_last_accepted_at: null tax_exempt: false vat_number: 012345678 parent_id: 123 security: - <>: [] x-stoplight: id: GET_customers-lookupjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/customers/{customer_id}/subscriptions.json': parameters: - name: customer_id in: path description: The Customer ID. required: true type: string get: operationId: GET_customers-customer_id-subscriptions-json summary: List Subscriptions for Customer tags: - Subscriptions description: |- ## List Subscriptions by Customer This method will retreive a list of subscriptions associated with a Customer. responses: '200': description: '' schema: type: array items: $ref: '#/definitions/subscription-read-subscription' examples: application/json: - subscription: id: -5036645 state: cillum nisi Lorem balance_in_cents: -12845522 total_revenue_in_cents: -58227781 product_price_in_cents: 99783389 product_version_number: 85309847 current_period_ends_at: exercitation in sed next_assessment_at: et ex ipsum in amet activated_at: cupidatat pr created_at: ad quis pariatur au updated_at: velit Lorem pariatur ad sint current_period_started_at: et eu aliquip previous_state: 'dolore anim ' signup_payment_id: 67457087 signup_revenue: commodo coupon_code: consequat consectetur dolore payment_collection_method: irure nulla nisi dolor labore receives_invoice_emails: false net_terms: 78749212 reference: enim tempor amet Ut et customer: first_name: consequat nulla mollit last_name: dolor nulla occaecat velit email: ipsum ut non dolor cc_emails: anim cupi organization: r id: -53901759 created_at: labore esse voluptate updated_at: ipsum address: exercitation id address_2: ut labore quis city: dolor quis Lorem ut state: sit laboris non Ut zip: ut et dolore country: ipsum sit phone: nulla in aute dolor consectetur verified: false portal_customer_created_at: fugiat aute eiusmod portal_invite_last_sent_at: amet sit magna tax_exempt: false vat_number: ea product: id: 94226223 name: reprehenderit et dolore minim handle: nostrud magna pariatur culpa veniam description: labore accounting_code: tempor velit price_in_cents: -22883994 interval: -8416398 interval_unit: nostrud consequat Dui expiration_interval_unit: exercitation dolore officia labore irure trial_interval_unit: non minim eu commodo sed initial_charge_after_trial: true return_params: do reprehenderit labo request_credit_card: true require_credit_card: false created_at: nisi proident laboris updated_at: ipsum officia elit update_return_url: magna minim laboris update_return_params: incididunt est in product_family: id: 81518830 name: id labore dolor dolore culpa handle: officia incididunt ut description: dolore deserunt qui est occaecat public_signup_pages: - url: pariatur ea mollit laborum id: -92545043 - id: -65105436 url: qui aute - url: ullamco voluptate mollit ex sunt id: 45186013 taxable: false version_number: -49216373 product_price_point_name: Excepteur credit_card: id: 82741443 payment_type: nisi first_name: ut in last_name: '' masked_card_number: sunt voluptate exercitation card_type: deserunt expiration_month: 5144107 expiration_year: -43910455 billing_address: fugiat enim nulla laborum billing_address_2: sunt billing_city: aliquip Excepteur sunt billing_country: occaecat enim sed billing_zip: nostrud sed fugiat dolor current_vault: minim nostrud velit vault_token: in qui customer_id: 59381776 payment_type: Lorem aliqua dolor ad laboris referral_code: est coupon_use_count: -55363685 coupon_uses_allowed: -46531667 stored_credential_transaction_id: -19176907 scheduled_cancellation_at: nostrud qui - subscription: id: -31348115 state: enim balance_in_cents: 27921178 total_revenue_in_cents: 58892960 product_price_in_cents: -2370351 product_version_number: 58050274 current_period_ends_at: enim ad Duis sed tempor next_assessment_at: dolor activated_at: labore et created_at: laborum updated_at: id current_period_started_at: id previous_state: commodo quis nulla signup_payment_id: -12292202 signup_revenue: veniam velit coupon_code: nulla Duis dolor ut ut payment_collection_method: sit receives_invoice_emails: true net_terms: -61518947 reference: ut customer: first_name: anim last_name: dolor ut Duis email: nulla cc_emails: aliqua dolore non commodo organization: Lorem magna qui ad ullamco id: 34439181 created_at: sint dolor culpa dolor updated_at: est nulla address: labore in aliqua ullamco dolor address_2: Excepteur city: dolor minim deserunt adipisicing state: proident exercitation zip: quis do sit est cillum country: sint phone: nostrud verified: false portal_customer_created_at: reprehenderit velit portal_invite_last_sent_at: sit ut qui eu tax_exempt: false vat_number: dolor aliquip ex non product: id: 79244887 name: officia non ut handle: sed fugiat id description: tempor ut fugiat esse accounting_code: nulla ma price_in_cents: -28904731 interval: -12003983 interval_unit: exercitation ut proident expiration_interval_unit: cillum proident ullamco trial_interval_unit: proident minim initial_charge_after_trial: false return_params: occaecat aliqua request_credit_card: true require_credit_card: false created_at: veniam Ut voluptate updated_at: amet cupidatat update_return_url: eiusmod update_return_params: ex sit product_family: id: 79493145 name: officia Ut do sed in handle: ipsum description: aute ad minim labore in public_signup_pages: - id: 7301323 url: amet pariatur labore anim - id: 44384250 url: sunt reprehenderit irure taxable: false version_number: 97813744 product_price_point_name: ea in reprehenderit nostrud credit_card: id: 43625053 payment_type: quis culpa first_name: proident last_name: cupidatat masked_card_number: quis card_type: culpa expiration_month: 85208986 expiration_year: 24735711 billing_address: non deserunt velit billing_address_2: dolore cillum et id eiusmod billing_city: ea irure billing_country: cup billing_zip: dolor laborum nostrud current_vault: veniam minim vault_token: veniam eiusmod ullamco customer_id: -67969572 payment_type: in referral_code: do sint coupon_use_count: -94332497 coupon_uses_allowed: -51699327 stored_credential_transaction_id: -39021460 scheduled_cancellation_at: nisi et - subscription: id: -74308148 state: incididunt in officia proident tempor balance_in_cents: 15912868 total_revenue_in_cents: 2531160 product_price_in_cents: 81639693 product_version_number: -47143962 current_period_ends_at: proident cillum sunt commodo ad next_assessment_at: esse magna activated_at: nulla Excepteur consequat reprehenderit in created_at: sint mollit amet updated_at: deserunt quis current_period_started_at: velit esse adipisicing dolor ad previous_state: dolore proident anim do enim signup_payment_id: 40810917 signup_revenue: proident cupidatat coupon_code: aliquip payment_collection_method: cillum receives_invoice_emails: false net_terms: -1689610 reference: laborum pariatur customer: first_name: dolore anim last_name: occaecat email: laborum amet incididunt commodo cc_emails: ullamco organization: ipsum id: -58422720 created_at: esse ut in ea Lorem updated_at: cillum deserunt proide address: consequat address_2: in ullamco anim ad eu city: consequat state: tempor in velit zip: Lorem incididunt aute dolor country: aliquip sit fugiat qui phone: cupidatat occaecat qui ea verified: false portal_customer_created_at: in Ut est portal_invite_last_sent_at: exercitation tax_exempt: false vat_number: 'ex aliquip cillum ' product: id: 41509053 name: sit handle: sed ex Ut description: Lorem ut officia ullamco accounting_code: non fugiat price_in_cents: -81971287 interval: 52753626 interval_unit: ipsum do aliq expiration_interval_unit: ut voluptate trial_interval_unit: ullamco Lorem quis cupidatat initial_charge_after_trial: true return_params: Lorem ut minim request_credit_card: true require_credit_card: true created_at: Duis ut aliquip sit updated_at: nulla id pariatur veniam tempor update_return_url: ex update_return_params: quis tempor Lorem product_family: id: 29984673 name: aute Duis dolor cillum handle: commodo eiusmod officia anim non description: quis public_signup_pages: - url: nisi culpa exercitation cillum ullamco taxable: false version_number: 77247097 product_price_point_name: nostrud credit_card: id: -35961042 payment_type: nulla first_name: nisi deserunt voluptate sint incididunt last_name: aliquip exercitation pariatur ut masked_card_number: elit proident sunt officia laboris card_type: incididunt eiusmod fugiat expiration_month: -46773692 expiration_year: 77906528 billing_address: qui nisi fugiat billing_address_2: reprehenderit occaeca billing_city: deserunt dolore magna billing_country: dolor billing_zip: ipsum officia irure fugiat e current_vault: laboris minim incididunt Duis vault_token: exercitation customer_id: 14065716 payment_type: deserunt ad dolor nisi referral_code: nulla ea proident enim coupon_use_count: 15123584 coupon_uses_allowed: 94692877 stored_credential_transaction_id: 10179886 scheduled_cancellation_at: Ut - subscription: id: -65381067 state: pariatur balance_in_cents: -50262489 total_revenue_in_cents: -38492357 product_price_in_cents: 22676005 product_version_number: -81239574 current_period_ends_at: non sed nisi sint irure next_assessment_at: Lorem activated_at: occaecat tempor Lorem enim created_at: officia labor updated_at: Duis in pariatur current_period_started_at: ull previous_state: Lorem signup_payment_id: -20333140 signup_revenue: occaecat ut adipisicing in coupon_code: reprehenderit payment_collection_method: deserunt receives_invoice_emails: false net_terms: 96643605 reference: exercitation customer: first_name: pariatur last_name: '' email: Excepteur fugiat irure mollit cc_emails: voluptate ex ad organization: ipsum incididunt ut id: -20274125 created_at: eu esse commodo consectetur officia updated_at: adipisicing nostrud commodo Duis ea address: adipisicing proident non address_2: in cupidatat city: ut nulla quis velit pariatur state: fugiat zip: velit country: ullamco occaecat phone: ipsum est quis verified: false portal_customer_created_at: incididunt id portal_invite_last_sent_at: nulla tax_exempt: true vat_number: eu reprehenderit ullamco product: id: 78619607 name: nulla eiusmod ut reprehenderit dolore handle: incididunt mollit fugiat description: dolor accounting_code: consectetur enim ut price_in_cents: -86638215 interval: 74759706 interval_unit: consequat occaecat ut ipsum expiration_interval_unit: nulla ea trial_interval_unit: qui initial_charge_after_trial: false return_params: eiusmod proident minim nulla request_credit_card: true require_credit_card: true created_at: culpa Ut updated_at: ex dolor ullamco pa update_return_url: dolore laborum aliqua mollit update_return_params: elit product_family: id: -93009146 name: in elit occaecat ex sed handle: sit ullamco description: culpa laborum tempor ea veniam taxable: false version_number: -85673168 product_price_point_name: velit credit_card: id: 2406337 payment_type: Lorem first_name: sint u last_name: volup masked_card_number: magna irure card_type: exercitation nisi ut nostrud expiration_month: 11667202 expiration_year: -99935648 billing_address: veniam billing_address_2: mollit quis nulla eu billing_city: proident aliquip ut billing_country: aliqua billing_zip: quis culpa reprehenderit nostrud do current_vault: ipsum vault_token: fugiat veniam adipisicing customer_id: -23724824 payment_type: consequat referral_code: 'elit laboris ' coupon_use_count: 31105460 coupon_uses_allowed: -77841757 stored_credential_transaction_id: 47318220 scheduled_cancellation_at: dolore exercitatio security: - <>: [] x-stoplight: id: GET_customers-customerid-subscriptionsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/events.json': parameters: - name: subscription_id in: path required: true type: string get: operationId: list-events summary: List Events for Subscription tags: - Event - incomplete - Events description: |- ## List Events for a Subscription The following request will return a list of events for a subscription. Each event type has its own `event_specific_data` specified. parameters: - name: filter in: query description: Any of the events listed under the introduction. `?filter=payment_success' type: string - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' - $ref: '#/parameters/trait:eventsBasicFilters:page' - $ref: '#/parameters/trait:eventsBasicFilters:per_page' - $ref: '#/parameters/trait:eventsBasicFilters:since_id' - $ref: '#/parameters/trait:eventsBasicFilters:max_id' - $ref: '#/parameters/trait:eventsBasicFilters:direction' responses: '200': description: OK schema: type: array items: $ref: '#/definitions/event' examples: application/json: - event: id: 344799837 key: statement_settled message: Statement 79702531 settled successfully for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-11-01T12:41:29-04:00' event_specific_data: null - event: id: 344799815 key: renewal_success message: Successful renewal for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-11-01T12:41:28-04:00' event_specific_data: product_id: 3792003 account_transaction_id: null - event: id: 344799705 key: billing_date_change message: Billing date changed on Amelia Example's subscription to Basic Plan from 11/26/2016 to 11/01/2016 subscription_id: 14900541 created_at: '2016-11-01T12:41:25-04:00' event_specific_data: null security: - <>: [] x-stoplight: id: list-events beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /events.json: get: operationId: list-events summary: List Events tags: - Event - incomplete - Events description: |- ## Events Intro Chargify Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. Within the Chargify UI, "Events" are referred to as "Site Activity". Full documentation on how to record view Events / Site Activty in the Chargify UI can be located [here](https://help.chargify.com/sites/site-activity.html). ## List Events for a Site This method will retrieve a list of events for a site. Use query string filters to narrow down results. You may use the `key` filter as part of your query string to narrow down results. ### Legacy Filters The following keys are no longer supported. + `payment_failure_recreated` + `payment_success_recreated` + `renewal_failure_recreated` + `renewal_success_recreated` + `zferral_revenue_post_failure` - [Specific to the Zferral integration](https://help.chargify.com/integrations/zferral.html) + `zferral_revenue_post_success` - [Specific to the Zferral integration](https://help.chargify.com/integrations/zferral.html) ## Event Specific Data Event Specific Data Each event type has its own `event_specific_data` specified. Here’s an example event for the `subscription_product_change` event: ``` { "event": { "id": 351, "key": "subscription_product_change", "message": "Product changed on Marky Mark's subscription from 'Basic' to 'Pro'", "subscription_id": 205, "event_specific_data": { "new_product_id": 3, "previous_product_id": 2 }, "created_at": "2012-01-30T10:43:31-05:00" } } ``` Here’s an example event for the `subscription_state_change` event: ``` { "event": { "id": 353, "key": "subscription_state_change", "message": "State changed on Marky Mark's subscription to Pro from trialing to active", "subscription_id": 205, "event_specific_data": { "new_subscription_state": "active", "previous_subscription_state": "trialing" }, "created_at": "2012-01-30T10:43:33-05:00" } } ``` parameters: - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' - $ref: '#/parameters/trait:eventsBasicFilters:page' - $ref: '#/parameters/trait:eventsBasicFilters:per_page' - $ref: '#/parameters/trait:eventsBasicFilters:since_id' - $ref: '#/parameters/trait:eventsBasicFilters:max_id' - $ref: '#/parameters/trait:eventsBasicFilters:direction' - $ref: '#/parameters/trait:filterByEventName:filter' - $ref: '#/parameters/trait:eventsQueryString:date_field' - $ref: '#/parameters/trait:eventsQueryString:start_date' - $ref: '#/parameters/trait:eventsQueryString:end_date' - $ref: '#/parameters/trait:eventsQueryString:start_datetime' - $ref: '#/parameters/trait:eventsQueryString:end_datetime' responses: '200': description: OK schema: type: array items: $ref: '#/definitions/event' examples: application/json: - event: id: 343087780 key: subscription_state_change message: State changed on Test subscription to Monthly Product from active to past_due subscription_id: 14950962 created_at: '2016-10-27T16:42:22-04:00' event_specific_data: previous_subscription_state: active new_subscription_state: past_due - event: id: 343087742 key: billing_date_change message: Billing date changed on Test's subscription to Monthly Product from 11/27/2016 to 10/27/2016 subscription_id: 14950962 created_at: '2016-10-27T16:42:19-04:00' event_specific_data: null - event: id: 343085267 key: statement_closed message: Statement 79401838 closed (but not settled) for Test's subscription to ANNUAL product subscription_id: 14950975 created_at: '2016-10-27T16:40:40-04:00' event_specific_data: null security: - <>: [] x-stoplight: id: list-events beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /events/count.json: get: operationId: GET_events_count-format summary: Total Event Count tags: - Event - incomplete - Events description: |- ## Read the Total Event Count for a Site Obtain a count of the entire events for a given site by using this method. parameters: - name: body in: body schema: $ref: '#/definitions/event-count' - $ref: '#/parameters/trait:eventsBasicFilters:page' - $ref: '#/parameters/trait:eventsBasicFilters:per_page' - $ref: '#/parameters/trait:eventsBasicFilters:since_id' - $ref: '#/parameters/trait:eventsBasicFilters:max_id' - $ref: '#/parameters/trait:eventsBasicFilters:direction' - $ref: '#/parameters/trait:filterByEventName:filter' - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: OK schema: $ref: '#/definitions/Count' examples: application/json: count: 144 security: - <>: [] x-stoplight: id: GET_events_count-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/{subdomain}/events/{api_handle}.json': parameters: - name: subdomain in: path description: Your site's subdomain required: true type: string - name: api_handle in: path description: Identifies the Stream for which the event should be published. required: true type: string post: operationId: POST_subdomain-events-api_handle-json summary: Event Ingestion tags: - Events-Based Billing description: |- ## Events-Based Billing Documentation Events-Based Billing is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Chargify. These events can then be transformed, enriched, or analyzed to form the computed totals of usage charges billed to your customers. This API allows you to stream events into the Chargify data ingestion engine. Learn more about the feature in general in the [Events-Based Billing help docs](https://help.chargify.com/events/). ## Record Event Use this endpoint to record a single event. *Note: this endpoint differs from the standard Chargify endpoints in that the URL subdomain will be `events` and your site subdomain will be included in the URL path. For example:* ``` https://events.chargify.com/my-site-subdomain/events/my-stream-api-handle ``` parameters: - name: store_uid in: query description: 'If you''ve attached your own Keen project as a Chargify event data-store, use this parameter to indicate the data-store.' type: string - name: body in: body schema: type: object properties: chargify: type: object properties: timestamp: type: string description: 'This timestamp determines what billing period the event will be billed in. If your request payload does not include it, Chargify will add `chargify.timestamp` to the event payload and set the value to `now`.' id: type: string description: 'A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is present in the request payload, it will be overwritten. ' created_at: type: string description: 'An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that this field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten. ' uniqueness_token: type: string description: User-defined string scoped per-stream. Duplicate events within a stream will be silently ignored. Tokens expire after 31 days. maxLength: 64 example: chargify: subscription_id: 1 timestamp: '2020-02-27T17:45:50-05:00' messages: 150 country: US responses: '201': description: '' schema: type: object security: - <>: [] x-stoplight: id: POST_subdomain-events-apihandlejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/{subdomain}/events/{api_handle}/bulk.json': parameters: - name: subdomain in: path description: Your site's subdomain. required: true type: string - name: api_handle in: path description: Identifies the Stream for which the event should be published. required: true type: string post: operationId: POST_subdomain-events-api_handle-bulk-json summary: Bulk Event Ingestion tags: - Events-Based Billing description: |- Use this endpoint to record a collection of events. *Note: this endpoint differs from the standard Chargify endpoints in that the subdomain will be `events` and your site subdomain will be included in the URL path.* A maximum of 1000 events can be published in a single request. A 422 will be returned if this limit is exceeded. parameters: - name: store_uid in: query description: 'If you''ve attached your own Keen project as a Chargify event data-store, use this parameter to indicate the data-store.' type: string - name: body in: body schema: type: array items: type: object example: - chargify: subscription_id: 1 timestamp: '2020-02-27T17:45:50-05:00' messages: 150 country: US - chargify: subscription_id: 2 timestamp: '2020-02-27T17:45:50-05:00' messages: 130 country: CA responses: '201': description: '' security: - <>: [] x-stoplight: id: POST_subdomain-events-apihandle-bulkjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /invoices.json: get: operationId: GET_invoices-json summary: Read All Invoices tags: - Relationship Invoicing description: 'By default, invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`.' consumes: - application/xml produces: - application/xml parameters: - name: start_date in: query description: 'The beginning date range for the invoice''s Due Date, in the YYYY-MM-DD format.' type: string format: date - name: end_date in: query description: | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. type: string format: date - name: status in: query description: The current status of the invoice. type: string enum: - draft - open - paid - pending - voided - name: subscription_id in: query description: The subscription's ID. type: number - name: subscription_group_uid in: query description: The UID of the subscription group you want to fetch consolidated invoices for. This will return a paginated list of consolidated invoices for the specified group. type: string - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.' type: number default: 1 - name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. type: number default: 20 maximum: 200 - name: direction in: query description: The sort direction of the returned invoices. type: string default: desc enum: - desc - asc - name: line_items in: query description: Include line items data - defaults to false for the index. type: boolean default: false - name: discounts in: query description: Include discounts data - defaults to false for the index. type: boolean default: false - name: taxes in: query description: Include taxes data - defaults to false for the index. type: boolean default: false - name: credits in: query description: Include credits data - defaults to false for the index. type: boolean default: false - name: payments in: query description: Include payments data - defaults to false for the index. type: boolean default: false - name: custom_fields in: query description: Include custom fields data - defaults to false for the index. type: boolean default: false - name: refunds in: query description: Include refunds data - defaults to false for the index. type: boolean - name: sort in: query description: ' This parameter allows you to choose what you would like to sort on. ' type: string default: number enum: - number - issue_date - due_date - created_at - updated_at responses: '200': description: '' schema: type: array items: $ref: '#/definitions/read-all-invoices' examples: application/json: invoices: - uid: inv_8htcd29wcq3q6 site_id: 51288 customer_id: 20153415 subscription_id: 23277588 number: '125' sequence_number: 125 issue_date: '2018-09-20' due_date: '2018-09-20' paid_date: '2018-09-20' status: paid collection_method: automatic payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: parent parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: 23277588 product_name: Trial and setup fee product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 20153415 first_name: Meg last_name: Example organization: '' email: meg@example.com memo: Please pay within 15 days. billing_address: street: 123 I Love Cats Way line2: '' city: Boston state: MA zip: '90210' country: US shipping_address: street: 123 I Love Cats Way line2: '' city: Boston state: MA zip: '90210' country: US subtotal_amount: '100.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '100.0' credit_amount: '0.0' paid_amount: '100.0' refund_amount: '0.0' due_amount: '0.0' - uid: inv_8hr3546xp4h8n site_id: 51288 customer_id: 21687686 subscription_id: 22007644 number: '124' sequence_number: 124 issue_date: '2018-09-18' due_date: '2018-09-18' paid_date: null status: open collection_method: remittance payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Trial and setup fee product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 21687686 first_name: Charlene last_name: Tester organization: '' email: food@example.com memo: Please pay within 15 days. billing_address: street: '' line2: '' city: '' state: '' zip: '' country: '' shipping_address: street: '' line2: '' city: '' state: '' zip: '' country: '' subtotal_amount: '100.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '100.0' credit_amount: '0.0' paid_amount: '0.0' refund_amount: '0.0' due_amount: '100.0' - uid: inv_8hr3546wdwxkr site_id: 51288 customer_id: 21687670 subscription_id: 22007627 number: '123' sequence_number: 123 issue_date: '2018-09-18' due_date: '2018-09-18' paid_date: '2018-09-18' status: paid collection_method: automatic payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Trial End - Free product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 21687670 first_name: Hello last_name: World organization: '123' email: example@example.com memo: Please pay within 15 days. billing_address: street: 123 Anywhere Street line2: '' city: Boston state: MA zip: '02120' country: US shipping_address: street: '' line2: '' city: Boston state: AL zip: '02120' country: US subtotal_amount: '0.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '0.0' credit_amount: '0.0' paid_amount: '0.0' refund_amount: '0.0' due_amount: '0.0' - uid: inv_8hjtk8bz56bbp site_id: 51288 customer_id: 20137757 subscription_id: 20541100 number: '122' sequence_number: 122 issue_date: '2018-09-10' due_date: '2018-09-10' paid_date: '2018-09-10' status: paid collection_method: automatic payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: $0 Product product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 20137757 first_name: Sasha last_name: Example organization: '' email: example@example.com memo: Please pay within 15 days. billing_address: street: 123 I Love Cats Way line2: '' city: Catville state: MA zip: '90210' country: US shipping_address: street: 123 I Love Cats Way line2: '' city: Catville state: AL zip: '90210' country: US subtotal_amount: '0.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '0.0' credit_amount: '0.0' paid_amount: '0.0' refund_amount: '0.0' due_amount: '0.0' public_url: 'https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y' security: - <>: [] x-stoplight: id: GET_invoicesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{invoice_id}.json': parameters: - name: invoice_id in: path description: '' required: true type: integer get: operationId: GET_invoices-invoice_id-format summary: Read Legacy Invoice tags: - Invoice - incomplete - Invoices (Legacy) description: |- ## Read Legacy Invoice This method will retrieve the invoice object based on the ID provided. ## PDF Invoice retrieval Individual PDF Invoices can be retrieved by using the "Accept/Content-Type" header application/pdf or appending .pdf as the format portion of the URL: ```curl -u :x -H Accept:application/pdf -H Content-Type:application/pdf https://acme.chargify.com/invoices/1.pdf > output_file.pdf URL: `https://.chargify.com/invoices/.` Method: GET Required parameters: `invoice_id` Response: A single Invoice. ``` parameters: - $ref: '#/parameters/trait:startdateEnddateQuery:start_date' - $ref: '#/parameters/trait:startdateEnddateQuery:end_date' responses: '200': description: OK schema: type: object properties: invoice: $ref: '#/definitions/legacy-invoice' examples: application/json: invoice: id: 1240345 subscription_id: 14900541 statement_id: 79334531 site_id: 31615 state: paid total_amount_in_cents: 4250 paid_at: '2016-11-01T12:20:21-04:00' created_at: '2016-10-26T14:38:40-04:00' updated_at: '2016-11-01T12:20:21-04:00' amount_due_in_cents: 0 number: '000014' charges: - created_at: '2016-10-26T14:38:39-04:00' subscription_id: 14900541 type: Charge memo: Basic Plan (10/26/2016 - 11/26/2016) kind: baseline amount_in_cents: 4000 ending_balance_in_cents: 4000 success: true id: 159670144 payment_id: 160493169 product_id: 3792003 transaction_type: charge gateway_transaction_id: null gateway_order_id: null starting_balance_in_cents: 0 component_id: null tax_id: null customer_id: 14399371 - created_at: '2016-10-26T14:38:39-04:00' subscription_id: 14900541 type: Charge memo: MA Tax (6.25%) kind: tax amount_in_cents: 250 ending_balance_in_cents: 4250 success: true id: 159670145 payment_id: 160493169 product_id: 3792003 transaction_type: charge gateway_transaction_id: null gateway_order_id: null starting_balance_in_cents: 4000 component_id: null tax_id: null customer_id: 14399371 payments_and_credits: - created_at: '2016-11-01T12:20:20-04:00' subscription_id: 14900541 type: Payment memo: One Time Credit Card Payment for Invoice kind: one_time amount_in_cents: 4250 ending_balance_in_cents: -4450 success: true id: 160493169 payment_id: null product_id: 3792003 transaction_type: payment gateway_transaction_id: '53433' gateway_order_id: null starting_balance_in_cents: -200 component_id: null tax_id: null customer_id: 14399371 card_number: XXXX-XXXX-XXXX-1 card_expiration: 01/2026 card_type: bogus '404': description: Not Found security: - <>: [] x-stoplight: id: GET_invoices-invoice_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/invoices/{invoice_id}/payments.json': parameters: - name: invoice_id in: path required: true type: string post: operationId: POST_invoices-invoice_id-payments-json summary: Create Payment tags: - Invoices (Legacy) description: |- ## Create External Payment for Legacy Invoice In order to specify a payment made against an invoice, specify the `amount`. Please note that you may request the payment `amount_in_cents`. You may submit your request in cents as well: ``` { "payment": { "amount": 10.00, "memo": "Lorem ipsum" } } ``` ## Invoice Payment Documentation For more information that on adding a payment to an invoice, please see our payment documentation below: + [Pay via Card](https://help.chargify.com/invoices/invoice-reference.html#pay-with-card) + [Offline Payments](https://help.chargify.com/invoices/invoice-reference.html#enter-payment) parameters: - name: body in: body schema: $ref: '#/definitions/create-external-payment' responses: '200': description: '' schema: $ref: '#/definitions/payment' examples: application/json: payment: id: 160567068 subscription_id: 14900541 type: Payment kind: manual transaction_type: payment success: true amount_in_cents: 1000 memo: Lorem ipsum created_at: '2016-11-01T16:04:37-04:00' starting_balance_in_cents: 3750 ending_balance_in_cents: 2750 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 79733833 customer_id: 14399371 card_number: null card_expiration: null card_type: null refunded_amount_in_cents: 0 security: - <>: [] x-stoplight: id: POST_invoices-invoiceid-paymentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{invoice_id}/charges.json': parameters: - name: invoice_id in: path required: true type: string post: operationId: POST_invoices-invoice_id-charges-json summary: Create Charge tags: - Invoices (Legacy) description: |- ## Invoice Charges Documentation For more information on adding a charge to an invoice, please see our documentation [here](https://help.chargify.com/invoices/invoice-reference.html#add-charge). parameters: - name: body in: body schema: $ref: '#/definitions/create-charge-for-legacy-invoice' example: charge: amount: '10.00' memo: Support October 2016 responses: '200': description: '' schema: $ref: '#/definitions/charge' security: - <>: [] x-stoplight: id: POST_invoices-invoiceid-chargesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{invoice_id}/adjustments.json': parameters: - name: invoice_id in: path required: true type: string post: operationId: POST_invoices-invoice_id-adjustments-json summary: Create Credit tags: - Invoices (Legacy) description: |- ## Create Invoice Credit Use this method to add a credit to an existing invoice. parameters: - name: body in: body schema: $ref: '#/definitions/create-credit-for-legacy-invoice' example: adjustment: amount: 10 memo: Credit for recycling old computers responses: '200': description: '' schema: $ref: '#/definitions/credit' examples: application/json: adjustment: id: 165068820 subscription_id: 14823581 type: Adjustment kind: null transaction_type: adjustment success: true amount_in_cents: -1000 memo: Credit for recycling old computers created_at: '2016-12-05T13:37:28-05:00' starting_balance_in_cents: 177 ending_balance_in_cents: -823 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3794121 tax_id: null component_id: null statement_id: 79335006 customer_id: 14332342 security: - <>: [] x-stoplight: id: POST_invoices-invoiceid-adjustmentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{uid}.json': parameters: - name: uid in: path required: true type: string get: operationId: GET_invoices-uid-json summary: Read One Invoice tags: - Relationship Invoicing responses: '200': description: '' schema: $ref: '#/definitions/invoice-new' examples: application/json: uid: inv_8gd8tdhtd3hgr site_id: 51288 customer_id: 20194505 subscription_id: 20597774 number: '117' sequence_number: 117 issue_date: '2018-07-26' due_date: '2018-07-26' paid_date: '2018-07-26' status: paid collection_method: automatic payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Monthly Product product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 20194505 first_name: Joe last_name: Example organization: null email: joe@example.com memo: Please pay within 15 days. billing_address: street: null line2: null city: null state: null zip: null country: null shipping_address: street: null line2: null city: null state: null zip: null country: null subtotal_amount: '100.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '100.0' credit_amount: '0.0' paid_amount: '100.0' refund_amount: '0.0' due_amount: '0.0' line_items: - uid: li_8gd8tdhhgk55k title: Monthly Product description: 'Jul 26, 2018 - Aug 26, 2018' quantity: '1.0' unit_price: '100.0' subtotal_amount: '100.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '100.0' tiered_unit_price: false period_range_start: '2018-07-26' period_range_end: '2018-08-26' product_id: 4607632 product_version: 1 component_id: null price_point_id: null discounts: [] taxes: [] credits: [] payments: - transaction_time: '2018-07-26T15:22:02Z' memo: 'Joe Example - Monthly Product: Renewal payment' original_amount: '100.0' applied_amount: '100.0' payment_method: card_brand: bogus card_expiration: 10/2020 last_four: null masked_card_number: XXXX-XXXX-XXXX-1 type: credit_card transaction_id: 253028955 prepayment: false refunds: [] custom_fields: [] public_url: 'https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y' security: - <>: [] x-stoplight: id: GET_invoices-uidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{uid}/refunds.json': parameters: - name: uid in: path required: true type: string post: operationId: POST_invoices-uid-refunds-json summary: Refund Single Invoice tags: - Relationship Invoicing description: 'This relates to refunding either a non-consolidated invoice, or a segment of a consoldiated invoice (see below for docs on refunding a consolidated invoice). This endpoint accepts an `amount`, `memo`, and the `payment_id` of the payment that is being refunded. The `amount` is a dollar amount, not in cents, and cannot exceed to remaining refundable balance of the payment.' consumes: - application/xml produces: - application/xml parameters: - name: body in: body schema: type: object properties: refund: type: object required: - amount - memo - payment_id properties: amount: type: string description: A string of the dollar amount to be refunded (eg. "10.50" => $10.50) memo: type: string description: A description that will be attached to the refund payment_id: type: integer description: The ID of the payment to be refunded external: type: boolean description: Flag that marks refund as external (no money is returned to the customer). Defaults to `false`. apply_credit: type: boolean description: 'If set to true, creates credit and applies it to an invoice. Defaults to `false`.' void_invoice: type: boolean description: 'If `apply_credit` set to false and refunding full amount, if `void_invoice` set to true, invoice will be voided after refund. Defaults to `false`.' required: - refund example: refund: amount: '10.00' memo: Refund for basic plan renewal payment_id: 101 responses: '200': description: '' schema: $ref: '#/definitions/invoice-new' examples: application/xml: uid: inv_8gd8tdhtd3hgr site_id: 51288 customer_id: 20194505 subscription_id: 20597774 number: '117' sequence_number: 117 issue_date: '2018-07-26' due_date: '2018-07-26' paid_date: '2018-07-26' status: paid collection_method: automatic payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Monthly Product product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 20194505 first_name: Joe last_name: Example organization: null email: joe@example.com memo: Please pay within 15 days. billing_address: street: null line2: null city: null state: null zip: null country: null shipping_address: street: null line2: null city: null state: null zip: null country: null subtotal_amount: '100.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '100.0' credit_amount: '0.0' paid_amount: '100.0' refund_amount: '0.0' due_amount: '0.0' line_items: - uid: li_8gd8tdhhgk55k title: Monthly Product description: 'Jul 26, 2018 - Aug 26, 2018' quantity: '1.0' unit_price: '100.0' subtotal_amount: '100.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '100.0' tiered_unit_price: false period_range_start: '2018-07-26' period_range_end: '2018-08-26' product_id: 4607632 product_version: 1 component_id: null price_point_id: null discounts: [] taxes: [] credits: [] payments: - transaction_time: '2018-07-26T15:22:02Z' memo: 'Joe Example - Monthly Product: Renewal payment' original_amount: '100.0' applied_amount: '100.0' payment_method: card_brand: bogus card_expiration: 10/2020 last_four: null masked_card_number: XXXX-XXXX-XXXX-1 type: credit_card transaction_id: 253028955 prepayment: false refunds: [] custom_fields: [] security: - <>: [] x-stoplight: id: POST_invoices-uid-refundsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /invoices/events.json: get: operationId: GET_invoices-events-json summary: Read Invoice Events tags: - Relationship Invoicing description: |- ## Read Invoice Events This endpoint returns a list of invoice events. Each event contains event "data" (such as an applied payment) as well as a snapshot of the `invoice` at the time of event completion. Exposed event types are: + issue_invoice + apply_credit_note + apply_payment + refund_invoice + void_invoice + void_remainder + backport_invoice + change_invoice_status Invoice events are returned in ascending order. If both a `since_date` and `since_id` are provided in request parameters, the `since_date` will be used. Note - invoice events that occurred prior to 09/05/2018 __will not__ contain an `invoice` snapshot. parameters: - name: invoice_uid in: query description: Providing an `invoice_uid` allows for scoping of the invoice events to a single invoice or credit note. Has the format `inv_8r74ycqk7mnbn`. type: string - name: with_change_invoice_status in: query description: Use this parameter if you want to fetch also invoice events with `change_invoice_status` type. type: boolean default: false - name: event_types in: query description: 'Filter results by event_type. Supply a comma separated list of event types (listed above). eg: void_invoice,void_remainder' type: string - $ref: '#/parameters/trait:relationshipInvoicingTraits:since_date' - $ref: '#/parameters/trait:relationshipInvoicingTraits:since_id' - $ref: '#/parameters/trait:relationshipInvoicingTraits:page' - $ref: '#/parameters/trait:relationshipInvoicingTraits:per_page' responses: '200': description: '' schema: $ref: '#/definitions/read-invoice-events-response' examples: application/json: events: - id: 83 event_type: apply_payment event_data: memo: 'Non-Resumable Canceled On Purpose - Standard Plan: Renewal payment' original_amount: '168.61' applied_amount: '168.61' transaction_time: '2018-08-01T16:00:00Z' payment_method: card_brand: visa card_expiration: 12/2022 last_four: null masked_card_number: XXXX-XXXX-XXXX-1111 type: credit_card transaction_id: 126 consolidation_level: none parent_invoice_number: null timestamp: '2018-08-01T16:00:00Z' invoice: id: 614942008934401500 uid: inv_8gk5bwkct3gqt site_id: 20 customer_id: 6 subscription_id: 10 number: '25' sequence_number: 25 transaction_time: '2018-08-01T16:00:00Z' created_at: '2018-08-01T16:00:00Z' updated_at: '2018-08-01T16:00:00Z' issue_date: '2018-08-01' due_date: '2018-08-01' paid_date: '2018-08-01' status: paid role: renewal collection_method: automatic payment_instructions: 'Please make checks payable to "Acme, Inc."' currency: USD consolidation_level: none parent_invoice_id: null subscription_group_id: null parent_invoice_number: null product_name: Standard Plan product_family_name: Cloud Compute Servers seller: name: 'Acme, Inc.' address: street: null line2: null city: null state: null zip: null country: null phone: 555-555-1234 x137 logo_url: null customer: chargify_id: 6 first_name: Non-Resumable last_name: Canceled On Purpose organization: null email: evan4@example.com payer: chargify_id: 6 first_name: Non-Resumable last_name: Canceled On Purpose organization: null email: evan4@example.com recipient_emails: [] terms: due_on_receipt memo: 'Thanks for your business! If you have any questions, please contact your account manager.' billing_address: street: 200 Billing Rd. line2: Suite 100 city: Needham state: MA zip: 02494 country: US shipping_address: street: 100 Shipping St. line2: Apt 200 city: Pleasantville state: NC zip: '12345' country: US line_items: - uid: li_8gk5bwkct3gqk title: Standard Plan description: 08/01/2018 - 09/01/2018 quantity: '1.0' unit_price: '99.0' subtotal_amount: '99.0' discount_amount: '9.9' tax_amount: '6.01425' total_amount: '95.11425' tiered_unit_price: false period_range_start: '2018-08-01' period_range_end: '2018-09-01' transaction_id: 120 product_id: 84 product_version: 1 component_id: null price_point_id: null hide: false component_cost_data: null - uid: li_8gk5bwkct3gqm title: Small Instance (Hourly) description: 07/22/2018 - 08/01/2018 quantity: '162.0' unit_price: '0.09567901' subtotal_amount: '15.5' discount_amount: '1.55' tax_amount: '0.941625' total_amount: '14.891625' tiered_unit_price: true period_range_start: '2018-07-22' period_range_end: '2018-08-01' transaction_id: 121 product_id: 84 product_version: 1 component_id: 76 price_point_id: null hide: false component_cost_data: rates: - component_code_id: null price_point_id: 160 product_id: 84 quantity: '162.0' amount: '15.5' pricing_scheme: tiered tiers: - starting_quantity: 1 ending_quantity: 100 quantity: '100.0' unit_price: '0.0' amount: '0.0' - starting_quantity: 101 ending_quantity: null quantity: '62.0' unit_price: '0.25' amount: '15.5' - uid: li_8gk5bwkct3gqn title: Large Instance (Hourly) description: 07/22/2018 - 08/01/2018 quantity: '194.0' unit_price: '0.24226804' subtotal_amount: '47.0' discount_amount: '4.7' tax_amount: '2.85525' total_amount: '45.15525' tiered_unit_price: true period_range_start: '2018-07-22' period_range_end: '2018-08-01' transaction_id: 122 product_id: 84 product_version: 1 component_id: 77 price_point_id: null hide: false component_cost_data: rates: - component_code_id: null price_point_id: 161 product_id: 84 quantity: '194.0' amount: '47.0' pricing_scheme: tiered tiers: - starting_quantity: 1 ending_quantity: 100 quantity: '100.0' unit_price: '0.0' amount: '0.0' - starting_quantity: 101 ending_quantity: null quantity: '94.0' unit_price: '0.5' amount: '47.0' - uid: li_8gk5bwkct3gqp title: IP Addresses description: 08/01/2018 - 09/01/2018 quantity: '7.0' unit_price: '2.0' subtotal_amount: '14.0' discount_amount: '1.4' tax_amount: '0.8505' total_amount: '13.4505' tiered_unit_price: false period_range_start: '2018-08-01' period_range_end: '2018-09-01' transaction_id: 123 product_id: 84 product_version: 1 component_id: 79 price_point_id: 163 hide: false component_cost_data: rates: - component_code_id: null price_point_id: 163 product_id: 84 quantity: '7.0' amount: '14.0' pricing_scheme: per_unit tiers: - starting_quantity: 1 ending_quantity: null quantity: '7.0' unit_price: '2.0' amount: '14.0' subtotal_amount: '175.5' discount_amount: '17.55' discounts: - uid: dli_8gk5bwkct3gqq title: Multi-service discount (10%) description: null code: MULTI3 source_type: Coupon source_id: 40 discount_type: percentage percentage: '10.0' eligible_amount: '175.5' discount_amount: '17.55' transaction_id: 124 line_item_breakouts: - uid: li_8gk5bwkct3gqk eligible_amount: '99.0' discount_amount: '9.9' - uid: li_8gk5bwkct3gqm eligible_amount: '15.5' discount_amount: '1.55' - uid: li_8gk5bwkct3gqn eligible_amount: '47.0' discount_amount: '4.7' - uid: li_8gk5bwkct3gqp eligible_amount: '14.0' discount_amount: '1.4' tax_amount: '10.66' taxes: - uid: tli_8gk5bwkct3gqr title: NC Sales Tax description: null source_type: Tax source_id: 1 percentage: '6.75' taxable_amount: '157.95' tax_amount: '10.66' transaction_id: 125 line_item_breakouts: - uid: li_8gk5bwkct3gqk taxable_amount: '89.1' tax_amount: '6.01425' - uid: li_8gk5bwkct3gqm taxable_amount: '13.95' tax_amount: '0.941625' - uid: li_8gk5bwkct3gqn taxable_amount: '42.3' tax_amount: '2.85525' - uid: li_8gk5bwkct3gqp taxable_amount: '12.6' tax_amount: '0.8505' tax_component_breakouts: - tax_rule_id: 1 percentage: '6.75' country_code: US subdivision_code: NC credit_amount: '0.0' refund_amount: '0.0' total_amount: '168.61' paid_amount: '168.61' due_amount: '0.0' credits: [] refunds: [] payments: - memo: 'Non-Resumable Canceled On Purpose - Standard Plan: Renewal payment' original_amount: '168.61' applied_amount: '168.61' transaction_time: '2018-08-01T16:00:00Z' payment_method: card_brand: visa card_expiration: 12/2022 last_four: null masked_card_number: XXXX-XXXX-XXXX-1111 type: credit_card transaction_id: 126 prepayment: false custom_fields: [] display_settings: hide_zero_subtotal_lines: false include_discounts_on_lines: false page: 48 per_page: 1 total_pages: 102 security: - <>: [] x-stoplight: id: GET_invoices-eventsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{uid}/payments.json': parameters: - name: uid in: path description: 'The unique identifier for the invoice, this does not refer to the public facing invoice number' required: true type: string post: operationId: POST_invoices-uid-payments-json summary: Create Payment tags: - Relationship Invoicing description: |- ## Create Payment This API call should be used when you want to record an external payment against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the [bulk payment](#endpoint:EMs2kYgYbkxKtnpij) endpoint. ## Create a Payment from the Subscription's Prepayment Account In order apply a prepayment to an invoice, specify the `type` as `prepayment`, and also the `amount`. ``` { "type": "prepayment", "payment": { "amount": 10.00 } } ``` Note that the `amount` must be less than or equal to the Subscription's Prepayment account balance. ## Create a Payment from the Subscription's Service Credit Account In order to apply a service credit to an invoice, specify the `type` as `service_credit`, and also the `amount`: ``` { "type": "service_credit", "payment": { "amount": 10.00 } } ``` Note that Chargify will attempt to fully pay the invoice's `due_amount` from the Subscription's Service Credit account. At this time, partial payments from a Service Credit Account are only allowed for consolidated invoices (subscription groups). Therefore, for normal invoices the Service Credit account balance must be greater than or equal to the invoice's `due_amount`. consumes: - application/xml parameters: - name: body in: body schema: type: object properties: payment: type: object required: - amount properties: amount: type: - string - number description: A string of the dollar amount to be refunded (eg. "10.50" => $10.50) memo: type: string description: A description to be attached to the payment. method: type: string enum: - credit_card - check - cash - money_order - ach - paypal_account - other default: other description: The type of payment method used. details: type: string description: 'Additional information related to the payment method (eg. Check #)' type: type: string default: external enum: - external - prepayment - service_credit description: | The type of payment to be applied to an Invoice. required: - payment example: payment: amount: 124.33 memo: for John Smith payment_method_name: check payment_method_details: '#0102' responses: '200': description: '' schema: $ref: '#/definitions/invoice-new' security: - <>: [] x-stoplight: id: POST_invoices-uid-paymentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /credit_notes.json: get: operationId: GET_credit_notes-json summary: Read All Credit Notes tags: - Relationship Invoicing description: |- Credit Notes are like inverse invoices. They reduce the amount a customer owes. By default, the credit notes returned by this endpoint will exclude the arrays of `line_items`, `discounts`, `taxes`, `applications`, or `refunds`. To include these arrays, pass the specific field as a key in the query with a value set to `true`. consumes: - application/xml produces: - application/xml parameters: - name: subscription_id in: query description: The subscription's ID. type: number - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.' type: number default: 1 - name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. type: number default: 20 maximum: 200 - name: line_items in: query description: Include line items data - defaults to false for the index. type: boolean default: false - name: discounts in: query description: Include discounts data - defaults to false for the index. type: boolean default: false - name: taxes in: query description: Include taxes data - defaults to false for the index. type: boolean default: false - name: refunds in: query description: Include credits data - defaults to false for the index. type: boolean default: false - name: applications in: query description: Include payments data - defaults to false for the index. type: boolean default: false responses: '200': description: '' schema: type: object properties: credit_notes: type: array items: $ref: '#/definitions/credit-note' examples: application/json: credit_notes: - uid: cn_8m9vbd5kkv7kr site_id: 20 customer_id: 3 subscription_id: 2 number: '77' sequence_number: 78 issue_date: '2018-12-31' applied_date: '2018-12-31' status: applied currency: USD memo: Refund for overpayment seller: name: 'Acme, Inc.' address: street: 122 E Houston St line2: Suite 105 city: San Antonio state: TX zip: '78205' country: US phone: 555-555-1234 x137 customer: chargify_id: 3 first_name: Marty last_name: McFly organization: 'Time Travellers, Inc.' email: timetraveller1985@example.com reference: null billing_address: street: 200 Billing Rd. line2: Suite 100 city: Needham state: MA zip: 02494 country: US shipping_address: street: 100 Shipping St. line2: Apt 200 city: Pleasantville state: NC zip: '12345' country: US subtotal_amount: '208.69341779' discount_amount: '20.87125167' tax_amount: '12.67783387' total_amount: '200.5' applied_amount: '200.5' remaining_amount: '0.0' line_items: - uid: cnli_8k5jvdzct4h9x title: 'IP Addresses: 5 to 10 addresses' description: 38.2% credit quantity: '0.9855' unit_price: '2.0' subtotal_amount: '1.971004' discount_amount: '0.19862831' tax_amount: '0.11963536' total_amount: '1.89201105' tiered_unit_price: false period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 81 price_point_id: 165 - uid: cnli_8kjttvjcjx8b4 title: Professional Plan description: 38.2% credit quantity: '0.382' unit_price: '299.0' subtotal_amount: '114.21127834' discount_amount: '11.42112783' tax_amount: '6.93833516' total_amount: '109.72848567' tiered_unit_price: false period_range_start: '2018-12-30' period_range_end: '2018-12-30' product_id: 85 product_version: 1 component_id: null price_point_id: null - uid: cnli_8kjttvjknzhx7 title: Small Instance (Hourly) description: 38.2% credit quantity: '74.8676' unit_price: '0.12244898' subtotal_amount: '9.16746047' discount_amount: '0.91674605' tax_amount: '0.55692322' total_amount: '8.80763764' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 78 price_point_id: null - uid: cnli_8kjttvjnmh25w title: Large Instance (Hourly) description: 38.2% credit quantity: '183.3492' unit_price: '0.39583333' subtotal_amount: '72.57572871' discount_amount: '7.25757287' tax_amount: '4.40897552' total_amount: '69.72713136' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 79 price_point_id: null - uid: cnli_8kjttvjqn86kc title: Email Messages description: 38.2% credit quantity: '10076.9489' unit_price: '0.00031045' subtotal_amount: '3.12839588' discount_amount: '0.31322157' tax_amount: '0.19002427' total_amount: '3.00519858' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 80 price_point_id: null - uid: cnli_8kjttvjtxxbdd title: IP Addresses description: 38.2% credit quantity: '3.8198' unit_price: '2.0' subtotal_amount: '7.63955039' discount_amount: '0.76395504' tax_amount: '0.46410269' total_amount: '7.33969804' tiered_unit_price: false period_range_start: '2018-12-30' period_range_end: '2018-12-30' product_id: 85 product_version: 1 component_id: 81 price_point_id: 165 discounts: - uid: cndli_8k5jvdzct4h9y title: Multi-service discount (10%) code: MULTI3 source_type: Coupon source_id: 40 discount_type: percentage percentage: '10.0' eligible_amount: '208.69341779' discount_amount: '20.87125167' line_item_breakouts: - uid: cnli_8k5jvdzct4h9x eligible_amount: '1.971004' discount_amount: '0.19862831' - uid: cnli_8kjttvjcjx8b4 eligible_amount: '114.21127834' discount_amount: '11.42112783' - uid: cnli_8kjttvjknzhx7 eligible_amount: '9.16746047' discount_amount: '0.91674605' - uid: cnli_8kjttvjnmh25w eligible_amount: '72.57572871' discount_amount: '7.25757287' - uid: cnli_8kjttvjqn86kc eligible_amount: '3.12839588' discount_amount: '0.31322157' - uid: cnli_8kjttvjtxxbdd eligible_amount: '7.63955039' discount_amount: '0.76395504' taxes: - uid: cntli_8k5jvdzct4h9z title: NC Sales Tax source_type: Tax source_id: 1 percentage: '6.75' taxable_amount: '187.82216613' tax_amount: '12.67783387' line_item_breakouts: - uid: cnli_8k5jvdzct4h9x taxable_amount: '1.77237569' tax_amount: '0.11963536' - uid: cnli_8kjttvjcjx8b4 taxable_amount: '102.7901505' tax_amount: '6.93833516' - uid: cnli_8kjttvjknzhx7 taxable_amount: '8.25071442' tax_amount: '0.55692322' - uid: cnli_8kjttvjnmh25w taxable_amount: '65.31815584' tax_amount: '4.40897552' - uid: cnli_8kjttvjqn86kc taxable_amount: '2.81517432' tax_amount: '0.19002427' - uid: cnli_8kjttvjtxxbdd taxable_amount: '6.87559535' tax_amount: '0.46410269' applications: - uid: cdt_8m9vbdbdwd28n transaction_time: '2018-12-31T21:19:28Z' invoice_uid: inv_8k5jvdzct4hb2 memo: Refund for overpayment applied_amount: '200.5' refunds: - transaction_id: 329 payment_id: 39 memo: Refund for overpayment original_amount: '524.9' applied_amount: '200.5' security: - <>: [] x-stoplight: id: GET_creditnotesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/credit_notes/{uid}.json': parameters: - name: uid in: path required: true type: string get: operationId: GET_credit_notes-uid-json summary: Read One Credit Note tags: - Relationship Invoicing responses: '200': description: '' schema: $ref: '#/definitions/credit-note' examples: application/json: uid: cn_8m9vbd5kkv7kr site_id: 20 customer_id: 3 subscription_id: 2 number: '77' sequence_number: 78 issue_date: '2018-12-31' applied_date: '2018-12-31' status: applied currency: USD memo: Refund for overpayment seller: name: 'Acme, Inc.' address: street: 122 E Houston St line2: Suite 105 city: San Antonio state: TX zip: '78205' country: US phone: 555-555-1234 x137 customer: chargify_id: 3 first_name: Marty last_name: McFly organization: 'Time Travellers, Inc.' email: timetraveller1985@example.com reference: null billing_address: street: 200 Billing Rd. line2: Suite 100 city: Needham state: MA zip: 02494 country: US shipping_address: street: 100 Shipping St. line2: Apt 200 city: Pleasantville state: NC zip: '12345' country: US subtotal_amount: '208.69341779' discount_amount: '20.87125167' tax_amount: '12.67783387' total_amount: '200.5' applied_amount: '200.5' remaining_amount: '0.0' line_items: - uid: cnli_8k5jvdzct4h9x title: 'IP Addresses: 5 to 10 addresses' description: 38.2% credit quantity: '0.9855' unit_price: '2.0' subtotal_amount: '1.971004' discount_amount: '0.19862831' tax_amount: '0.11963536' total_amount: '1.89201105' tiered_unit_price: false period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 81 price_point_id: 165 - uid: cnli_8kjttvjcjx8b4 title: Professional Plan description: 38.2% credit quantity: '0.382' unit_price: '299.0' subtotal_amount: '114.21127834' discount_amount: '11.42112783' tax_amount: '6.93833516' total_amount: '109.72848567' tiered_unit_price: false period_range_start: '2018-12-30' period_range_end: '2018-12-30' product_id: 85 product_version: 1 component_id: null price_point_id: null - uid: cnli_8kjttvjknzhx7 title: Small Instance (Hourly) description: 38.2% credit quantity: '74.8676' unit_price: '0.12244898' subtotal_amount: '9.16746047' discount_amount: '0.91674605' tax_amount: '0.55692322' total_amount: '8.80763764' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 78 price_point_id: null - uid: cnli_8kjttvjnmh25w title: Large Instance (Hourly) description: 38.2% credit quantity: '183.3492' unit_price: '0.39583333' subtotal_amount: '72.57572871' discount_amount: '7.25757287' tax_amount: '4.40897552' total_amount: '69.72713136' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 79 price_point_id: null - uid: cnli_8kjttvjqn86kc title: Email Messages description: 38.2% credit quantity: '10076.9489' unit_price: '0.00031045' subtotal_amount: '3.12839588' discount_amount: '0.31322157' tax_amount: '0.19002427' total_amount: '3.00519858' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 80 price_point_id: null - uid: cnli_8kjttvjtxxbdd title: IP Addresses description: 38.2% credit quantity: '3.8198' unit_price: '2.0' subtotal_amount: '7.63955039' discount_amount: '0.76395504' tax_amount: '0.46410269' total_amount: '7.33969804' tiered_unit_price: false period_range_start: '2018-12-30' period_range_end: '2018-12-30' product_id: 85 product_version: 1 component_id: 81 price_point_id: 165 discounts: - uid: cndli_8k5jvdzct4h9y title: Multi-service discount (10%) code: MULTI3 source_type: Coupon source_id: 40 discount_type: percentage percentage: '10.0' eligible_amount: '208.69341779' discount_amount: '20.87125167' line_item_breakouts: - uid: cnli_8k5jvdzct4h9x eligible_amount: '1.971004' discount_amount: '0.19862831' - uid: cnli_8kjttvjcjx8b4 eligible_amount: '114.21127834' discount_amount: '11.42112783' - uid: cnli_8kjttvjknzhx7 eligible_amount: '9.16746047' discount_amount: '0.91674605' - uid: cnli_8kjttvjnmh25w eligible_amount: '72.57572871' discount_amount: '7.25757287' - uid: cnli_8kjttvjqn86kc eligible_amount: '3.12839588' discount_amount: '0.31322157' - uid: cnli_8kjttvjtxxbdd eligible_amount: '7.63955039' discount_amount: '0.76395504' taxes: - uid: cntli_8k5jvdzct4h9z title: NC Sales Tax source_type: Tax source_id: 1 percentage: '6.75' taxable_amount: '187.82216613' tax_amount: '12.67783387' line_item_breakouts: - uid: cnli_8k5jvdzct4h9x taxable_amount: '1.77237569' tax_amount: '0.11963536' - uid: cnli_8kjttvjcjx8b4 taxable_amount: '102.7901505' tax_amount: '6.93833516' - uid: cnli_8kjttvjknzhx7 taxable_amount: '8.25071442' tax_amount: '0.55692322' - uid: cnli_8kjttvjnmh25w taxable_amount: '65.31815584' tax_amount: '4.40897552' - uid: cnli_8kjttvjqn86kc taxable_amount: '2.81517432' tax_amount: '0.19002427' - uid: cnli_8kjttvjtxxbdd taxable_amount: '6.87559535' tax_amount: '0.46410269' applications: - uid: cdt_8m9vbdbdwd28n transaction_time: '2018-12-31T21:19:28Z' invoice_uid: inv_8k5jvdzct4hb2 memo: Refund for overpayment applied_amount: '200.5' refunds: - transaction_id: 329 payment_id: 39 memo: Refund for overpayment original_amount: '524.9' applied_amount: '200.5' security: - <>: [] x-stoplight: id: GET_creditnotes-uidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/payments.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-payments-json summary: Create Bulk Payment tags: - Relationship Invoicing description: |-

Create Bulk Payment

Only available for accounts on Relationship Invoicing. Record an external payment made against a subscription that will pay partially or in full one or more invoices. Payment will be applied starting with the oldest open invoice and then next oldest, and so on until the amount of the payment is fully consumed. Excess payment will result in the creation of a prepayment on the Invoice Account. Only ungrouped or primary subscriptions may be paid using the "bulk" payment request. parameters: - name: body in: body schema: type: object properties: payment: type: object required: - amount - memo - payment_details - payment_method properties: amount: type: string memo: type: string payment_details: type: string payment_method: type: string required: - payment example: payment: amount: '10.0' memo: to pay the bills payment_details: check number 8675309 payment_method: check responses: '200': description: '' schema: $ref: '#/definitions/create-bulk-payment-response' examples: application/json: paid_invoices: - invoice_uid: xyz_012345678 status: paid due_amount: '0.0' paid_amount: '50.0' - invoice_uid: xyz_012345678 status: paid due_amount: '0.0' paid_amount: '50.0' prepayment: subscription_id: '123456' amount_in_cents: '5000' ending_balance_in_cents: '5000' '422': description: '' schema: type: object properties: errors: type: - string - array description: |- Unproccessable Entity Possible Errors: "Payment amount, details, method, and memo must be present" "Payment amount, details, method, and memo must valid" "Payment amount must be greater than zero" "If in a group, the Subscription must be the primary" items: {} security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-paymentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{uid}/reopen.json': parameters: - name: uid in: path description: The UID for the invoice you wish to reopen. required: true type: string post: operationId: POST_invoices-uid-reopen-json summary: Reopen Invoice tags: - Relationship Invoicing description: |- ### Overview This endpoint allows you to reopen any invoice with the "canceled" status. Invoices enter "canceled" status if they were open at the time the subscription was canceled (whether through dunning or an intentional cancellation). Invoices with "canceled" status are no longer considered to be due. Once reopened, they are considered due for payment. Payment may then be captured in one of the following ways: - Reactivating the subscription, which will capture all open invoices (See note below about automatic reopening of invoices.) - Recording a payment directly against the invoice A note about reactivations: any canceled invoices from the most recent active period are automatically opened as a part of the reactivation process. Reactivating via this endpoint prior to reactivation is only necessary when you wish to capture older invoices from previous periods during the reactivation. ### Restrictions Only invoices that have "canceled" status may be reopened. If the invoice identified by `{uid}` is not canceled, the response will have HTTP status code `422` and an error message. responses: '200': description: '' schema: $ref: '#/definitions/invoice-new' '404': description: '' schema: type: 'null' '422': description: '' schema: type: object properties: errors: type: array description: |- An array of errors from the last request. There is one error case: the invoice is not eligible for reopening, which has the error message: > "The invoice must be in canceled status to be reopened." items: type: string security: - <>: [] x-stoplight: id: POST_invoices-uid-reopenjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{uid}/void.json': parameters: - name: uid in: path description: The UID for the invoice you wish to void required: true type: string post: operationId: POST_invoices-uid-void-json summary: Void Invoice tags: - Relationship Invoicing description: |- ### Overview This endpoint allows you to void any invoice with the "open" or "canceled" status. It will also allow voiding of an invoice with the "pending" status if it is not a consolidated invoice. ### Restrictions Only invoices that have the appropriate status may be reopened. If the invoice identified by `{uid}` does not have the appropriate status, the response will have HTTP status code `422` and an error message. A reason for the void operation is required to be included in the request body. If one is not provided, the response will have HTTP status code `422` and an error message. parameters: - name: body in: body schema: type: object properties: void: type: object properties: reason: type: string example: void: reason: Duplicate invoice responses: '201': description: '' schema: $ref: '#/definitions/invoice-new' '404': description: '' schema: type: 'null' '422': description: '' schema: type: object properties: errors: type: array description: An array of errors from the last request. items: type: string examples: application/json: errors: - 'Invoice status must be ''open'', ''canceled'', or ''pending'' and non-consolidated to be voided.' security: - <>: [] x-stoplight: id: POST_invoices-uid-voidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/account_balances.json': parameters: - name: subscription_id in: path required: true type: string get: operationId: GET_subscriptions-subscription_id-account_balances-json summary: Read Account Balances tags: - Subscription - Invoice - Relationship Invoicing description: 'Returns the `balance_in_cents` of the Subscription''s Pending Discount, Service Credit, and Prepayment accounts, as well as the sum of the Subscription''s open, payable invoices.' parameters: - name: subscription_id in: query description: The ID of the subscription whose account balances you are fetching. required: true type: integer responses: '200': description: '' schema: type: object properties: open_invoices: type: object properties: balance_in_cents: type: integer description: 'The balance, in cents, of the sum of the subscription''s open, payable invoices.' default: 0 pending_discounts: type: object properties: balance_in_cents: type: integer description: 'The balance, in cents, of the subscription''s Pending Discount account.' default: 0 service_credits: type: object properties: balance_in_cents: type: integer description: 'The balance, in cents, of the subscription''s Service Credit account.' default: 0 prepayments: type: object properties: balance_in_cents: type: integer description: 'The balance, in cents, of the subscription''s Prepayment account.' default: 0 security: - <>: [] x-stoplight: id: GET_subscriptions-subscriptionid-accountbalancesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{invoice_uid}/segments.json': parameters: - name: invoice_uid in: path required: true type: string get: operationId: GET_invoices-invoice_uid-segments-json summary: Read All Segment invoices for a consolidated invoice tags: - Relationship Invoicing description: 'Invoice segments returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`.' consumes: - application/xml produces: - application/xml parameters: - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.' type: number default: 1 - name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. type: number default: 20 maximum: 200 - name: direction in: query description: Sort direction of the returned segments. type: string default: asc enum: - asc - desc responses: '200': description: '' schema: type: array items: $ref: '#/definitions/read-all-invoices' examples: application/json: invoices: - uid: inv_8htcd29wcq3q6 site_id: 51288 customer_id: 20153415 subscription_id: 23277588 number: '125' sequence_number: 125 issue_date: '2018-09-20' due_date: '2018-09-20' paid_date: '2018-09-20' status: paid collection_method: automatic payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: parent parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: 23277588 product_name: Trial and setup fee product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 20153415 first_name: Meg last_name: Example organization: '' email: meg@example.com memo: Please pay within 15 days. billing_address: street: 123 I Love Cats Way line2: '' city: Boston state: MA zip: '90210' country: US shipping_address: street: 123 I Love Cats Way line2: '' city: Boston state: MA zip: '90210' country: US subtotal_amount: '100.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '100.0' credit_amount: '0.0' paid_amount: '100.0' refund_amount: '0.0' due_amount: '0.0' - uid: inv_8hr3546xp4h8n site_id: 51288 customer_id: 21687686 subscription_id: 22007644 number: '124' sequence_number: 124 issue_date: '2018-09-18' due_date: '2018-09-18' paid_date: null status: open collection_method: remittance payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Trial and setup fee product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 21687686 first_name: Charlene last_name: Tester organization: '' email: food@example.com memo: Please pay within 15 days. billing_address: street: '' line2: '' city: '' state: '' zip: '' country: '' shipping_address: street: '' line2: '' city: '' state: '' zip: '' country: '' subtotal_amount: '100.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '100.0' credit_amount: '0.0' paid_amount: '0.0' refund_amount: '0.0' due_amount: '100.0' - uid: inv_8hr3546wdwxkr site_id: 51288 customer_id: 21687670 subscription_id: 22007627 number: '123' sequence_number: 123 issue_date: '2018-09-18' due_date: '2018-09-18' paid_date: '2018-09-18' status: paid collection_method: automatic payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Trial End - Free product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 21687670 first_name: Hello last_name: World organization: '123' email: example@example.com memo: Please pay within 15 days. billing_address: street: 123 Anywhere Street line2: '' city: Boston state: MA zip: '02120' country: US shipping_address: street: '' line2: '' city: Boston state: AL zip: '02120' country: US subtotal_amount: '0.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '0.0' credit_amount: '0.0' paid_amount: '0.0' refund_amount: '0.0' due_amount: '0.0' - uid: inv_8hjtk8bz56bbp site_id: 51288 customer_id: 20137757 subscription_id: 20541100 number: '122' sequence_number: 122 issue_date: '2018-09-10' due_date: '2018-09-10' paid_date: '2018-09-10' status: paid collection_method: automatic payment_instructions: 'Make checks payable to Acme, Inc.' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: $0 Product product_family_name: Billing Plans seller: name: General Goods address: street: 123 General Goods Way line2: Apt. 10 city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 customer: chargify_id: 20137757 first_name: Sasha last_name: Example organization: '' email: example@example.com memo: Please pay within 15 days. billing_address: street: 123 I Love Cats Way line2: '' city: Catville state: MA zip: '90210' country: US shipping_address: street: 123 I Love Cats Way line2: '' city: Catville state: AL zip: '90210' country: US subtotal_amount: '0.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '0.0' credit_amount: '0.0' paid_amount: '0.0' refund_amount: '0.0' due_amount: '0.0' public_url: 'https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y' security: - <>: [] x-stoplight: id: GET_invoices-invoiceuid-segmentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{uid}/deliveries.json': parameters: - name: uid in: path required: true type: string post: operationId: POST_invoices-uid-deliveries-json summary: Send Invoice tags: - Relationship Invoicing description: |- ## Send Invoice This endpoint allows for invoices to be programmatically delivered via email. This endpoint supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients. Please note that if no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address. On success, a 204 no-content response will be returned. Please note that this does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned. consumes: - application/xml parameters: - name: body in: body schema: type: object properties: recipient_emails: type: array maxItems: 5 items: type: string cc_recipient_emails: type: array maxItems: 5 items: type: string bcc_receipient_emails: type: array maxItems: 5 items: type: string example: recipient_emails: - user0@example.com cc_recipient_emails: - user1@example.com bcc_receipient_emails: - user2@example.com responses: '204': description: '' '422': description: '' examples: application/json: errors: - 'cc_recipient_emails: must be a valid email address' security: - <>: [] x-stoplight: id: POST_invoices-uid-deliveriesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{uid}/customer_information/preview.json': parameters: - name: uid in: path required: true type: string post: operationId: POST_invoices-uid-customer_information-preview-json summary: Preview Customer Information Changes tags: - Relationship Invoicing description: |- ## Preview Customer Information Changes Customer information may change after an invoice is issued which may lead to a mismatch between customer information that are present on an open invoice and actual customer information. This endpoint allows to preview these differences, if any. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. responses: '200': description: '' schema: type: object properties: changes: type: object properties: payer: type: object properties: before: type: object after: type: object shipping_address: type: object properties: before: type: object after: type: object billing_address: type: object properties: before: type: object after: type: object custom_fields: type: object properties: before: type: array items: type: object properties: owner_id: type: integer owner_type: type: string name: type: string value: type: string metadatum_id: type: integer after: type: array items: type: object properties: owner_id: type: integer owner_type: type: string name: type: string value: type: string metadatum_id: type: integer examples: application/json: changes: payer: before: last_name: Beatty after: last_name: Doe shipping_address: before: line2: Suite 703 after: line2: Suite 702 billing_address: before: line2: Suite 703 after: line2: Suite 702 custom_fields: before: - owner_id: 1002 owner_type: Customer name: Color value: blue metadatum_id: 20 after: - owner_id: 1002 owner_type: Customer name: Color value: green metadatum_id: 20 '404': description: '' schema: type: object examples: application/json: errors: - Invoice not found '422': description: '' schema: type: object examples: application/json: errors: - Invoice must have an open status security: - <>: [] x-stoplight: id: POST_invoices-uid-customerinformation-previewjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/invoices/{uid}/customer_information.json': parameters: - name: uid in: path required: true type: string put: operationId: PUT_invoices-uid-customer_information-json summary: Update Customer Information tags: - Relationship Invoicing description: |- ## Update Customer Information This endpoint updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint before. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. responses: '200': description: '' schema: $ref: '#/definitions/invoice-new' examples: application/json: uid: elit Ut site_id: 46283786 customer_id: -62349460 subscription_id: 12801726 number: dolore et ut sequence_number: -84210096 issue_date: in e due_date: magna elit tempor occaecat amet paid_date: consectetur elit culpa magna sint status: veniam in collection_method: Excepteur payment_instructions: enim officia currency: dolore consolidation_level: exercitation officia labore product_name: occaecat veniam culpa product_family_name: qui commodo ea dolore cillum seller: name: co phone: ullamco in officia '': nostrud customer: chargify_id: -55826334 first_name: deserunt last_name: velit dolore email: aliquip sed velit Lorem memo: ea cupidatat deserunt billing_address: street: qui commodo cupidatat sunt line2: ut officia enim city: velit minim dolore sint nulla state: velit zip: ullamco country: irure est laborum deserun shipping_address: street: do fugiat dolore deserunt officia line2: ipsum cillum city: aliqua laboris incididunt ut state: et fugiat sit zip: dolore do country: Excepteur consequat cillum subtotal_amount: dolore mollit discount_amount: aute tax_amount: eu aliqua est velit ea total_amount: ut non credit_amount: sit refund_amount: et eiusmod qui sed paid_amount: amet nulla s due_amount: non esse ullamco line_items: - description: qui price_point_id: -95020509 tax_amount: occaecat deserunt veniam subtotal_amount: commodo consequat tempor et Duis - uid: '' subtotal_amount: ven - price_point_id: 94750853 product_id: 79058036 tax_amount: Duis subtotal_amount: irure officia ipsum - unit_price: eiusmod consequat ut nostrud tax_amount: quis nulla proident - period_range_end: ut dolor product_id: 57352537 description: minim in dolore Ut Excepteur uid: sit qui in ullamco anim discounts: - title: nostrud taxes: - source_type: enim line_item_breakouts: - uid: in ipsum tax_amount: velit taxable_amount: quis sint - uid: co - uid: enim irure in title: incididunt est mollit irure credits: - uid: exercitation eiusmod transaction_time: Lorem ea credit_note_number: qui fugiat labore laborum credit_note_uid: ipsum sunt - memo: dolor refunds: - memo: deserunt elit - original_amount: Duis nulla payments: - prepayment: false memo: enim Excepteur Lorem magna sit - transaction_time: deserunt prepayment: false payment_method: details: labore ut et kind: dolor qui memo: ea commodo type: fugiat veniam card_brand: consequat card_expiration: aliqua a last_four: ut in consectetur sed masked_card_number: minim ea ullamco nostrud tempor - prepayment: true transaction_id: 67527234 - original_amount: c memo: dolore fugiat labore custom_fields: - name: non nul value: consectetur aliqua owner_type: ad owner_id: 18482224 - value: anim owner_type: in - owner_id: -13438519 - name: ullamco non deserunt in public_url: dolo previous_balance_data: capture_date: aliqua velit quis voluptate invoices: - number: veniam dolore labore ipsum cupidatat uid: tempor outstanding_amount: Excepteur nostrud irur - outstanding_amount: id '404': description: '' schema: type: object examples: application/json: errors: - Invoice not found '422': description: '' schema: type: object examples: application/json: errors: - Invoice must have an open status security: - <>: [] x-stoplight: id: PUT_invoices-uid-customerinformationjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /mrr.json: get: operationId: GET_mrr-json summary: MRR tags: - MRR description: 'This endpoint returns your site''s current MRR, including plan and usage breakouts. If you wish to request historic MRR at a specific point in time, you can supply a timestamp in ISO8601 format via an `at_time` query param. Additionally, results can be scoped to a single subscription by providing a `subscription_id` query param.' consumes: - application/xml produces: - application/xml parameters: - name: subscription_id in: query description: A Subscription's ID. Providing this param will cause MRR to be scoped to the specified Subscription. type: number - name: at_time in: query description: An ISO8601 timestamp. Provide this param to request MRR at a historic point in time. type: string responses: '200': description: '' schema: type: object properties: mrr: type: object properties: amount_in_cents: type: integer amount_formatted: type: string currency: type: string currency_symbol: type: string breakouts: type: object properties: plan_amount_in_cents: type: integer plan_amount_formatted: type: string usage_amount_in_cents: type: integer usage_amount_formatted: type: string at_time: type: string description: ISO8601 timestamp examples: application/json: mrr: amount_in_cents: 9915593 amount_formatted: '$99,155.93' currency: USD currency_symbol: $ at_time: '2021-02-03T14:23:17-05:00' breakouts: plan_amount_in_cents: 9913593 plan_amount_formatted: '$99,135.93' usage_amount_in_cents: 2000 usage_amount_formatted: $20.00 security: - <>: [] x-stoplight: id: GET_mrrjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /mrr_movements.json: get: operationId: GET_mrr_movements-json summary: MRR Movements tags: - MRR description: This endpoint returns your site's MRR movements. Results can be scoped to a single subscription by providing a `subscription_id` query param. consumes: - application/xml produces: - application/xml parameters: - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.' type: number default: 1 - name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 10. type: number default: 10 maximum: 50 - name: direction in: query description: The sort direction of the returned records. type: string default: ASC enum: - ASC - DESC - name: subscription_id in: query description: A Subscription's ID. Providing this param will cause MRR to be scoped to the specified Subscription. type: number responses: '200': description: '' schema: type: object properties: mrr: type: object properties: page: type: integer per_page: type: integer total_pages: type: integer total_entries: type: integer currency: type: string currency_symbol: type: string movements: type: array items: type: object properties: timestamp: type: string amount_in_cents: type: integer amount_formatted: type: string description: type: string category: type: string breakouts: type: object properties: plan_amount_in_cents: type: integer plan_amount_formatted: type: string usage_amount_in_cents: type: integer usage_amount_formatted: type: string line_items: type: array items: type: object properties: product_id: type: integer component_id: type: integer description: 'For Product (or "baseline") line items, this field will have a value of `0`.' name: type: string mrr: type: integer mrr_movements: type: array items: type: object properties: amount: type: integer category: type: string quantity: type: integer prev_quantity: type: integer recurring: type: boolean description: 'When `true`, the line item''s MRR value will contribute to the `plan` breakout. When `false`, the line item contributes to the `usage` breakout.' subscription_id: type: integer subscriber_name: type: string examples: application/json: mrr: page: 1 per_page: 10 total_pages: 73 total_entries: 730 currency: USD currency_symbol: $ movements: - timestamp: '2010-01-01T14:00:00-04:00' amount_in_cents: 9900 amount_formatted: $99.00 description: Acme signed up for Pro ($99.00/mo). category: new_business breakouts: plan_amount_in_cents: 9900 plan_amount_formatted: $99.00 usage_amount_in_cents: 0 usage_amount_formatted: $0.00 line_items: - product_id: 20 component_id: 0 name: Pro mrr: 9900 mrr_movements: - amount: 9900 category: new_business quantity: 1 prev_quantity: 0 recurring: true subscription_id: 1 subscriber_name: Acme security: - <>: [] x-stoplight: id: GET_mrrmovementsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/notes.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: number post: operationId: POST_subscriptions-subscription_id-notes-format summary: Create a Note tags: - Note - incomplete - Notes description: |- ## Create a Note Use the following method to create a note for a subscription. parameters: - name: body in: body schema: $ref: '#/definitions/notes-create-note-input' example: note: body: New test note. sticky: true responses: '200': description: OK schema: $ref: '#/definitions/notes-create-note-output' examples: application/json: note: id: 105025 body: New test note. subscription_id: 15054201 created_at: '2016-11-03T14:47:08-04:00' updated_at: '2016-11-03T14:47:08-04:00' sticky: true security: - <>: [] x-stoplight: id: POST_subscriptions-subscription_id-notes-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 get: operationId: GET_subscriptions-subscription_id-notes-format summary: Read Notes for a Subscription tags: - Note - incomplete - Notes description: |- ## Read Notes for a Subscription Use this method to retrieve a list of Notes associated with a Subscription. The response will be an array of Notes. parameters: - name: body in: body schema: $ref: '#/definitions/notes-list-notes-output' example: - note: body: Test note. created_at: '2015-06-15T13:26:47-04:00' id: 5 sticky: false subscription_id: 100046 updated_at: '2015-06-15T13:28:12-04:00' - note: body: Another test note. created_at: '2015-06-15T12:04:46-04:00' id: 4 sticky: false subscription_id: 100046 updated_at: '2015-06-15T13:26:33-04:00' - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: OK schema: type: array items: $ref: '#/definitions/notes-create-note-output' security: - <>: [] x-stoplight: id: GET_subscriptions-subscription_id-notes-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/notes/{note_id}.json': parameters: - name: subscription_id in: path required: true type: string - name: note_id in: path required: true type: string get: operationId: GET_subscriptions-subscription_id-notes-note_id-json summary: Read Specific Note tags: - incomplete - Notes description: |- ## Read/Show Specific Note Once you have obtained the ID of the note you wish to read, use this method to show a particular note attached to a subscription. responses: '200': description: '' schema: $ref: '#/definitions/notes-create-note-output' examples: application/json: note: body: Test note. created_at: '2015-06-15T13:26:47-04:00' id: 5 sticky: false subscription_id: 100046 updated_at: '2015-06-15T13:28:12-04:00' security: - <>: [] x-stoplight: id: GET_subscriptions-subscriptionid-notes-noteidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_subscriptions-subscription_id-notes-note_id-format summary: Update a Note tags: - Note - incomplete - Notes description: |- ## Update a Note Use the following method to update a note for a Subscription. parameters: - name: body in: body schema: $ref: '#/definitions/notes-create-note-input' example: note: body: Modified test note. sticky: true responses: '200': description: OK schema: $ref: '#/definitions/notes-create-note-output' examples: application/json: note: id: 105025 body: Modified test note. subscription_id: 15054201 created_at: '2016-11-03T14:47:08-04:00' updated_at: '2016-11-03T14:49:09-04:00' sticky: true security: - <>: [] x-stoplight: id: PUT_subscriptions-subscription_id-notes-note_id-format beforeScript: null afterScript: null public: true mock: statusCode: 200 enabled: false delete: operationId: DELETE_subscriptions-subscription_id-notes-note_id-format summary: Delete a Note tags: - Note - incomplete - Notes description: |- ## Delete a Note Use the following method to delete a note for a Subscription. responses: '200': description: OK '422': description: '' schema: type: object security: - <>: [] x-stoplight: id: DELETE_subscriptions-subscription_id-notes-note_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /offers.json: get: operationId: GET_offers-json summary: List Offers tags: - Offers description: |- ## List Offers This endpoint will list offers for a site. responses: '200': description: '' schema: $ref: '#/definitions/list-offer-output' examples: application/json: offers: - id: 239 site_id: 48110 product_family_id: 1025627 product_family_name: Gold product_id: 110 product_name: Pro product_price_in_cents: 1000 product_revisable_number: 0 product_price_point_id: 138 product_price_point_name: Default name: Third Offer handle: third description: '' created_at: '2018-08-03T09:56:11-05:00' updated_at: '2018-08-03T09:56:11-05:00' archived_at: null offer_items: - component_id: 426665 component_name: Database Size (GB) component_unit_price: '1.0' price_point_id: 149438 price_point_name: Auto-created starting_quantity: '0.0' editable: false currency_prices: [] offer_discounts: - coupon_id: 234 coupon_code: GR8_CUSTOMER coupon_name: Multi-service Discount offer_signup_pages: - id: 356482 nickname: ggoods enabled: true return_url: '' return_params: '' url: 'https://general-goods.chargifypay.com/subscribe/hjpvhnw63tzy' security: - <>: [] x-stoplight: id: GET_offersjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 post: operationId: POST_offers-json summary: Create Offer tags: - Offers description: |- ## Create Offer Create an offer within your Chargify site by sending a POST request. ### Using a Product Price Point You can optionally pass in a `product_price_point_id` that corresponds with the `product_id` and the offer will use that price point. If a `product_price_point_id` is not passed in, the product's default price point will be used. parameters: - name: body in: body schema: $ref: '#/definitions/create-offer-input' example: offer: name: Solo handle: han_shot_first description: A Star Wars Story product_id: 31 components: - component_id: 24 starting_quantity: 1 coupons: - DEF456 responses: '201': description: '' schema: $ref: '#/definitions/create-offer-output' examples: application/json: offer: id: 3 site_id: 2 product_family_id: 4 product_family_name: Chargify product_id: 31 product_name: 30-Day Square Trial product_price_in_cents: 2000 product_revisable_number: 0 name: Solo handle: han_shot_first description: A Star Wars Story created_at: '2018-06-08T14:51:52-04:00' updated_at: '2018-06-08T14:51:52-04:00' archived_at: null product_price_point_name: Default offer_items: - component_id: 24 component_name: Invoices component_unit_price: '3.0' price_point_id: 104 price_point_name: Original starting_quantity: '1.0' editable: false offer_discounts: - coupon_id: 3 coupon_code: DEF456 coupon_name: IB Loyalty '422': description: '' schema: type: object properties: errors: type: object properties: components: type: array items: type: string examples: application/json: errors: components: - 'starting_quantity for an On/Off component can only be ''1'' or ''0'': 24' security: - <>: [] x-stoplight: id: POST_offersjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/offers/{offer_id}.json': parameters: - name: offer_id in: path required: true type: integer get: operationId: GET_offers-offer_id-json summary: Show Offer tags: - Offers description: |- ## Show Offer This method allows you to list a specific offer's attributes. This is different than list all offers for a site, as it requires an `offer_id`. responses: '200': description: '' schema: $ref: '#/definitions/show-offer-output' '401': description: '' schema: type: object security: - <>: [] x-stoplight: id: GET_offers-offeridjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/offers/{offer_id}/archive.json': parameters: - name: offer_id in: path required: true type: integer put: operationId: PUT_offers-offer_id-archive-json summary: Archive Offer tags: - Offers description: |- ## Archive Offer Archive an existing offer. Please provide an `offer_id` in order to archive the correct item. responses: '200': description: '' schema: type: object '401': description: '' security: - <>: [] x-stoplight: id: PUT_offers-offerid-archivejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/offers/{offer_id}/unarchive.json': parameters: - name: offer_id in: path required: true type: integer put: operationId: PUT_offers-offer_id-unarchive-json summary: Unarchive Offer tags: - Offers description: |- ## Unarchive Offer Unarchive a previously archived offer. Please provide an `offer_id` in order to un-archive the correct item. responses: '200': description: '' schema: type: object '401': description: '' security: - <>: [] x-stoplight: id: PUT_offers-offerid-unarchivejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /payment_profiles.json: post: operationId: POST_payment_profiles-json summary: Create Stripe SEPA Direct Debit Payment Profile tags: - Payment Profiles description: |- ## Using Stripe SEPA Direct Debit with Chargify For more information on Stripe SEPA Direct Debit, please view the following resources: + [Full documentation on Stripe SEPA Direct Debit](https://help.chargify.com/payment-gateways/stripe-direct-debit.html) + [Using Chargify.js with Stripe Direct Debit - minimal example](https://developer.chargify.com/content/chargify-js/example.html#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway) + [Using Chargify.js with Stripe Direct Debit - full example](https://developer.chargify.com/content/chargify-js/example.html#full-example-with-sepa-direct-debit-stripe-gateway) ## Stripe SEPA Direct Debit Payment Profiles The following table depicts what are the elements that are used when creating Stripe Direct Debit Payment Profiles. Please note these key/value pairs do closely resemble ACH elements. However, we've created this endpoint to focus on how to formulate a request for creating a Stripe Direct Debit payment profile. | bank_name | (Optional when creating a subscription with Stripe Direct Debit). The name of the bank where the customerʼs account resides | |---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | bank_iban | (Required when creating a subscription with Stripe Direct Debit). International Bank Account Number. | The following example creates a customer, bank account and mandate in Stripe: ``` { "payment_profile": { "customer_id": "24907598", "bank_name": "Deutsche bank", "bank_iban": "DE89370400440532013000", "payment_type": "bank_account", "billing_address": "Test", "billing_city": "Berlin", "billing_state": "Brandenburg", "billing_zip": "12345", "billing_country": "DE" } } ``` parameters: - name: body in: body schema: type: object properties: payment_profile: type: object properties: customer_id: type: string bank_name: type: string bank_iban: type: string payment_type: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string example: payment_profile: customer_id: '24907598' bank_name: Deutsche bank bank_iban: DE89370400440532013000 payment_type: bank_account billing_address: Test billing_city: Berlin billing_state: Brandenburg billing_zip: '12345' billing_country: DE responses: '201': description: '' schema: type: object properties: payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: - string - 'null' billing_address_2: type: 'null' bank_name: type: string masked_bank_routing_number: type: 'null' masked_bank_account_number: type: string bank_account_type: type: string bank_account_holder_type: type: string payment_type: type: string verified: type: boolean examples: application/json: payment_profile: id: 18152130 first_name: Chester last_name: Tester customer_id: 24907598 current_vault: stripe_connect vault_token: cus_J0iV6HHEeYiAX4 billing_address: Test billing_city: Berlin billing_state: Brandenburg billing_zip: '12345' billing_country: DE customer_vault_token: null billing_address_2: null bank_name: Deutsche bank masked_bank_routing_number: null masked_bank_account_number: XXXX3000 bank_account_type: checking bank_account_holder_type: personal payment_type: bank_account verified: true '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Validation failed: currency is not supported in CA, iban does not match country code' security: - <>: [] x-stoplight: id: POST_paymentprofilesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_payment_profiles-format summary: List Payment Profiles for a Site tags: - Payment Profile - incomplete - Payment Profiles description: |- ## List Payment Profiles for a Site This method will return all of the active `payment_profiles` for a Site, or for one Customer within a site. If no payment profiles are found, this endpoint will return an empty array, not a 404. parameters: - name: customer_id in: query description: The ID of the customer for which you wish to list payment profiles type: integer - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: OK schema: $ref: '#/definitions/payment-profiles-list-payment-profiles-for-a-site-outuput' examples: application/json: - payment_profile: id: 10089892 first_name: Chester last_name: Tester customer_id: 14543792 current_vault: bogus vault_token: '0011223344' billing_address: 456 Juniper Court billing_city: Boulder billing_state: CO billing_zip: '80302' billing_country: US customer_vault_token: null billing_address_2: '' bank_name: Bank of Kansas City masked_bank_routing_number: XXXX6789 masked_bank_account_number: XXXX3344 bank_account_type: checking bank_account_holder_type: personal payment_type: bank_account - payment_profile: id: 10188522 first_name: Frankie last_name: Tester customer_id: 14543712 current_vault: bogus vault_token: '123456789' billing_address: 123 Montana Way billing_city: Los Angeles billing_state: CA billing_zip: '90210' billing_country: US customer_vault_token: null billing_address_2: '' bank_name: Bank of Kansas City masked_bank_routing_number: XXXX6789 masked_bank_account_number: XXXX6789 bank_account_type: checking bank_account_holder_type: personal payment_type: bank_account security: - <>: [] x-stoplight: id: GET_payment_profiles-format beforeScript: null afterScript: null public: true mock: statusCode: 200 enabled: false '/payment_profiles/{payment_profile_id}.json': parameters: - name: payment_profile_id in: path required: true type: string get: operationId: GET_payment_profiles-payment_profile_id-json summary: Read Payment Profile - Bank Account tags: - Payment Profiles description: |- ## Read a Payment Profile - Bank Account Using the GET method you can retrieve a Payment Profile identified by its unique ID. Please note that a different JSON object will be returned if the card method on file is a credit card. responses: '200': description: '' schema: $ref: '#/definitions/payment-profile-read-payment-output-bank-account' examples: application/json: payment_profile: id: 10089892 first_name: Chester last_name: Tester customer_id: 14543792 current_vault: bogus vault_token: '0011223344' billing_address: 456 Juniper Court billing_city: Boulder billing_state: CO billing_zip: '80302' billing_country: US customer_vault_token: null billing_address_2: '' bank_name: Bank of Kansas City masked_bank_routing_number: XXXX6789 masked_bank_account_number: XXXX3344 bank_account_type: checking bank_account_holder_type: personal payment_type: bank_account security: - <>: [] x-stoplight: id: GET_paymentprofiles-paymentprofileidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_payment_profiles-payment_profile_id-format summary: Update the Payment Profile tags: - Payment Profile - incomplete - Payment Profiles description: |- ## Update the Payment Profile Augment an existing `payment_profile_id` by using this endpoint and method. ## Partial Card Updates In the event that you are using the Authorize.net, Stripe, Cybersource, Forte or Braintree Blue payment gateways, you can update just the billing and contact information for a payment method. Note the lack of credit-card related data contained in the JSON payload. In this case, the following JSON is acceptable: ``` { "payment_profile": { "first_name": "Kelly", "last_name": "Test", "billing_address": "789 Juniper Court", "billing_city": "Boulder", "billing_state": "CO", "billing_zip": "80302", "billing_country": "US", "billing_address_2": null } } ``` The result will be that you have updated the billing information for the card, yet retained the original card number data. ## Specific notes on updating payment profiles - Merchants with **Authorize.net**, **Cybersource**, **Forte**, **Braintree Blue** or **Stripe** as their payment gateway can update their Customer’s credit cards without passing in the full credit card number and CVV. - If you are using **Authorize.net**, **Cybersource**, **Forte**, **Braintree Blue** or **Stripe**, Chargify will ignore the credit card number and CVV when processing an update via the API, and attempt a partial update instead. If you wish to change the card number on a payment profile, you will need to create a new payment profile for the given customer. - A Payment Profile cannot be updated with the attributes of another type of Payment Profile. For example, if the payment profile you are attempting to update is a credit card, you cannot pass in bank account attributes (like `bank_account_number`), and vice versa. - Updating a payment profile directly will not trigger an attempt to capture a past-due balance. If this is the intent, update the card details via the Subscription instead. - If you are using Authorize.net or Stripe, you may elect to manually trigger a retry for a past due subscription after a partial update. parameters: - name: body in: body schema: $ref: '#/definitions/payments-update-payment-profile' example: payment_profile: first_name: Graham last_name: Test full_number: '4111111111111111' card_type: master expiration_month: '04' expiration_year: '2030' current_vault: bogus vault_token: '1' billing_address: 456 Juniper Court billing_city: Boulder billing_state: CO billing_zip: '80302' billing_country: US billing_address_2: null responses: '200': description: '' schema: type: object properties: payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string payment_type: type: string examples: application/json: payment_profile: id: -1174743 first_name: et last_name: Duis card_type: dolor dolor reprehenderi expiration_month: -78560474 expiration_year: -17552129 customer_id: -92719007 current_vault: anim aliqua incididunt nisi vault_token: velit id billing_address: quis laboris dolore dolor billing_city: Ut ut occaecat billing_state: occaecat quis billing_zip: voluptate tempor consectetur nostrud eu billing_country: nostrud qui voluptate Duis est payment_type: exercitation eiusmod tempor eu in security: - <>: [] x-stoplight: id: PUT_payment_profiles-payment_profile_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 delete: operationId: DELETE_payment_profiles-payment_profile_id-json summary: Delete Unused Payment Profile tags: - Payment Profiles description: |- Deletes an unused payment profile. Returns 204 and no content when successful. If the payment profile is in use by one or more subscriptions or groups, a 422 and error message will be returned. responses: '204': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - The payment profile is in use by one or more subscriptions and cannot be deleted x-stoplight: id: DELETE_paymentprofiles-paymentprofileidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/payment_profiles/{payment_profile_id}.json': parameters: - name: subscription_id in: path required: true type: string - name: payment_profile_id in: path required: true type: string delete: operationId: DELETE_subscriptions-subscription_id-payment_profiles-payment_profile_id-format summary: Delete Payment Profile tags: - Subscription - incomplete - 'Subscriptions: Payment Methods / Retries / Balance Reset' description: |- ## Delete Payment Profile This will delete a payment profile belonging to the Customer on the Subscription. **Note**: If the Customer has multiple Subscriptions, the payment profile will be removed from all of them. **Note**: Please note that if you delete the _default_ payment profile for a subscription, you will need to "specify another payment profile to be the default":#change-default-payment-profile through the api, or either prompt the user to enter a card in the billing portal or on the self-service page, or visit the Payment Details tab on the subscription in the Admin UI and use the "Add New Credit Card" or "Make Active Payment Method" link, (depending on whether there are other cards present). Response will be 204 / No content. responses: '204': description: No Content security: - <>: [] x-stoplight: id: DELETE_subscriptions-subscription_id-payment_profiles-payment_profile_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/bank_accounts/{bank_account_id}/verification.json': parameters: - name: bank_account_id in: path required: true type: number put: operationId: PUT_bank_accounts-verification summary: Verify the Bank Account tags: - Payment Profiles description: |- # Verify the Bank Account Submit the two small deposit amounts the customer received in their bank account in order to verify the bank account. (Stripe only) parameters: - name: body in: body schema: type: object properties: bank_account_verification: type: object properties: deposit_1_in_cents: type: integer deposit_2_in_cents: type: integer example: bank_account_verification: deposit_1_in_cents: 32 deposit_2_in_cents: 45 responses: '200': description: '' schema: $ref: '#/definitions/payment-profile-read-payment-output-bank-account' examples: application/json: payment_profile: id: 10089892 first_name: Chester last_name: Tester customer_id: 14543792 current_vault: stripe_connect vault_token: cus_0123abc456def billing_address: 456 Juniper Court billing_city: Boulder billing_state: CO billing_zip: '80302' billing_country: US customer_vault_token: null billing_address_2: '' bank_name: Bank of Kansas City masked_bank_routing_number: XXXX6789 masked_bank_account_number: XXXX3344 bank_account_type: checking bank_account_holder_type: personal payment_type: bank_account '404': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'You have tried to verify this bank account 10 times. To continue trying to verify the account, please reach out to us directly.' security: - <>: [] x-stoplight: id: PUT_bank_accounts-verification beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/product_families/{product_family_id}/products.json': parameters: - name: product_family_id in: path required: true type: string post: operationId: POST_product_families-product_family_id-products-json summary: Create a Product tags: - Products description: |- ## Create a Product Use this method to create a product within your Chargify Site. ## Input Attributes (Create) | price_in_cents | The product price, in integer cents | |--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | name | The product name | | handle | The product API handle | | description | The product description | | product_family_id | Nested attributes pertaining to the product family to which this product belongs | | accounting_code | The product family accounting code (has no bearing in Chargify, may be used within your app) | | interval_unit | A string representing the interval unit for this product, either `month` or `day` | | interval | The numerical interval. i.e. an interval of `30` coupled with an interval_unit of `day` would mean this product would renew every 30 days | | initial_charge_in_cents | The up front charge you have specified. | | trial_price_in_cents | The price of the trial period for a subscription to this product, in integer cents. | | trial_interval | A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | | trial_interval_unit | A string representing the trial interval unit for this product, either `month` or `day` | | expiration_interval | A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | | expiration_interval_unit | A string representing the trial interval unit for this product, either month or day | | require_credit_card | Boolean that controls whether a payment profile is required to be entered for customers wishing to sign up on this product. | | require_billing_address | Boolean that determines whether a billing address is required in order to sign up. | | request_billing_address | Boolean that determines whether billing address fields will appear on a subscriber's Self-Service Page when they update their card. To request a billing address at signup, please refer to the attribute under the Public Signup Page. | | request_shipping_address | Deprecated boolean that is only relevant for those with legacy hosted pages. For Public Signup Page users, please manage this attribute from under the signup page. | | require_shipping_address | Boolean that determines whether a shipping address is required in order to sign up. | | taxable | Boolean | | trial_type | The type of trial for this product, either `no_obligation` or `payment_expected`. | | auto_create_signup_page | A `true` or `false` value (default true) indicating whether or not you want a Public Page" to be automatically created for this product | | update_return_url | The url to which a customer will be returned after a successful account update | | return_url | If `auto_create_signup_page` is `true`, this will set the url to which a customer will be returned after a successful signup for the auto-created signup page. | | return_params | The parameters to be appended to both update_return_url and, (if `auto_create_signup_page` is `true`,) `return_url` for the auto-created signup page. See [Return URLs and Parameters](https://help.chargify.com/products/product-editing.html#return-url-after-successful-account-update). | | tax_code | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | parameters: - name: body in: body schema: $ref: '#/definitions/products-create-a-product-input' example: product: name: Gold Plan handle: gold description: This is our gold plan. accounting_code: '123' request_credit_card: true price_in_cents: 1000 interval: 1 interval_unit: month auto_create_signup_page: true tax_code: D0000000 responses: '201': description: '' schema: $ref: '#/definitions/products-create-a-product-output' examples: application/json: product: id: 4364984 name: Gold Plan handle: gold description: This is our gold plan. accounting_code: '123' request_credit_card: true expiration_interval: null expiration_interval_unit: null created_at: '2016-11-04T16:31:15-04:00' updated_at: '2016-11-04T16:31:15-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: null archived_at: null require_credit_card: true return_params: null taxable: false update_return_url: null initial_charge_after_trial: false version_number: 1 update_return_params: null product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 301078 return_url: null return_params: null url: 'https://general-goods.chargify.com/subscribe/ftgbpq7f5qpr/gold' product_price_point_name: Default '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Trial Price: must be given if a trial interval (duration) is provided.' security: - <>: [] x-stoplight: id: POST_productfamilies-productfamilyid-productsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_products-format summary: Read Products for a Product Family tags: - Product - Note - incomplete - Products description: |- ## Read Products This method allows to retrieve a list of Products belonging to a Product Family. `product_family_id` is the required parameter. The response will contain a "products" array with "product" elements. ## 404 Response If the product family does not exist or fails to retrieve a list of products, a plain text message will be returned. ``` A valid product_family_id is required ``` parameters: - name: include_archived in: query type: boolean default: false - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' - $ref: '#/parameters/trait:productQueryString:date_field' - $ref: '#/parameters/trait:productQueryString:start_date' - $ref: '#/parameters/trait:productQueryString:end_date' - $ref: '#/parameters/trait:productQueryString:start_datetime' - $ref: '#/parameters/trait:productQueryString:end_datetime' responses: '200': description: OK schema: $ref: '#/definitions/products-list-products-output' examples: application/json: - product: id: 3801242 name: Free product handle: zero-dollar-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-04-21T16:08:39-04:00' updated_at: '2016-08-03T11:27:53-04:00' price_in_cents: 10000 interval: 1 interval_unit: month initial_charge_in_cents: 0 trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 4 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 283460 return_url: null return_params: '' url: 'https://general-goods.chargify.com/subscribe/smcc4j3d2w6h/zero-dollar-product' product_price_point_name: Default - product: id: 3858146 name: Calendar Billing Product handle: calendar-billing-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-07-05T13:07:38-04:00' updated_at: '2016-07-05T13:07:38-04:00' price_in_cents: 10000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 289193 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/gxdbfxzxhcjq/calendar-billing-product' product_price_point_name: Default security: - <>: [] x-stoplight: id: GET_products-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/products/{product_id}.json': parameters: - name: product_id in: path required: true type: string get: operationId: GET_products-product_id-json summary: Read Product tags: - Products description: |- ## Read a Product This endpoint allows you to read the current details of a product that you've created in Chargify. responses: '200': description: '' schema: $ref: '#/definitions/read-a-product-output' examples: application/json: product: id: 4535635 name: Paid Annual Seats handle: paid-annual-seats description: Paid annual seats for our commercial enterprise product accounting_code: paid-annual-seats request_credit_card: true expiration_interval: 1 expiration_interval_unit: day created_at: '2017-08-25T10:25:31-05:00' updated_at: '2018-01-16T12:58:04-06:00' price_in_cents: 10000 interval: 12 interval_unit: month initial_charge_in_cents: 4900 trial_price_in_cents: 1000 trial_interval: 14 trial_interval_unit: day archived_at: null require_credit_card: true return_params: 'id={subscription_id}&ref={customer_reference}' taxable: true update_return_url: 'http://www.example.com' tax_code: D0000000 initial_charge_after_trial: false version_number: 4 update_return_params: 'id={subscription_id}&ref={customer_reference}' product_family: id: 1025627 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: [] product_price_point_name: Default security: - <>: [] x-stoplight: id: GET_products-productidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_products-product_id-json summary: Update a Product tags: - Products description: |- ## Update a Product Use this method to change aspects of an existing product. ### Input Attributes Update Notes + `update_return_params` The parameters we will append to your `update_return_url`. See Return URLs and Parameters ### Product Price Point Updating a product using this endpoint will create a new price point and set it as the default price point for this product. If you want to update a price point directly you can do that using this endpoint: [Update a Product Price Point](https://reference.chargify.com/v1/products-price-points/update-a-product-price-point) parameters: - name: body in: body schema: $ref: '#/definitions/products-update-product-input' example: product: name: Platinum Plan handle: platinum description: This is our platinum plan. accounting_code: '123' request_credit_card: true price_in_cents: 1000 interval: 1 interval_unit: month auto_create_signup_page: true tax_code: D0000000 responses: '200': description: '' schema: $ref: '#/definitions/products/update-a-product-output' examples: application/json: product: id: 4365034 name: Platinum Plan handle: platinum description: This is our platinum plan. accounting_code: '123' request_credit_card: true expiration_interval: null expiration_interval_unit: null created_at: '2016-11-04T16:34:29-04:00' updated_at: '2016-11-04T16:37:11-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: null archived_at: null require_credit_card: true return_params: null taxable: false update_return_url: null initial_charge_after_trial: false version_number: 1 update_return_params: null product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 301079 return_url: null return_params: null url: 'https://general-goods.chargify.com/subscribe/wgyd96tb5pj9/platinum' product_price_point_name: Original '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Name: cannot be blank.' security: - <>: [] x-stoplight: id: PUT_products-productidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_products-product_id-json summary: Archive a Product tags: - Products description: |- ## Archive a Product Sending a DELETE request to this endpoint will archive the product. All current subscribers will be unffected; their subscription/purchase will continue to be charged monthyl. This will restrict the option to chose the product for purchase via the Billing Portal, as well as disable Public Signup Pages for the product. responses: '200': description: '' schema: $ref: '#/definitions/archive-a-product-output' examples: application/json: product: id: 4535638 name: Business Monthly handle: null description: Business Monthly accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-08-25T10:25:31-05:00' updated_at: '2018-01-16T13:02:44-06:00' price_in_cents: 4900 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: 0 trial_interval: 1 trial_interval_unit: day archived_at: '2018-01-16T13:02:44-06:00' require_credit_card: false return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 1025627 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: [] product_price_point_name: Default security: - <>: [] x-stoplight: id: DELETE_products-productidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/products/handle/{api_handle}.json': parameters: - name: api_handle in: path required: true type: string get: operationId: GET_products-handle-handle-format summary: Read the Product via API Handle tags: - Product - Note - incomplete - Products description: |- ## Read Product via API Handle This method allows to retrieve a Product object by its `api_handle`. responses: '200': description: OK schema: $ref: '#/definitions/products-read-the-product-via-chargify-id' examples: application/json: product: id: 3903594 name: No cost product handle: no-cost-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-09-02T17:11:29-04:00' updated_at: '2016-11-30T11:46:13-05:00' price_in_cents: 0 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: 5 trial_interval: 1 trial_interval_unit: month archived_at: null require_credit_card: false return_params: reference=5678 taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 1 update_return_params: reference=5678 product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 281174 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/xgdxtk4vhtbz/no-cost-product' - id: 282270 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/xxqmrgtsbd9k/no-cost-product' - id: 291587 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/pvhwss7zjjnh/no-cost-product' - id: 294832 return_url: 'http://www.example.com/' return_params: engine=md7a url: 'https://general-goods.chargify.com/subscribe/m6tbcq4mcgpw/no-cost-product' product_price_point_name: Default security: - <>: [] x-stoplight: id: GET_products-handle-handle-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/products/{id}.json': parameters: - name: id in: path description: Product ID. required: true type: number get: operationId: GET_products-id-format summary: Read the Product by Product ID tags: - Product - Note - incomplete - Products description: |- ## Read the Product by ID This method allows to retrieve a Product object by its the `product_id`. The response will contain a single product object. responses: '200': description: OK schema: type: object properties: product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: string return_params: type: string url: type: string product_price_point_name: type: string examples: application/json: product: id: 3861800 name: Trial Product handle: trial-product description: Trial period with payment expected at end of trial. accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-07-08T09:53:55-04:00' updated_at: '2016-09-05T13:00:36-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: 0 trial_interval: 7 trial_interval_unit: day archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 6 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 294791 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/xv52yrcc3byx/trial-product' product_price_point_name: Default security: - <>: [] x-stoplight: id: GET_products-id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/products/{product_id}/price_points.json': parameters: - name: product_id in: path required: true type: string post: operationId: POST_products-product_id-price_points-json summary: Create a Product Price Point tags: - 'Products: Price Points' parameters: - name: body in: body schema: type: object properties: price_point: type: object properties: name: type: string handle: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string trial_type: type: string initial_charge_in_cents: type: integer initial_charge_after_trial: type: boolean expiration_interval: type: integer expiration_interval_unit: type: string use_site_exchange_rate: type: boolean description: Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined. default: true required: - name - price_in_cents - interval - interval_unit example: price_point: name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month responses: '200': description: '' schema: type: object properties: price_point: $ref: '#/definitions/product-price-point-output' examples: application/json: price_point: id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' security: - <>: [] x-stoplight: id: POST_products-productid-pricepointsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_products-product_id-price_points-json summary: Read Product Price Points tags: - 'Products: Price Points' parameters: - name: currency_prices in: query description: 'When fetching a product''s price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point is set to use_site_exchange_rate: true, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency.' type: boolean default: false - $ref: '#/parameters/trait:pagination10:page' - $ref: '#/parameters/trait:pagination10:per_page' responses: '200': description: '' schema: type: object properties: price_points: type: array items: $ref: '#/definitions/product-price-point-output' examples: application/json: price_points: - id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' security: - <>: [] x-stoplight: id: GET_products-productid-pricepointsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/products/{product_id}/price_points/{price_point_id}.json': parameters: - name: product_id in: path required: true type: string - name: price_point_id in: path required: true type: string put: operationId: PUT_products-product_id-price_points-price_point_id-json summary: Update a Product Price Point tags: - 'Products: Price Points' parameters: - name: body in: body schema: type: object properties: price_point: type: object properties: handle: type: string price_in_cents: type: integer example: price_point: handle: educational price_in_cents: 1250 responses: '200': description: '' schema: type: object properties: price_point: $ref: '#/definitions/product-price-point-output' examples: application/json: price_point: id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' security: - <>: [] x-stoplight: id: PUT_products-productid-pricepoints-pricepointidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_products-product_id-price_points-price_point_id-json summary: Read a Product Price Point tags: - 'Products: Price Points' description: |- When fetching a product price point, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. If the product price point is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency. responses: '200': description: '' schema: type: object properties: price_point: $ref: '#/definitions/product-price-point-output' examples: application/json: price_point: id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' security: - <>: [] x-stoplight: id: GET_products-productid-pricepoints-pricepointidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_products-product_id-price_points-price_point_id-json summary: Delete a Product Price Point tags: - 'Products: Price Points' responses: '200': description: '' schema: type: object properties: price_point: type: object properties: id: type: integer name: type: string handle: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string trial_type: type: string initial_charge_in_cents: type: integer initial_charge_after_trial: type: boolean expiration_interval: type: integer expiration_interval_unit: type: string product_id: type: integer archived_at: type: string created_at: type: string updated_at: type: string examples: application/json: price_point: id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' security: - <>: [] x-stoplight: id: DELETE_products-productid-pricepoints-pricepointidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/products/{product_id}/price_points/{price_point_id}/unarchive.json': parameters: - name: product_id in: path required: true type: string - name: price_point_id in: path required: true type: string patch: operationId: PATCH_products-product_id-price_points-price_point_id-unarchive-json summary: Unarchive a Product Price Point tags: - 'Products: Price Points' responses: '200': description: '' schema: type: object properties: price_point: $ref: '#/definitions/product-price-point-output' examples: application/json: price_point: id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' security: - <>: [] x-stoplight: id: PATCH_products-productid-pricepoints-pricepointid-unarchivejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/products/{product_id}/price_points/{price_point_id}/default.json': parameters: - name: product_id in: path required: true type: string - name: price_point_id in: path required: true type: string patch: operationId: PATCH_products-product_id-price_points-price_point_id-default-json summary: Promote a Product Price Point to Default tags: - 'Products: Price Points' responses: '200': description: '' schema: type: object properties: price_point: type: object properties: id: type: integer name: type: string handle: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string trial_type: type: string initial_charge_in_cents: type: integer initial_charge_after_trial: type: boolean expiration_interval: type: integer expiration_interval_unit: type: string product_id: type: integer archived_at: type: string created_at: type: string updated_at: type: string examples: application/json: price_point: id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' security: - <>: [] x-stoplight: id: PATCH_products-productid-pricepoints-pricepointid-defaultjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/products/{product_id}/price_points/bulk.json': parameters: - name: product_id in: path required: true type: string post: operationId: POST_products-product_id-price_points-bulk-json summary: Bulk Create Product Price Points tags: - 'Products: Price Points' parameters: - name: body in: body schema: type: object properties: price_point: type: object properties: name: type: string handle: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string trial_type: type: string initial_charge_in_cents: type: integer initial_charge_after_trial: type: boolean expiration_interval: type: integer expiration_interval_unit: type: string required: - name - price_in_cents - interval - interval_unit example: price_points: - name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month - name: More Educational handle: more-educational price_in_cents: 2000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month responses: '200': description: '' schema: type: object properties: price_points: type: array items: $ref: '#/definitions/product-price-point-output' examples: application/json: price_points: - id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' security: - <>: [] x-stoplight: id: POST_products-productid-pricepoints-bulkjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/product_price_points/{product_price_point_id}/currency_prices.json': parameters: - name: product_price_point_id in: path required: true type: string post: operationId: POST_product_price_points-product_price_point_id-currency_prices-json summary: Create Currency Prices tags: - 'Products: Price Points' description: |- This endpoint allows you to create currency prices for a given currency that has been defined on the site level in your settings. When creating currency prices, they need to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee. parameters: - name: body in: body schema: type: object properties: currency_prices: type: array items: type: object properties: currency: type: string description: ISO code for one of the site level currencies. price: type: integer description: Price for the given role. role: type: string description: Role for the price. enum: - baseline - trial - initial required: - currency - price - role required: - currency_prices example: currency_prices: - currency: EUR price: 60 role: baseline - currency: EUR price: 30 role: trial - currency: EUR price: 100 role: initial responses: '200': description: '' schema: $ref: '#/definitions/product-price-point-currency-price' '422': description: '' schema: type: object properties: errors: type: object properties: base: type: array items: type: string examples: application/json: errors: base: - A baseline price must be defined for this product price point. security: - <>: [] x-stoplight: id: POST_productpricepoints-productpricepointid-currencypricesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_product_price_points-product_price_point_id-currency_prices-json summary: Update Currency Prices tags: - 'Products: Price Points' description: |- This endpoint allows you to update the `price`s of currency prices for a given currency that exists on the product price point. When updating the pricing, it needs to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee. parameters: - name: body in: body schema: type: object properties: currency_prices: type: array items: type: object properties: id: type: integer description: ID of the currency price record being updated. price: type: integer description: New price for the currency price. required: - id - price required: - currency_prices example: currency_prices: - id: 200 price: 15 - id: 201 price: 5 responses: '200': description: '' schema: type: array items: $ref: '#/definitions/product-price-point-currency-price' security: - <>: [] x-stoplight: id: PUT_productpricepoints-productpricepointid-currencypricesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /product_families.json: post: operationId: POST_product_families-product_family_id-products-format summary: Create a Product Family tags: - Product - incomplete - Product Families description: |- ## Create a Product Family This method will create a Product Family within your Chargify Domain. Create a Product Family to act as a container for your products, components and coupons. ## 422 Errors If you receive a `422 Unprocessable Entity` error, please check the JSON response for missing elements. parameters: - name: body in: body schema: $ref: '#/definitions/product-families-create-product-family-input' example: product_family: name: Acme Projects description: Amazing project management tool responses: '201': description: Created schema: $ref: '#/definitions/product-families-create-product-family-output' examples: application/json: product_family: id: 933860 name: Acme Projects description: Amazing project management tool handle: acme-projects accounting_code: null '422': description: Unprocessable Entity security: - <>: [] x-stoplight: id: POST_product_families-product_family_id-products-format beforeScript: null afterScript: null public: true mock: statusCode: 200 enabled: false get: operationId: POST_product_families-site summary: Read Product Families For a Site tags: - Product Family - incomplete - Product Families description: |- ## Read Product Families For a Site This method allows to retrieve a list of Product Families for a site. parameters: - $ref: '#/parameters/trait:productFamilyQueryString:date_field' - $ref: '#/parameters/trait:productFamilyQueryString:start_date' - $ref: '#/parameters/trait:productFamilyQueryString:end_date' - $ref: '#/parameters/trait:productFamilyQueryString:start_datetime' - $ref: '#/parameters/trait:productFamilyQueryString:end_datetime' responses: '200': description: OK schema: $ref: '#/definitions/product-families-read-product-families-for-a-site' examples: application/json: product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null security: - <>: [] x-stoplight: id: POST_product_families-site beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/product_families/{id}.json': parameters: - name: id in: path description: '' required: true type: number get: operationId: POST_product_families-id-format summary: Read Product Family via Product Family ID tags: - Product Family - incomplete - Product Families description: |- ## Read Product Family This method allows to retrieve a Product Family via the `product_family_id`. The response will contain a Product Family object. The product family can be specified either with the id number, or with the `handle:my-family` format. responses: '200': description: OK schema: $ref: '#/definitions/product-families-list-product-family-by-id' examples: application/json: product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null security: - <>: [] x-stoplight: id: POST_product_families-id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/proforma_invoices.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-proforma_invoices-json summary: Create proforma invoice tags: - Proforma Invoices description: |- ## Overview This endpoint will create a proforma invoice and return it as a response. If the information becomes outdated, simply void the old proforma invoice and generate a new one. If you would like to preview the next billing amounts without generating a full proforma invoice, [please use the renewal preview endpoint](#endpoint:kzWeHKJ6nwB6jfScq). ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be in a group, must not be prepaid, and must be in a live state. responses: '200': description: '' schema: $ref: '#/definitions/proforma-invoice-response' '403': description: '' '422': description: '' examples: application/json: errors: - this subscription is not eligible to create proforma invoices security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-proformainvoicesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_subscriptions-subscription_id-proforma_invoices-json summary: Read all subscription proforma invoices tags: - Proforma Invoices description: 'By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`.' parameters: - name: start_date in: query description: 'The beginning date range for the invoice''s Due Date, in the YYYY-MM-DD format.' type: string format: date - name: end_date in: query description: | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. type: string format: date - name: status in: query description: The current status of the invoice. type: string enum: - draft - open - paid - pending - voided - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.' type: number default: 1 - name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. type: number default: 20 maximum: 200 - name: direction in: query description: The sort direction of the returned invoices. type: string default: desc enum: - desc - asc - name: line_items in: query description: Include line items data - defaults to false for the index. type: boolean default: false - name: discounts in: query description: Include discounts data - defaults to false for the index. type: boolean default: false - name: taxes in: query description: Include taxes data - defaults to false for the index. type: boolean default: false - name: credits in: query description: Include credits data - defaults to false for the index. type: boolean default: false - name: payments in: query description: Include payments data - defaults to false for the index. type: boolean default: false - name: custom_fields in: query description: Include custom fields data - defaults to false for the index. type: boolean default: false responses: '200': description: '' schema: type: array items: $ref: '#/definitions/proforma-invoice-response' security: - <>: [] x-stoplight: id: GET_subscriptions-subscriptionid-proformainvoicesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{subscription_group_uid}/proforma_invoices.json': parameters: - name: subscription_group_uid in: path required: true type: string post: operationId: POST_subscription_groups-subscription_group_uid-proforma_invoices-json summary: Create consolidated proforma invoice tags: - Proforma Invoices description: |- ## Overview This endpoint will trigger the creation of a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be prepaid, and must be in a live state. responses: '201': description: '' '422': description: '' schema: type: object examples: application/json: errors: - Consolidated proforma invoice generation already in progress security: - <>: [] x-stoplight: id: POST_subscriptiongroups-subscriptiongroupuid-proformainvoicesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_subscription_groups-subscription_group_uid-proforma_invoices-json summary: Read all subscription group proforma invoices tags: - Proforma Invoices description: |- Only proforma invoices with a `consolidation_level` of `parent` are returned. By default, proforma invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. parameters: - name: start_date in: query description: 'The beginning date range for the invoice''s Due Date, in the YYYY-MM-DD format.' type: string format: date - name: end_date in: query description: | The ending date range for the invoice's Due Date, in the YYYY-MM-DD format. type: string format: date - name: status in: query description: The current status of the invoice. type: string enum: - draft - open - paid - pending - voided - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.' type: number default: 1 - name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. type: number default: 20 maximum: 200 - name: direction in: query description: The sort direction of the returned invoices. type: string default: desc enum: - desc - asc - name: line_items in: query description: Include line items data - defaults to false for the index. type: boolean default: false - name: discounts in: query description: Include discounts data - defaults to false for the index. type: boolean default: false - name: taxes in: query description: Include taxes data - defaults to false for the index. type: boolean default: false - name: credits in: query description: Include credits data - defaults to false for the index. type: boolean default: false - name: payments in: query description: Include payments data - defaults to false for the index. type: boolean default: false - name: custom_fields in: query description: Include custom fields data - defaults to false for the index. type: boolean default: false responses: '200': description: '' schema: type: array items: $ref: '#/definitions/proforma-invoice-response' security: - <>: [] x-stoplight: id: GET_subscriptiongroups-subscriptiongroupuid-proformainvoicesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/proforma_invoices/{proforma_invoice_uid}.json': parameters: - name: proforma_invoice_uid in: path required: true type: string get: operationId: GET_proforma_invoices-proforma_invoice_uid-json summary: Read proforma invoice tags: - Proforma Invoices description: |- ## Overview Use this endpoint to read the details of an existing proforma invoice. ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. responses: '200': description: '' schema: $ref: '#/definitions/proforma-invoice-response' '403': description: '' '404': description: '' security: - <>: [] x-stoplight: id: GET_proformainvoices-proformainvoiceuidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/proforma_invoices/{proforma_invoice_uid}/void.json': parameters: - name: proforma_invoice_uid in: path required: true type: string post: operationId: POST_proforma_invoices-proforma_invoice_uid-void-json summary: Void proforma invoice tags: - Proforma Invoices description: |- ## Overview This endpoint will void a proforma invoice that has the status "draft". ## Restrictions Proforma invoices are only available on Relationship Invoicing sites. Only proforma invoices that have the appropriate status may be reopened. If the invoice identified by {uid} does not have the appropriate status, the response will have HTTP status code 422 and an error message. A reason for the void operation is required to be included in the request body. If one is not provided, the response will have HTTP status code 422 and an error message. parameters: - name: body in: body schema: type: object properties: void: type: object properties: reason: type: string example: void: reason: Base fee has changed responses: '200': description: '' schema: $ref: '#/definitions/proforma-invoice-response' '403': description: '' '404': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Only draft proforma invoices may be voided. security: - <>: [] x-stoplight: id: POST_proformainvoices-proformainvoiceuid-voidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /reason_codes.json: post: operationId: POST_reason_codes-json summary: Create Reason Code tags: - ReasonCode - Reason Codes description: |- ## Create Reason Code This method gives a merchant the option to create a reason codes for a given Site. ## ReasonCode Input Attributes In order to create a ReasonCode you must provide a code and a description. | code | The unique identifier for the ReasonCode. | |--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | description | The friendly summary of what the code signifies | | position | The order that code appears in in lists | parameters: - name: body in: body schema: $ref: '#/definitions/reason_codes-create_code_request' example: reason_code: code: NOTHANKYOU description: No thank you! position: 5 responses: '201': description: '' schema: $ref: '#/definitions/reason_code-show_response' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Code: cannot be blank.' - 'Code: This code is already in use.' - 'Description: cannot be blank.' security: - <>: [] x-stoplight: id: POST_reasoncodesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_reason_codes-json summary: Read Reason Codes for a Site tags: - Reason Codes description: |- ## Index View This method gives a merchant the option to retrieve a list of all of the current churn codes for a given site. parameters: - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: '' schema: $ref: '#/definitions/reason_code-list_response' examples: application/json: - reason_code: id: 2 site_id: 2 code: LARGE description: This is too complicated position: 1 created_at: '2017-02-16T16:49:07-05:00' updated_at: '2017-02-17T16:29:51-05:00' - reason_code: id: 1 site_id: 2 code: CH1 description: This doesnt meet my needs position: 2 created_at: '2017-02-16T16:48:45-05:00' updated_at: '2017-02-17T16:29:59-05:00' - reason_code: id: 5 site_id: 2 code: HAN99 description: Hard to setup position: 3 created_at: '2017-02-17T16:29:42-05:00' updated_at: '2017-02-17T16:29:59-05:00' security: - <>: [] x-stoplight: id: GET_reasoncodesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/reason_codes/{reason_code_id}.json': parameters: - name: reason_code_id in: path required: true type: string get: operationId: GET_reason_codes-reason_code_id-json summary: Read a Specific Reason Code tags: - Reason Codes description: |- ## Read a Specific Reason Code This method gives a merchant the option to retrieve a list of a particular code for a given Site by providing the unique numerical ID of the code. responses: '200': description: '' schema: $ref: '#/definitions/reason_code-show_response' examples: application/json: reason_code: id: 1 site_id: 2 code: CHEAP description: This is muuy caro position: 2 created_at: '2017-02-16T16:48:45-05:00' updated_at: '2017-02-17T16:29:59-05:00' '404': description: '' schema: type: 'null' security: - <>: [] x-stoplight: id: GET_reasoncodes-reasoncodeidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_reason_codes-reason_code_id-json summary: Update Reason Code tags: - Reason Codes description: |- ## Update Reason Code This method gives a merchant the option to update an existing reason code for a given site. parameters: - name: body in: body schema: $ref: '#/definitions/reason_code-update_response' example: reason_code: id: 1 site_id: 2 code: '00023' description: Not using the product currently position: 2 created_at: '2017-02-16T16:48:45-05:00' updated_at: '2017-02-21T16:33:10-05:00' responses: '200': description: '' schema: type: object '404': description: '' schema: type: 'null' security: - <>: [] x-stoplight: id: PUT_reasoncodes-reasoncodeidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_reason_codes-reason_code_id-json summary: Delete a Reason Code tags: - ReasonCode - Reason Codes description: |- ## Delete a Reason Code This method gives a merchant the option to delete one reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversable. responses: '200': description: '' schema: $ref: '#/definitions/reason_codes-delete_response' examples: application/json: ok: ok '404': description: '' schema: type: 'null' security: - <>: [] x-stoplight: id: DELETE_reasoncodes-reasoncodeidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /referral_codes/validate.json: get: operationId: GET_referral_codes-validate-json summary: Validating Referral Codes via the API tags: - Referral Codes description: |- ## Validating Referral Codes Use this method to determine if the referral code is valid and applicable within your Site. parameters: - $ref: '#/parameters/trait:referralCode:code' responses: '200': description: '' schema: $ref: '#/definitions/referral-validate-response' examples: application/json: referral_code: id: 1032514 site_id: 31615 subscription_id: 16254270 code: 9b6cdw '404': description: '' schema: type: object properties: errors: type: string examples: application/json: errors: Referral code is invalid. security: - <>: [] x-stoplight: id: GET_referralcodes-validatejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/sellers/{seller_id}/sales_commission_settings.json': parameters: - name: seller_id in: path required: true type: string get: operationId: GET_sellers-seller_id-sales_commission_settings-json summary: Read Sales Commission Settings tags: - Sales Commission description: Endpoint returns subscriptions with associated sales reps parameters: - name: live_mode in: query type: boolean default: true - name: per_page in: query type: integer default: 100 - name: page in: query type: integer default: 1 - name: Authorization in: header required: true type: string responses: '200': description: '' schema: type: array items: type: object properties: customer_name: type: string subscription_id: type: integer site_link: type: string site_name: type: string subscription_mrr: type: string sales_rep_id: type: integer sales_rep_name: type: string examples: application/json: - customer_name: Ziomek Ziomeczek subscription_id: 81746 site_link: 'https://chargify9.staging-chargify.com/dashboard' site_name: Chargify subscription_mrr: $200.00 sales_rep_id: 48 sales_rep_name: John Candy - customer_name: Ziom Kom subscription_id: 83758 site_link: 'https://chargify9.staging-chargify.com/dashboard' site_name: Chargify subscription_mrr: $200.00 sales_rep_id: 49 sales_rep_name: Josh Acme - customer_name: George Bush subscription_id: 83790 site_link: 'https://chargify9.staging-chargify.com/dashboard' site_name: Chargify subscription_mrr: $200.00 sales_rep_id: 48 sales_rep_name: John Candy security: - Authorization: [] x-stoplight: id: GET_sellers-sellerid-salescommissionsettingsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/sellers/{seller_id}/sales_reps.json': parameters: - name: seller_id in: path required: true type: string get: operationId: GET_sellers-seller_id-sales_reps-json summary: Read All Sales Reps tags: - Sales Commission description: Endpoint returns sales rep list with details parameters: - name: live_mode in: query type: boolean default: true - name: per_page in: query type: integer default: 100 - name: page in: query type: integer default: 1 responses: '200': description: '' schema: type: array items: type: object properties: id: type: integer full_name: type: string subscriptions_count: type: integer mrr_data: type: object properties: november_2019: type: object properties: mrr: type: string usage: type: string recurring: type: string december_2019: type: object properties: mrr: type: string usage: type: string recurring: type: string january_2020: type: object properties: mrr: type: string usage: type: string recurring: type: string february_2020: type: object properties: mrr: type: string usage: type: string recurring: type: string march_2020: type: object properties: mrr: type: string usage: type: string recurring: type: string april_2020: type: object properties: mrr: type: string usage: type: string recurring: type: string test_mode: type: boolean examples: application/json: - id: 48 full_name: John Candy subscriptions_count: 2 mrr_data: november_2019: mrr: $0.00 usage: $0.00 recurring: $0.00 december_2019: mrr: $0.00 usage: $0.00 recurring: $0.00 january_2020: mrr: $400.00 usage: $0.00 recurring: $400.00 february_2020: mrr: $400.00 usage: $0.00 recurring: $400.00 march_2020: mrr: $400.00 usage: $0.00 recurring: $400.00 april_2020: mrr: $400.00 usage: $0.00 recurring: $400.00 test_mode: true - id: 49 full_name: Josh Acme subscriptions_count: 1 mrr_data: november_2019: mrr: $0.00 usage: $0.00 recurring: $0.00 december_2019: mrr: $0.00 usage: $0.00 recurring: $0.00 january_2020: mrr: $200.00 usage: $0.00 recurring: $200.00 february_2020: mrr: $200.00 usage: $0.00 recurring: $200.00 march_2020: mrr: $200.00 usage: $0.00 recurring: $200.00 april_2020: mrr: $200.00 usage: $0.00 recurring: $200.00 test_mode: true security: - Authorization: [] x-stoplight: id: GET_sellers-sellerid-salesrepsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/sellers/{seller_id}/sales_reps/{sales_rep_id}.json': parameters: - name: seller_id in: path required: true type: integer - name: sales_rep_id in: path required: true type: string get: operationId: GET_sellers-seller_id-sales_reps-sales_rep_id-json summary: Read a Sales Rep tags: - Sales Commission description: Endpoint returns sales rep and attached subscriptions details. parameters: - name: per_page in: query type: integer default: 100 - name: page in: query type: integer default: 1 responses: '200': description: '' schema: type: object properties: id: type: integer full_name: type: string subscriptions_count: type: integer test_mode: type: boolean subscriptions: type: array items: type: object properties: id: type: integer site_name: type: string subscription_url: type: string customer_name: type: string created_at: type: string mrr: type: string usage: type: string recurring: type: string last_payment: type: string churn_date: type: 'null' examples: application/json: id: 48 full_name: John Candy subscriptions_count: 2 test_mode: true subscriptions: - id: 81746 site_name: Chargify subscription_url: 'https://chargify9.staging-chargify.com/subscriptions/81746' customer_name: Ziomek Ziomeczek created_at: '2020-01-03T02:36:27-05:00' mrr: $200.00 usage: $0.00 recurring: $200.00 last_payment: '2020-04-03T03:40:27-04:00' churn_date: null - id: 83790 site_name: Chargify subscription_url: 'https://chargify9.staging-chargify.com/subscriptions/83790' customer_name: George Bush created_at: '2020-01-17T07:34:32-05:00' mrr: $200.00 usage: $0.00 recurring: $200.00 last_payment: '2020-04-17T08:41:03-04:00' churn_date: null security: - Authorization: [] x-stoplight: id: GET_sellers-sellerid-salesreps-salesrepidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /sites/clear_data.json: post: operationId: POST_sites-clear_data-json summary: 'Clear all Site data: (Default)' tags: - Sites description: |- ## Clear all Site data: (Default) All product families, products, coupons, components, customers, and related subscriptions will be removed from the site. ## Example Method: POST ``` https://.chargify.com/sites/clear_data.json ``` Result: All product families, products, coupons, components, customers, and related subscriptions will be removed from the site. ## Response The response will be a string value of `200 OK`. responses: '200': description: '' security: - <>: [] x-stoplight: id: POST_sites-cleardatajson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /site.json: get: operationId: GET_site-json summary: Read Site tags: - Sites description: |- ## Read Site Data This endpoint allows you to fetch some site data. #### Relationship invoicing enabled If site has RI enabled then you will see more settings like: "customer_hierarchy_enabled": true, "whopays_enabled": true, "whopays_default_payer": "self" You can read more about these settings here: [Who Pays & Customer Hierarchy](https://help.chargify.com/invoices/customer-hierarchies-whopays.html) responses: '200': description: '' schema: type: object properties: site: type: object properties: id: type: integer name: type: string subdomain: type: string currency: type: string seller_id: type: integer non_primary_currencies: type: array items: type: string relationship_invoicing_enabled: type: boolean customer_hierarchy_enabled: type: boolean whopays_enabled: type: boolean whopays_default_payer: type: string enum: - self-ungrouped - self - parent - eldest default_payment_collection_method: type: string examples: application/json: site: id: 68 name: Invoice Centric Billing subdomain: invoices currency: USD seller_id: 2 non_primary_currencies: - GBP relationship_invoicing_enabled: true customer_hierarchy_enabled: true whopays_enabled: true whopays_default_payer: eldest security: - <>: [] x-stoplight: id: GET_sitejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/statements/ids.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: number get: operationId: GET_subscriptions-subscription_id-statements-ids-format summary: Read Statement IDs for a Subscription tags: - Statement - incomplete - Statements description: |- ## Read Statement IDs for a Subscription This method will return a list of Statement IDs associated with one subscription. Use the IDs returned here in conjunction with [Read/Show by Chargify ID](#endpoint:nyiRmzkvKSQNGa6Ag). ## Sorting examples Say you would like to get the 10 most recently created statements. You would specify the following optional parameters: + sort as `created_at` + direction as `desc` + limit your `per_page` to `10. If you on the other hand wish to find the oldest closed statements you could do: + sort as `closed_at` + direction as `asc` parameters: - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The `page` parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a `page` parameter. Retrieve the next page by adding `?page=2` to the query string. If there are no results to return, then an empty result set will be returned.' type: number - name: sort in: query description: 'Possible values: `created_at`, `opened_at`, or `closed_at`. This allows you to choose what you would like to sort on. (Defaults to `created_at`).' type: string - name: direction in: query description: |+ This parameter specifies the sorting order and only works if a `sort` value is also passed. With `asc` and `desc` values, you can choose whether the items are to be sorted in ascending or descending order. Default value is `asc`. type: string enum: - 'Default:`asc`' - desc - name: per_page in: query description: 'This parameter indicates how many records to fetch in each request. Preset to 10,000.' type: number - $ref: '#/parameters/trait:settledSinceUnix:settled_since' responses: '200': description: OK schema: $ref: '#/definitions/statements-list-statement-ids-for-a-subscription-response' examples: application/json: statement_ids: - 79221109 - 79221381 - 79221642 - 79221742 - 79334531 - 79702531 - 79733833 security: - <>: [] x-stoplight: id: GET_subscriptions-subscription_id-statements-ids-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /statements/ids.json: get: operationId: GET_statements-ids-format summary: Read Statement IDs for a Site tags: - Statement - incomplete - Statements description: |- ## List Statement IDs for a Site This method will return a list of Statement IDs associated with and entire Site. Use the IDs returned here in conjunction with [Read/Show by Chargify ID](#endpoint:nyiRmzkvKSQNGa6Ag). parameters: - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The `page` parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a `page` parameter. Retrieve the next page by adding `?page=2` to the query string. If there are no results to return, then an empty result set will be returned.' required: false type: number - name: per_page in: query description: 'This parameter indicates how many records to fetch in each request. Preset to 10,000.' required: false type: number - $ref: '#/parameters/trait:statementsList:sort' - $ref: '#/parameters/trait:statementsList:direction' - $ref: '#/parameters/trait:settledSinceUnix:settled_since' responses: '200': description: OK schema: $ref: '#/definitions/statements-list-statement-ids-for-a-site-response' examples: application/json: statement_ids: - 67201893 - 67266652 - 67301249 - 67301813 - 80499378 - 80499379 - 80500632 security: - <>: [] x-stoplight: id: GET_statements-ids-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/statements.json': parameters: - name: subscription_id in: path required: true type: string get: operationId: GET_subscriptions-subscription_id-statements-json summary: Read Statements for a Subscription tags: - Statements description: |- ## List Statements for a Subscription This method will return the full HTML and content associated with a subscription on your Site. parameters: - $ref: '#/parameters/trait:statementsList:sort' - $ref: '#/parameters/trait:statementsList:direction' - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: '' schema: type: array items: type: object properties: statement: type: object properties: id: type: integer basic_html_view: type: string closed_at: type: string created_at: type: string customer_billing_address: type: string customer_billing_address_2: type: string customer_billing_city: type: string customer_billing_country: type: string customer_billing_state: type: string customer_billing_zip: type: string customer_first_name: type: string customer_last_name: type: string customer_organization: type: string customer_shipping_address: type: string customer_shipping_address_2: type: string customer_shipping_city: type: string customer_shipping_country: type: string customer_shipping_state: type: string customer_shipping_zip: type: string ending_balance_in_cents: type: integer future_payments: type: array items: type: object html_view: type: string memo: type: string opened_at: type: string settled_at: type: string starting_balance_in_cents: type: integer subscription_id: type: integer text_view: type: string updated_at: type: string total_in_cents: type: integer transactions: type: array items: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: - 'null' - string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: - 'null' - string gateway_transaction_id: type: - 'null' - string gateway_order_id: type: 'null' payment_id: type: - integer - 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer item_name: type: string original_amount_in_cents: type: 'null' discount_amount_in_cents: type: 'null' taxable_amount_in_cents: type: - integer - 'null' taxations: type: array items: type: object properties: tax_id: type: 'null' tax_charge_id: type: integer tax_name: type: string rate: type: string tax_amount_in_cents: type: integer tax_rules: type: array items: type: object properties: tax_rule_id: type: 'null' country_code: type: string subdivision_code: type: string rate: type: string tax_amount_in_cents: type: integer description: type: string card_number: type: string card_expiration: type: string card_type: type: string refunded_amount_in_cents: type: integer events: type: array items: type: object properties: event: type: object properties: id: type: integer key: type: string message: type: string subscription_id: type: integer created_at: type: string event_specific_data: type: - 'null' - object properties: product_id: type: integer account_transaction_id: type: - integer - 'null' previous_subscription_state: type: string new_subscription_state: type: string examples: application/json: - statement: id: 79221109 basic_html_view: |
My Awesome Company
(79221109)
Acme Projects - Trial Product

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

closed_at: '2016-10-24T16:20:13-04:00' created_at: '2016-10-24T16:20:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:12-04:00' settled_at: '2016-10-24T16:20:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221109) billing@example.com Acme Projects - Trial Product ================================================================================ -------- Summary -------- ID......: 79221109 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $0.00 Payments..........: $0.00 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:20PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:20PM EDT Recur Trial Price (10/24/2016 - 10/31/2016) $0.00 ............ ..... ............................................... .......... Totals: $0.00 ### Payments No payments this period --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Signup Success 04:20PM EDT Successful signup for Amelia Example's subscription to Trial Produ ct ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:20:13-04:00' total_in_cents: 0 transactions: - id: 159423810 subscription_id: 14900541 type: Charge kind: trial transaction_type: charge success: true amount_in_cents: 0 memo: Trial Price (10/24/2016 - 10/31/2016) created_at: '2016-10-24T16:20:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3861800 tax_id: null component_id: null statement_id: 79221109 customer_id: 14399371 item_name: Trial Price original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] events: - event: id: 342036408 key: signup_success message: Successful signup for Amelia Example's subscription to Trial Product subscription_id: 14900541 created_at: '2016-10-24T16:20:13-04:00' event_specific_data: product_id: 3861800 account_transaction_id: null - statement: id: 79221381 basic_html_view: |
My Awesome Company
(79221381)
Acme Projects - Basic Plan

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $42.50
Payments: $42.50
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:21PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:21PM EDT Recurring Basic Plan (10/24/2016 - 11/24/2016) $40.00
10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50
Totals $42.50

Payments

Date/Time Type Detail Amount
10/24/2016 04:21PM EDT CC Payment
Amelia Example - Basic Plan: Renewal payment
XXXX-XXXX-XXXX-1 bogus (01/2026)
$42.50
Totals $42.50

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Subscription State Change State changed on Amelia Example's subscription to Basic Plan from trialing to active
10/24/2016 04:20PM EDT Subscription Product Change Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan'
10/24/2016 04:21PM EDT Billing Date Change Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016
10/24/2016 04:21PM EDT Renewal Success Successful renewal for Amelia Example's subscription to Basic Plan
10/24/2016 04:21PM EDT Payment Success Successful payment of $42.50 for Amelia Example's subscription to Basic Plan

We thank you for your continued business!

closed_at: '2016-10-24T16:21:13-04:00' created_at: '2016-10-24T16:21:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $42.50
Payments: $42.50
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:21PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:21PM EDT Recurring Basic Plan (10/24/2016 - 11/24/2016) $40.00
10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50
Totals $42.50

Payments

Date/Time Type Detail Amount
10/24/2016 04:21PM EDT CC Payment
Amelia Example - Basic Plan: Renewal payment
XXXX-XXXX-XXXX-1 bogus (01/2026)
$42.50
Totals $42.50

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Subscription State Change State changed on Amelia Example's subscription to Basic Plan from trialing to active
10/24/2016 04:20PM EDT Subscription Product Change Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan'
10/24/2016 04:21PM EDT Billing Date Change Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016
10/24/2016 04:21PM EDT Renewal Success Successful renewal for Amelia Example's subscription to Basic Plan
10/24/2016 04:21PM EDT Payment Success Successful payment of $42.50 for Amelia Example's subscription to Basic Plan

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:14-04:00' settled_at: '2016-10-24T16:21:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221381) billing@example.com Acme Projects - Basic Plan ================================================================================ -------- Summary -------- ID......: 79221381 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $42.50 Payments..........: $42.50 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:21PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:21PM EDT Recur Basic Plan (10/24/2016 - 11/24/2016) $40.00 ............ ..... ............................................... .......... 10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50 ............ ..... ............................................... .......... Totals: $42.50 ### Payments Date/Time Type Detail Amount ............ ..... ............................................... .......... 10/24/2016 XXXX-XXXX-XXXX-1 bogus (01/2026) 04:21PM EDT CCPay Amelia Example - Basic Plan: Renewal payment $42.50 ............ ..... ............................................... .......... Totals: $42.50 --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Subscription State Change 04:20PM EDT State changed on Amelia Example's subscription to Basic Plan from trialing to active ............ .................................................................. 10/24/2016 Subscription Product Change 04:20PM EDT Product changed on Amelia Example's subscription from 'Trial Produ ct' to 'Basic Plan' ............ .................................................................. 10/24/2016 Billing Date Change 04:21PM EDT Billing date changed on Amelia Example's subscription to Basic Pla n from 10/31/2016 to 10/24/2016 ............ .................................................................. 10/24/2016 Renewal Success 04:21PM EDT Successful renewal for Amelia Example's subscription to Basic Plan ............ .................................................................. 10/24/2016 Payment Success 04:21PM EDT Successful payment of $42.50 for Amelia Example's subscription to Basic Plan ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:21:13-04:00' total_in_cents: 4250 transactions: - id: 159424439 subscription_id: 14900541 type: Charge kind: baseline transaction_type: charge success: true amount_in_cents: 4000 memo: Basic Plan (10/24/2016 - 11/24/2016) created_at: '2016-10-24T16:21:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 4000 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 159424449 product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: 4000 taxations: - tax_id: null tax_charge_id: 159424444 tax_name: MA Tax rate: '0.0625' tax_amount_in_cents: 250 tax_rules: - tax_rule_id: null country_code: US subdivision_code: MA rate: '0.0625' tax_amount_in_cents: 250 description: MA STATE TAX - MASSACHUSETTS - id: 159424444 subscription_id: 14900541 type: Charge kind: tax transaction_type: charge success: true amount_in_cents: 250 memo: MA Tax (6.25%) created_at: '2016-10-24T16:21:12-04:00' starting_balance_in_cents: 4000 ending_balance_in_cents: 4250 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 159424449 product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] - id: 159424449 subscription_id: 14900541 type: Payment kind: null transaction_type: payment success: true amount_in_cents: 4250 memo: 'Amelia Example - Basic Plan: Renewal payment' created_at: '2016-10-24T16:21:13-04:00' starting_balance_in_cents: 4250 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 card_number: XXXX-XXXX-XXXX-1 card_expiration: 01/2026 card_type: bogus refunded_amount_in_cents: 0 events: - event: id: 342036536 key: subscription_state_change message: State changed on Amelia Example's subscription to Basic Plan from trialing to active subscription_id: 14900541 created_at: '2016-10-24T16:20:43-04:00' event_specific_data: previous_subscription_state: trialing new_subscription_state: active - event: id: 342036540 key: subscription_product_change message: Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan' subscription_id: 14900541 created_at: '2016-10-24T16:20:43-04:00' event_specific_data: previous_product_id: 3861800 new_product_id: 3792003 - event: id: 342037380 key: billing_date_change message: Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016 subscription_id: 14900541 created_at: '2016-10-24T16:21:11-04:00' event_specific_data: null - event: id: 342037470 key: renewal_success message: Successful renewal for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-10-24T16:21:14-04:00' event_specific_data: product_id: 3792003 account_transaction_id: 159424449 - event: id: 342037482 key: payment_success message: Successful payment of $42.50 for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-10-24T16:21:14-04:00' event_specific_data: product_id: 3792003 account_transaction_id: 159424449 security: - <>: [] x-stoplight: id: GET_subscriptions-subscriptionid-statementsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /statements.json: get: operationId: GET_statements-json summary: Read Statements for a Site tags: - Statements description: |- ## List Statements for a Site This method will return a paginated list of all Statements generated by the Subscriptions in your Site. Note that this endpoint returns a "lighter" set of the Statement attributes than the "List Statements for a Subscription" endpoint. This endpoint omits the HTML and textual representations for the Statement: `basic_html_view`, `html_view`, and `text_view`. If you require these attributes, you can either build them yourself based on the other data returned or fetch a single subscription via the "Read/Show by Chargify ID" endpoint. parameters: - name: '' in: query type: string - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' - $ref: '#/parameters/trait:statementsList:sort' - $ref: '#/parameters/trait:statementsList:direction' responses: '200': description: '' schema: type: array items: type: object properties: statement: type: object properties: id: type: integer basic_html_view: type: string closed_at: type: string created_at: type: string customer_billing_address: type: string customer_billing_address_2: type: string customer_billing_city: type: string customer_billing_country: type: string customer_billing_state: type: string customer_billing_zip: type: string customer_first_name: type: string customer_last_name: type: string customer_organization: type: string customer_shipping_address: type: string customer_shipping_address_2: type: string customer_shipping_city: type: string customer_shipping_country: type: string customer_shipping_state: type: string customer_shipping_zip: type: string ending_balance_in_cents: type: integer future_payments: type: array items: type: object html_view: type: string memo: type: string opened_at: type: string settled_at: type: string starting_balance_in_cents: type: integer subscription_id: type: integer text_view: type: string updated_at: type: string total_in_cents: type: integer transactions: type: array items: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: - 'null' - string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: - 'null' - string gateway_transaction_id: type: - 'null' - string gateway_order_id: type: 'null' payment_id: type: - integer - 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer item_name: type: string original_amount_in_cents: type: 'null' discount_amount_in_cents: type: 'null' taxable_amount_in_cents: type: - integer - 'null' taxations: type: array items: type: object properties: tax_id: type: 'null' tax_charge_id: type: integer tax_name: type: string rate: type: string tax_amount_in_cents: type: integer tax_rules: type: array items: type: object properties: tax_rule_id: type: 'null' country_code: type: string subdivision_code: type: string rate: type: string tax_amount_in_cents: type: integer description: type: string card_number: type: string card_expiration: type: string card_type: type: string refunded_amount_in_cents: type: integer events: type: array items: type: object properties: event: type: object properties: id: type: integer key: type: string message: type: string subscription_id: type: integer created_at: type: string event_specific_data: type: - 'null' - object properties: product_id: type: integer account_transaction_id: type: - integer - 'null' previous_subscription_state: type: string new_subscription_state: type: string examples: application/json: - statement: id: 79221109 basic_html_view: |
My Awesome Company
(79221109)
Acme Projects - Trial Product

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

closed_at: '2016-10-24T16:20:13-04:00' created_at: '2016-10-24T16:20:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:12-04:00' settled_at: '2016-10-24T16:20:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221109) billing@example.com Acme Projects - Trial Product ================================================================================ -------- Summary -------- ID......: 79221109 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $0.00 Payments..........: $0.00 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:20PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:20PM EDT Recur Trial Price (10/24/2016 - 10/31/2016) $0.00 ............ ..... ............................................... .......... Totals: $0.00 ### Payments No payments this period --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Signup Success 04:20PM EDT Successful signup for Amelia Example's subscription to Trial Produ ct ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:20:13-04:00' total_in_cents: 0 transactions: - id: 159423810 subscription_id: 14900541 type: Charge kind: trial transaction_type: charge success: true amount_in_cents: 0 memo: Trial Price (10/24/2016 - 10/31/2016) created_at: '2016-10-24T16:20:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3861800 tax_id: null component_id: null statement_id: 79221109 customer_id: 14399371 item_name: Trial Price original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] events: - event: id: 342036408 key: signup_success message: Successful signup for Amelia Example's subscription to Trial Product subscription_id: 14900541 created_at: '2016-10-24T16:20:13-04:00' event_specific_data: product_id: 3861800 account_transaction_id: null - statement: id: 79221381 basic_html_view: |
My Awesome Company
(79221381)
Acme Projects - Basic Plan

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $42.50
Payments: $42.50
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:21PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:21PM EDT Recurring Basic Plan (10/24/2016 - 11/24/2016) $40.00
10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50
Totals $42.50

Payments

Date/Time Type Detail Amount
10/24/2016 04:21PM EDT CC Payment
Amelia Example - Basic Plan: Renewal payment
XXXX-XXXX-XXXX-1 bogus (01/2026)
$42.50
Totals $42.50

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Subscription State Change State changed on Amelia Example's subscription to Basic Plan from trialing to active
10/24/2016 04:20PM EDT Subscription Product Change Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan'
10/24/2016 04:21PM EDT Billing Date Change Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016
10/24/2016 04:21PM EDT Renewal Success Successful renewal for Amelia Example's subscription to Basic Plan
10/24/2016 04:21PM EDT Payment Success Successful payment of $42.50 for Amelia Example's subscription to Basic Plan

We thank you for your continued business!

closed_at: '2016-10-24T16:21:13-04:00' created_at: '2016-10-24T16:21:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $42.50
Payments: $42.50
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:21PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:21PM EDT Recurring Basic Plan (10/24/2016 - 11/24/2016) $40.00
10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50
Totals $42.50

Payments

Date/Time Type Detail Amount
10/24/2016 04:21PM EDT CC Payment
Amelia Example - Basic Plan: Renewal payment
XXXX-XXXX-XXXX-1 bogus (01/2026)
$42.50
Totals $42.50

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Subscription State Change State changed on Amelia Example's subscription to Basic Plan from trialing to active
10/24/2016 04:20PM EDT Subscription Product Change Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan'
10/24/2016 04:21PM EDT Billing Date Change Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016
10/24/2016 04:21PM EDT Renewal Success Successful renewal for Amelia Example's subscription to Basic Plan
10/24/2016 04:21PM EDT Payment Success Successful payment of $42.50 for Amelia Example's subscription to Basic Plan

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:14-04:00' settled_at: '2016-10-24T16:21:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221381) billing@example.com Acme Projects - Basic Plan ================================================================================ -------- Summary -------- ID......: 79221381 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $42.50 Payments..........: $42.50 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:21PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:21PM EDT Recur Basic Plan (10/24/2016 - 11/24/2016) $40.00 ............ ..... ............................................... .......... 10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50 ............ ..... ............................................... .......... Totals: $42.50 ### Payments Date/Time Type Detail Amount ............ ..... ............................................... .......... 10/24/2016 XXXX-XXXX-XXXX-1 bogus (01/2026) 04:21PM EDT CCPay Amelia Example - Basic Plan: Renewal payment $42.50 ............ ..... ............................................... .......... Totals: $42.50 --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Subscription State Change 04:20PM EDT State changed on Amelia Example's subscription to Basic Plan from trialing to active ............ .................................................................. 10/24/2016 Subscription Product Change 04:20PM EDT Product changed on Amelia Example's subscription from 'Trial Produ ct' to 'Basic Plan' ............ .................................................................. 10/24/2016 Billing Date Change 04:21PM EDT Billing date changed on Amelia Example's subscription to Basic Pla n from 10/31/2016 to 10/24/2016 ............ .................................................................. 10/24/2016 Renewal Success 04:21PM EDT Successful renewal for Amelia Example's subscription to Basic Plan ............ .................................................................. 10/24/2016 Payment Success 04:21PM EDT Successful payment of $42.50 for Amelia Example's subscription to Basic Plan ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:21:13-04:00' total_in_cents: 4250 transactions: - id: 159424439 subscription_id: 14900541 type: Charge kind: baseline transaction_type: charge success: true amount_in_cents: 4000 memo: Basic Plan (10/24/2016 - 11/24/2016) created_at: '2016-10-24T16:21:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 4000 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 159424449 product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: 4000 taxations: - tax_id: null tax_charge_id: 159424444 tax_name: MA Tax rate: '0.0625' tax_amount_in_cents: 250 tax_rules: - tax_rule_id: null country_code: US subdivision_code: MA rate: '0.0625' tax_amount_in_cents: 250 description: MA STATE TAX - MASSACHUSETTS - id: 159424444 subscription_id: 14900541 type: Charge kind: tax transaction_type: charge success: true amount_in_cents: 250 memo: MA Tax (6.25%) created_at: '2016-10-24T16:21:12-04:00' starting_balance_in_cents: 4000 ending_balance_in_cents: 4250 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 159424449 product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] - id: 159424449 subscription_id: 14900541 type: Payment kind: null transaction_type: payment success: true amount_in_cents: 4250 memo: 'Amelia Example - Basic Plan: Renewal payment' created_at: '2016-10-24T16:21:13-04:00' starting_balance_in_cents: 4250 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 card_number: XXXX-XXXX-XXXX-1 card_expiration: 01/2026 card_type: bogus refunded_amount_in_cents: 0 events: - event: id: 342036536 key: subscription_state_change message: State changed on Amelia Example's subscription to Basic Plan from trialing to active subscription_id: 14900541 created_at: '2016-10-24T16:20:43-04:00' event_specific_data: previous_subscription_state: trialing new_subscription_state: active - event: id: 342036540 key: subscription_product_change message: Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan' subscription_id: 14900541 created_at: '2016-10-24T16:20:43-04:00' event_specific_data: previous_product_id: 3861800 new_product_id: 3792003 - event: id: 342037380 key: billing_date_change message: Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016 subscription_id: 14900541 created_at: '2016-10-24T16:21:11-04:00' event_specific_data: null - event: id: 342037470 key: renewal_success message: Successful renewal for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-10-24T16:21:14-04:00' event_specific_data: product_id: 3792003 account_transaction_id: 159424449 - event: id: 342037482 key: payment_success message: Successful payment of $42.50 for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-10-24T16:21:14-04:00' event_specific_data: product_id: 3792003 account_transaction_id: 159424449 security: - <>: [] x-stoplight: id: GET_statementsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/statements/{statement_id}.json': parameters: - name: statement_id in: path description: '' required: true type: number get: operationId: GET_statements-statement_id-format summary: Read by Statement ID tags: - Statement - incomplete - Statements description: |- ## Read/Show by Chargify ID This method will return all of the Statement attribute fields. All of these attributes are read only. ## PDF Versions of Statements Individual PDF Statements can be retrieved by using the Accept/Content-Type header application/pdf or appending .pdf as the `` portion of the URL: `/statements/1.pdf`. responses: '200': description: OK schema: $ref: '#/definitions/statements-read-show-by-chargify-id' examples: application/json: statement: id: 79221109 basic_html_view: |
My Awesome Company
(79221109)
Acme Projects - Trial Product

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

closed_at: '2016-10-24T16:20:13-04:00' created_at: '2016-10-24T16:20:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:12-04:00' settled_at: '2016-10-24T16:20:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221109) billing@example.com Acme Projects - Trial Product ================================================================================ -------- Summary -------- ID......: 79221109 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $0.00 Payments..........: $0.00 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:20PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:20PM EDT Recur Trial Price (10/24/2016 - 10/31/2016) $0.00 ............ ..... ............................................... .......... Totals: $0.00 ### Payments No payments this period --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Signup Success 04:20PM EDT Successful signup for Amelia Example's subscription to Trial Produ ct ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:20:13-04:00' total_in_cents: 0 transactions: - id: 159423810 subscription_id: 14900541 type: Charge kind: trial transaction_type: charge success: true amount_in_cents: 0 memo: Trial Price (10/24/2016 - 10/31/2016) created_at: '2016-10-24T16:20:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3861800 tax_id: null component_id: null statement_id: 79221109 customer_id: 14399371 item_name: Trial Price original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] events: - event: id: 342036408 key: signup_success message: Successful signup for Amelia Example's subscription to Trial Product subscription_id: 14900541 created_at: '2016-10-24T16:20:13-04:00' event_specific_data: product_id: 3861800 account_transaction_id: null security: - <>: [] x-stoplight: id: GET_statements-statement_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /statements/count.json: get: operationId: GET_statements_count-format summary: Read the Count of Statements for a Site tags: - Transaction - incomplete - Statements description: |- ## Read the Count of Statements for a Site This method will return the total number of statements belonging to a site. You can use this number to formulate the pagination portion of the query string when retrieving [Statement IDs](#endpoint:EABo2azFF2x9hCF7b) for a Site. responses: '200': description: OK schema: $ref: '#/definitions/statements-count-statements-response' examples: application/json: count: 129 '404': description: Not Found security: - <>: [] x-stoplight: id: GET_statements_count-format beforeScript: null afterScript: null public: false mock: enabled: false statusCode: 200 /stats.json: get: operationId: GET_stats-json summary: Read Stats for a Site tags: - Stats - incomplete description: |- ## Read Stats The output of the stats endpoint will provide some useful data about your site: | seller_name | Name of the Merchant | |---------------|------------------------------------| | site_name | Given name of Site within Chargify | | site_id | ID of site | | site_currency | Current currency of Site | Additionally, there will a set of fluctuating statistics regarding the Site within the `stats` object: | total_subscriptions | Total number of ALL subscribers on the Site | |---------------------|-----------------------------------------------------------------| | subscriptions_today | Total number of new subscribers on the day the request was sent | | total_revenue | Total revenue for the Site | | revenue_today | Total revenue received today | | revenue_this_month | Revenue received this month | | revenue_this_year | Revenue received this year | | total_canceled_subscriptions | Total number of all canceled subscriptions | | total_active_subscriptions | Total number of all active subscriptions | | total_past_due_subscriptions | Total number of all subscriptions in past due state | | total_unpaid_subscriptions | Total number of subscriptions in unpaid state | | total_dunning_subscriptions | Total number of subscriptions in dunning | responses: '200': description: OK schema: $ref: '#/definitions/stats-read-stats-output' examples: application/json: seller_name: 'Acme, Inc.' site_name: Production site_id: 12345 site_currency: USD stats: total_subscriptions: 120 subscriptions_today: 4 total_revenue: '$45,978.81' revenue_today: '$1,405.12' revenue_this_month: '$10,000.00' revenue_this_year: '$27,935.24' total_canceled_subscriptions: 1 total_active_subscriptions: 118 total_past_due_subscriptions: 1 total_unpaid_subscriptions: 0 total_dunning_subscriptions: 1 security: - <>: [] x-stoplight: id: GET_stats-json beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /subscription_groups.json: post: operationId: POST_subscription_groups-json summary: Create Subscription Groups tags: - Subscription Groups description: |- ## Create Subscription Groups Creates a subscription group with given members. The response will either return information the subscription group that was created or an error message ## Input Attributes (Create) | subscription_id | ID of primary subscription | |--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | members_ids | IDs of group members parameters: - name: body in: body schema: type: object properties: subscription_group: type: object required: - subscription_id properties: subscription_id: type: integer members_ids: type: array items: type: integer required: - subscription_group example: subscription_group: subscription_id: 1 members_ids: - 2 - 3 responses: '200': description: '' schema: type: object properties: subscription_group: type: object properties: customer_id: type: integer payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string payment_collection_method: type: string subscription_ids: type: array items: type: integer created_at: type: string examples: application/json: subscription_group: customer_id: 1 payment_profile: id: 1 first_name: t last_name: t masked_card_number: XXXX-XXXX-XXXX-1 payment_collection_method: automatic subscription_ids: - 1 - 2 created_at: '2021-01-21T05:47:38-05:00' '422': description: '' schema: type: object properties: errors: type: string examples: application/json: errors: Subscription is already in group security: - <>: [] x-stoplight: id: POST_subscriptiongroupsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_subscription_groups-json summary: Read Subscription Groups tags: - Subscription Groups description: |- ## Read Subscription Groups Returns an array of subscription groups for the site. The response is paginated and will return a `meta` key with pagination information. #### Account Balance Information Account balance information for the subscription groups is not returned by default. If this information is desired, the `include[]=account_balances` parameter must be provided with the request. parameters: - name: per_page in: query type: array items: type: string - name: page in: query type: string - name: include in: query type: string responses: '200': description: '' schema: type: object properties: subscription_groups: type: array items: type: object properties: uid: type: string scheme: type: integer customer_id: type: integer payment_profile_id: type: integer subscription_ids: type: array items: type: integer primary_subscription_id: type: integer next_assessment_at: type: string state: type: string cancel_at_end_of_period: type: boolean account_balances: type: object properties: prepayments: type: object properties: balance_in_cents: type: integer service_credits: type: object properties: balance_in_cents: type: integer open_invoices: type: object properties: balance_in_cents: type: integer pending_discounts: type: object properties: balance_in_cents: type: integer meta: type: object properties: current_page: type: integer total_count: type: integer examples: application/json: subscription_groups: - uid: grp_952mvqcnk53wq scheme: 1 customer_id: 88498000 payment_profile_id: 93063018 subscription_ids: - 42768907 - 82370782 primary_subscription_id: 69844395 next_assessment_at: 'Sun, 09 Aug 2020 15:59:06 EDT -04:00' state: active cancel_at_end_of_period: false account_balances: prepayments: balance_in_cents: 0 service_credits: balance_in_cents: 0 pending_discounts: balance_in_cents: 0 meta: current_page: 1 total_count: 1 security: - <>: [] x-stoplight: id: GET_subscriptiongroupsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{uid}.json': parameters: - name: uid in: path description: Subscription Group UID required: true type: string get: operationId: GET_subscription_groups-uid-json summary: Read Subscription Group tags: - Subscription - incomplete - Subscription Groups description: |- ## Read Subscription Group Use this endpoint to find subscription group details. #### Current Billing Amount in Cents Current billing amount for the subscription group is not returned by default. If this information is desired, the `include[]=current_billing_amount_in_cents` parameter must be provided with the request. parameters: - name: '' in: query type: string - name: body in: body schema: type: object properties: '': type: string responses: '200': description: OK schema: type: object properties: uid: type: string scheme: type: integer customer_id: type: integer payment_profile_id: type: integer subscription_ids: type: array items: type: integer primary_subscription_id: type: integer next_assessment_at: type: string state: type: string cancel_at_end_of_period: type: boolean current_billing_amount_in_cents: type: integer customer: type: object properties: first_name: type: string last_name: type: string organization: type: string email: type: string reference: type: string account_balances: type: object properties: prepayments: type: object properties: balance_in_cents: type: integer service_credits: type: object properties: balance_in_cents: type: integer open_invoices: type: object properties: balance_in_cents: type: integer pending_discounts: type: object properties: balance_in_cents: type: integer examples: application/json: uid: grp_939ktzq8v4477 scheme: 1 customer_id: 400 payment_profile_id: 567 subscription_ids: - 101 - 102 - 103 primary_subscription_id: 101 next_assessment_at: '2020-08-01T14:00:00-05:00' state: active cancel_at_end_of_period: false current_billing_amount_in_cents: 11500 customer: first_name: Mark last_name: Wannabewahlberg organization: The Funky Bunch email: markymark@example.com reference: 4c92223b-bc16-4d0d-87ff-b177a89a2655 account_balances: prepayments: balance_in_cents: 0 service_credits: balance_in_cents: 0 open_invoices: balance_in_cents: 4400 pending_discounts: balance_in_cents: 0 security: - <>: [] x-stoplight: id: GET_subscriptiongroups-uidjson beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 delete: operationId: DELETE_subscription_groups-uid-json summary: Delete Subscription Group tags: - Subscription Groups description: |- ## Delete Subscription Group Use this endpoint to delete subscription group. Only groups without members can be deleted responses: '200': description: '' schema: type: object properties: uid: type: string deleted: type: boolean examples: application/json: uid: grp_99w5xp9y5xycy deleted: true '404': description: '' security: - <>: [] x-stoplight: id: DELETE_subscriptiongroups-uidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_subscription_groups-uid-json summary: Update Subscription Group tags: - Subscription Groups description: |- ## Update Subscription Group Use this endpoint to update subscription group members. `"member_ids": []` should contain an array of both subscription IDs to set as group members and subscription IDs already present in the groups. Not including them will result in removing them from subscription group. To clean up members, just leave the array empty. parameters: - name: body in: body schema: type: object properties: subscription_group: type: object required: - members_ids properties: members_ids: type: array items: type: integer required: - subscription_group example: subscription_group: members_ids: - 1 responses: '200': description: '' schema: type: object properties: subscription_group: type: object properties: customer_id: type: integer payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string payment_collection_method: type: string subscription_ids: type: array items: type: integer created_at: type: string examples: application/json: subscription_group: customer_id: 1 payment_profile: id: 1 first_name: t last_name: t masked_card_number: XXXX-XXXX-XXXX-1 payment_collection_method: automatic subscription_ids: - 1 created_at: '2021-01-21T05:47:38-05:00' '422': description: '' schema: type: object properties: errors: type: object properties: members: type: array items: type: object properties: id: type: integer type: type: string message: type: string examples: application/json: errors: members: - id: 10101 type: not_found message: Subscription could not be found security: - <>: [] x-stoplight: id: PUT_subscriptiongroups-uidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /subscription_groups/lookup.json: get: operationId: GET_subscription_groups-lookup-json summary: Look Subscription Group By Subscription ID tags: - Subscription - incomplete - Subscription Groups description: |- ## Look Subscription Group by Subscription ID Use this endpoint to find subscription group associated with subscription. If the subscription is not in a group endpoint will return 404 code. parameters: - name: subscription_id in: query type: string - name: body in: body schema: type: object properties: '': type: string responses: '200': description: OK schema: type: object properties: uid: type: string scheme: type: integer customer_id: type: integer payment_profile_id: type: integer subscription_ids: type: array items: type: integer primary_subscription_id: type: integer next_assessment_at: type: string state: type: string cancel_at_end_of_period: type: boolean customer: type: object properties: first_name: type: string last_name: type: string organization: type: string email: type: string reference: type: string account_balances: type: object properties: prepayments: type: object properties: balance_in_cents: type: integer service_credits: type: object properties: balance_in_cents: type: integer open_invoices: type: object properties: balance_in_cents: type: integer pending_discounts: type: object properties: balance_in_cents: type: integer examples: application/json: uid: grp_939ktzq8v4477 scheme: 1 customer_id: 400 payment_profile_id: 567 subscription_ids: - 101 - 102 - 103 primary_subscription_id: 101 next_assessment_at: '2020-08-01T14:00:00-05:00' state: active cancel_at_end_of_period: false customer: first_name: Mark last_name: Wannabewahlberg organization: The Funky Bunch email: markymark@example.com reference: 4c92223b-bc16-4d0d-87ff-b177a89a2655 account_balances: prepayments: balance_in_cents: 0 service_credits: balance_in_cents: 0 open_invoices: balance_in_cents: 4400 pending_discounts: balance_in_cents: 0 security: - <>: [] x-stoplight: id: GET_subscriptiongroups-lookupjson beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_group_uid}/payment_profiles/{payment_profile_id}/change_payment_profile.json': parameters: - name: subscription_group_uid in: path required: true type: string - name: payment_profile_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_group_uid-payment_profiles-payment_profile_id-change_payment_profile-json summary: Change Default Payment Profile tags: - Subscription Groups description: |- ## Change Default Payment Profile for Subscription Group This will change the default payment profile on the subscription group to the existing payment profile with the id specified. You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. The new payment profile must belong to the subscription group's customer, otherwise you will receive an error. responses: '200': description: '' schema: type: object properties: payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: 'null' vault_token: type: 'null' billing_address: type: 'null' billing_city: type: 'null' billing_state: type: 'null' billing_zip: type: 'null' billing_country: type: 'null' customer_vault_token: type: 'null' billing_address_2: type: 'null' site_gateway_setting_id: type: 'null' payment_type: type: string disabled: type: boolean examples: application/json: payment_profile: id: 3 first_name: Leland last_name: Considine masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 12 expiration_year: 2022 customer_id: 1 current_vault: null vault_token: null billing_address: null billing_city: null billing_state: null billing_zip: null billing_country: null customer_vault_token: null billing_address_2: null site_gateway_setting_id: null payment_type: credit_card disabled: false '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Cannot switch to a payment profile outside of the group security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptiongroupuid-paymentprofiles-paymentprofileid-changepaymentprofilejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{uid}/cancel.json': parameters: - name: uid in: path required: true type: string post: operationId: POST_subscription_groups-uid-cancel-json summary: Cancel Group Subscriptions (Immediately) tags: - 'Subscription Groups: Cancellations' description: |- This endpoint will immediately cancel all subscriptions within the specified group. The group is identified by it's `uid` passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members as well must be on automatic billing or they must be prepaid. In order to cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request. parameters: - name: body in: body schema: type: object properties: charge_unbilled_usage: type: boolean example: charge_unbilled_usage: true responses: '200': description: '' schema: type: object '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - One or more subscriptions are not on automatic billing security: - <>: [] x-stoplight: id: POST_subscriptiongroups-uid-canceljson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{uid}/delayed_cancel.json': parameters: - name: uid in: path required: true type: string post: operationId: POST_subscription_groups-uid-delayed_cancel-json summary: Initiate Delayed Group Cancellation tags: - 'Subscription Groups: Cancellations' description: |- This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by it's uid passed in the URL. All subscriptions in the group must be on automatic billing in order to successfully cancel them, and the group must not be in a "past_due" state. responses: '200': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Subscriptions group is in a past due state security: - <>: [] x-stoplight: id: POST_subscriptiongroups-uid-delayedcanceljson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_subscription_groups-uid-delayed_cancel-json summary: Cancel Delayed Group Cancellation tags: - 'Subscription Groups: Cancellations' description: Removing the delayed cancellation on a subscription group will ensure that the subscriptions do not get canceled at the end of the period. The request will reset the `cancel_at_end_of_period` flag to false on each member in the group. responses: '200': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Subscriptions group does not have a pending delayed cancellation security: - <>: [] x-stoplight: id: DELETE_subscriptiongroups-uid-delayedcanceljson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{subscription_group_uid}/reactivate.json': parameters: - name: subscription_group_uid in: path required: true type: string post: operationId: POST_subscription_groups-subscription_group_uid-reactivate-json summary: Reactivate or Resume a Subscription Group tags: - Subscription Groups - 'Subscription Groups: Reactivation and Resumption' description: |- This endpoint will attempt to reactivate or resume a cancelled subscription group. Upon reactivation, any canceled invoices created after the beginning of the primary subscription's billing period will be reopened and payment will be attempted on them. If the subscription group is being reactivated (as opposed to resumed), new charges will also be assessed for the new billing period. Whether a subscription group is reactivated (a new billing period is created) or resumed (the current billing period is respected) will depend on the parameters that are sent with the request as well as the date of the request relative to the primary subscription's period. ## Reactivating within the current period If a subscription group is cancelled and reactivated within the primary subscription's current period, we can choose to either start a new billing period or maintain the existing one. If we want to maintain the existing billing period the `resume=true` option must be passed in request parameters. An exception to the above are subscriptions that are on calendar billing. These subscriptions cannot be reactivatied within the current period. If the `resume=true` option is not passed the request will return an error. ## Reactivating beyond the current period In this case, a subscription group can only be reactivated with a new billing period. If the `resume=true` option is passed it will be ignored. For calendar billing subscriptions, the new billing period created will be a partial one, spanning from the date of reactivation to the next corresponding calendar renewal date. parameters: - name: body in: body schema: type: object properties: resume: type: boolean example: resume: true responses: '200': description: '' schema: type: object properties: uid: type: string scheme: type: integer customer_id: type: integer payment_profile_id: type: integer subscription_ids: type: array items: type: integer primary_subscription_id: type: integer next_assessment_at: type: string state: type: string cancel_at_end_of_period: type: boolean examples: application/json: uid: grp_93wgm89cbjkw6 scheme: 1 customer_id: 1 payment_profile_id: 1 subscription_ids: - 1 - 2 primary_subscription_id: 1 next_assessment_at: '2020-06-18T12:00:00-04:00' state: active cancel_at_end_of_period: false '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Must be inside the current billing period to resume this subscription group security: - <>: [] x-stoplight: id: POST_subscriptiongroups-subscriptiongroupuid-reactivatejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{subscription_group_uid}/payment_profiles/{payment_profile_id}.json': parameters: - name: subscription_group_uid in: path required: true type: string - name: payment_profile_id in: path required: true type: string delete: operationId: DELETE_subscription_groups-subscription_group_uid-payment_profiles-payment_profile_id-json summary: Delete Subscription Group Payment Profile tags: - 'Subscription Groups: Payment Methods' description: |- ## Delete Subscription Group Payment Profile This will delete a Payment Profile belonging to a Subscription Group. **Note**: If the Payment Profile belongs to multiple Subscription Groups and/or Subscriptions, it will be removed from all of them. Response will be 204 / No content. responses: '204': description: '' security: - <>: [] x-stoplight: id: DELETE_subscriptiongroups-subscriptiongroupuid-paymentprofiles-paymentprofileidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{uid}/prepayments.json': parameters: - name: uid in: path required: true type: string post: operationId: POST_subscription_groups-uid-prepayments-json summary: Create Prepayment tags: - 'Subscription Groups: Prepayments' description: |- ## Create Prepayment A prepayment can be added for a subscription group identified by the group's `uid`. This endpoint requires a `amount`, `details`, `method`, and `memo`. On success, the prepayment will be added to the group's prepayment balance. parameters: - name: body in: body schema: $ref: '#/definitions/subscription-group-prepayment' example: prepayment: amount: 10000 details: '001022' memo: Check received 01/01/2020 method: check payment_profile_id: 45988908 responses: '201': description: '' schema: $ref: '#/definitions/invoice-account-entry' examples: application/json: id: 6049554 amount_in_cents: 10000 ending_balance_in_cents: 5000 entry_type: Debit memo: Debit from invoice account. '422': description: '' schema: type: object properties: errors: type: array items: type: - string - array items: type: string examples: application/json: errors: - Amount must be greater than 0 security: - <>: [] x-stoplight: id: POST_subscriptiongroups-uid-prepaymentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{uid}/service_credits.json': parameters: - name: uid in: path required: true type: string post: operationId: POST_subscription_groups-uid-service_credits-json summary: Issue Service Credit tags: - 'Subscription Groups: Service Credits' description: |- ## Issue Service Credit Credit can be issued for a subscription group identified by the group's `uid`. Credit will be added to the group in the amount specified in the request body. The credit will be applied to group member invoices as they are generated. parameters: - name: body in: body schema: type: object properties: service_credit: $ref: '#/definitions/service-credit-post' required: - service_credit example: service_credit: amount: 10 memo: Credit the group account responses: '201': description: '' schema: $ref: '#/definitions/service-credit' examples: application/json: id: 101 amount_in_cents: 1000 ending_balance_in_cents: 2000 entry_type: Credit memo: Credit to group account '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Amount must be greater than 0 security: - <>: [] x-stoplight: id: POST_subscriptiongroups-uid-servicecreditsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscription_groups/{uid}/service_credit_deductions.json': parameters: - name: uid in: path required: true type: string post: operationId: POST_subscription_groups-uid-service_credit_deductions-json summary: Deduct Service Credit tags: - 'Subscription Groups: Service Credits' description: |- ## Deduct Service Credit Credit can be deducted for a subscription group identified by the group's `uid`. Credit will be deducted from the group in the amount specified in the request body. parameters: - name: body in: body schema: type: object properties: deduction: $ref: '#/definitions/service-credit-post' example: deduction: amount: 10 memo: Deduct from group account responses: '201': description: '' schema: $ref: '#/definitions/service-credit' examples: application/json: id: 100 amount_in_cents: 1000 ending_balance_in_cents: 0 entry_type: Debit memo: Debit from group account '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Amount must be greater than 0 security: - <>: [] x-stoplight: id: POST_subscriptiongroups-uid-servicecreditdeductionsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: string get: operationId: GET_subscriptions-subscription_id-format summary: Read Subscription tags: - Subscription - incomplete - Subscriptions description: |- ## Read a Subscription Use this endpoint to find subscription details. ### Self-Service Page token Self-Service Page token for the subscription is not returned by default. If this information is desired, the include[]=self_service_page_token parameter must be provided with the request. responses: '200': description: OK schema: type: array items: type: object properties: subscription: type: object properties: id: type: integer state: type: string balance_in_cents: type: integer total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer current_period_ends_at: type: string next_assessment_at: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string expires_at: type: 'null' created_at: type: string updated_at: type: string cancellation_message: type: - 'null' - string cancellation_method: type: - 'null' - string cancel_at_end_of_period: type: - boolean - 'null' canceled_at: type: - 'null' - string current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: - 'null' - string payment_collection_method: type: string snap_day: type: 'null' reason_code: type: 'null' receives_invoice_emails: type: boolean net_terms: type: integer customer: type: object properties: first_name: type: string last_name: type: string email: type: string cc_emails: type: string organization: type: string reference: type: 'null' id: type: integer created_at: type: string updated_at: type: string address: type: string address_2: type: string city: type: string state: type: string state_name: type: string zip: type: string country: type: string country_name: type: string phone: type: string verified: type: boolean portal_customer_created_at: type: string portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' tax_exempt: type: boolean vat_number: type: string product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' expiration_interval: type: 'null' expiration_interval_unit: type: string trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string initial_charge_after_trial: type: boolean return_params: type: string request_credit_card: type: boolean require_credit_card: type: boolean created_at: type: string updated_at: type: string archived_at: type: 'null' update_return_url: type: string update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string handle: type: string accounting_code: type: 'null' description: type: string public_signup_pages: type: array items: type: object properties: id: type: integer url: type: string taxable: type: boolean version_number: type: integer product_price_point_name: type: string credit_card: type: object properties: id: type: integer payment_type: type: string first_name: type: string last_name: type: string masked_card_number: type: - 'null' - string card_type: type: - 'null' - string expiration_month: type: - integer - 'null' expiration_year: type: - integer - 'null' billing_address: type: string billing_address_2: type: string billing_city: type: string billing_state: type: - 'null' - string billing_country: type: string billing_zip: type: string current_vault: type: string vault_token: type: string customer_vault_token: type: 'null' customer_id: type: integer payment_type: type: string referral_code: type: string next_product_id: type: 'null' coupon_use_count: type: - integer - 'null' coupon_uses_allowed: type: - integer - 'null' next_product_handle: type: - string - 'null' stored_credential_transaction_id: type: - integer - 'null' on_hold_at: type: - string - 'null' scheduled_cancellation_at: type: string prepaid_dunning: type: boolean reference: type: string examples: application/json: - subscription: id: 15236915 state: active balance_in_cents: 0 total_revenue_in_cents: 14000 product_price_in_cents: 1000 product_version_number: 7 current_period_ends_at: '2016-11-15T14:48:10-05:00' next_assessment_at: '2016-11-15T14:48:10-05:00' trial_started_at: null trial_ended_at: null activated_at: '2016-11-14T14:48:12-05:00' expires_at: null created_at: '2016-11-14T14:48:10-05:00' updated_at: '2016-11-14T15:24:41-05:00' cancellation_message: null cancellation_method: null cancel_at_end_of_period: null canceled_at: null current_period_started_at: '2016-11-14T14:48:10-05:00' previous_state: active signup_payment_id: 162269766 signup_revenue: '260.00' delayed_cancel_at: null coupon_code: 5SNN6HFK3GBH payment_collection_method: automatic snap_day: null reason_code: null receives_invoice_emails: false net_terms: 0 customer: first_name: Curtis last_name: Test email: curtis@example.com cc_emails: jeff@example.com organization: '' reference: null id: 14714298 created_at: '2016-11-14T14:48:10-05:00' updated_at: '2016-11-14T14:48:13-05:00' address: 123 Anywhere Street address_2: '' city: Boulder state: CO zip: '80302' country: US phone: '' verified: false portal_customer_created_at: '2016-11-14T14:48:13-05:00' portal_invite_last_sent_at: '2016-11-14T14:48:13-05:00' portal_invite_last_accepted_at: null tax_exempt: false vat_number: 012345678 product: id: 3792003 name: $10 Basic Plan handle: basic description: lorem ipsum accounting_code: basic price_in_cents: 1000 interval: 1 interval_unit: day initial_charge_in_cents: null expiration_interval: null expiration_interval_unit: never trial_price_in_cents: null trial_interval: null trial_interval_unit: month initial_charge_after_trial: false return_params: '' request_credit_card: false require_credit_card: false created_at: '2016-03-24T13:38:39-04:00' updated_at: '2016-11-03T13:03:05-04:00' archived_at: null update_return_url: '' update_return_params: '' product_family: id: 527890 name: Acme Projects handle: billing-plans accounting_code: null description: '' public_signup_pages: - id: 281054 url: 'https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic' - id: 281240 url: 'https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic' - id: 282694 url: 'https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic' taxable: false version_number: 7 product_price_point_name: Default credit_card: id: 10191713 payment_type: credit_card first_name: Curtis last_name: Test masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2026 billing_address: 123 Anywhere Street billing_address_2: '' billing_city: Boulder billing_state: null billing_country: '' billing_zip: '80302' current_vault: bogus vault_token: '1' customer_vault_token: null customer_id: 14714298 payment_type: credit_card referral_code: w7kjc9 next_product_id: null coupon_use_count: 1 coupon_uses_allowed: 1 stored_credential_transaction_id: 166411599220288 on_hold_at: null scheduled_cancellation_at: '2016-11-14T14:48:13-05:00' security: - <>: [] x-stoplight: id: GET_subscriptions-subscription_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 put: operationId: PUT_subscriptions-subscription_id-format summary: Change Calendar Billing Day tags: - Subscription - incomplete - 'Subscriptions: Date Changes / Calendar Billing' description: |- ## Update Subscription: Regular Billing Day Change This payload will change the billing date to the specified date in your request. This will not set a new calendar billing (snap_day) date. This example below outlines the JSON payload to set a subscription's new billing date. After this billing date occurs, the next billing date for the subscription is relative to the recurring time period of the product subscribed to in Chargify. To update just the date of the next billing, pass the following payload: ``` { "subscription": { "next_billing_at": "2010-08-06T15:34:00Z" } } ``` Note that if you pass an invalid date, we will automatically interpret and set the correct date. For example, when February 30 is entered, the next billing will be set to March 2nd in a non-leap year. ## Update Subscription: Snap Day / Calendar Billing Day Change Use this method to change the snap day value for Calendar Billing. You can use this method to change the subscription to a different snap day by setting a new value for `snap_day`. The following example will set a `snap_day` for the 15th of the month ``` { "subscription": { "snap_day": "15" } } ``` The value of the snap day, can be a value between 1 - 28 or `end`. ## Snap Day Limitations Snap days can only be applied to subscriptions to monthly products. Snap days are not available at this time for annual products. If you change the snap day on an existing subscription, you can expect that the current `next_billing` date will remain unchanged. After the `next_billing` timestamp arrives, the subscription will then "snap" to the new `snap_date.` ## Server Response When you update the `next_billing` timestamp through the `PUT` method, the server response will not return data under the key/value pair of `next_billing`. Please view the key/value pair of `current_period_ends_at` to verify that the `next_billing` date has been changed successfully. ## Snap Day and Product Changes & Upgrade/Downgrades If you change the product associated with a subscription that contains a `snap_date`, if you immediately `READ/GET` the subscription data, it will still contain evidence of the existing `snap_date`. This is due to the fact that a product change is instantanous and only affects the product associated with a subscription. After the `next_billing` date arrives, the `snap_day` associated with the subscription will return to `null.` Another way of looking at this is that you willl have to wait for the next billing cycle to arrive before the `snap_date` will reset to `null. parameters: - name: body in: body schema: $ref: '#/definitions/subscriptions-update-subscription-billing-day-change-request' example: subscription: next_billing_at: '2028-12-15' responses: '200': description: OK schema: $ref: '#/definitions/subscription-read-subscription' examples: application/json: - subscription: id: 16474328 state: active trial_started_at: null trial_ended_at: null activated_at: '2017-02-20T18:28:48-05:00' created_at: '2017-02-20T18:28:47-05:00' updated_at: '2017-02-22T09:58:07-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2017-03-20T19:28:47-04:00' next_assessment_at: '2017-03-20T19:28:47-04:00' canceled_at: null cancellation_message: null next_product_id: 4442358 cancel_at_end_of_period: false payment_collection_method: automatic snap_day: end cancellation_method: null current_period_started_at: '2017-02-20T18:28:47-05:00' previous_state: active signup_payment_id: 174876340 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 0 product_version_number: 1 payment_type: credit_card referral_code: ww6mq5 coupon_use_count: null coupon_uses_allowed: null receives_invoice_emails: false customer: id: 15102905 first_name: Amelia last_name: Example organization: '' email: joe.blow@example.com created_at: '2016-12-15T09:33:15-05:00' updated_at: '2016-12-15T09:34:09-05:00' reference: null address: '' address_2: '' city: '' state: '' zip: '' country: '' phone: '' portal_invite_last_sent_at: null portal_invite_last_accepted_at: null verified: null portal_customer_created_at: '2016-12-15T09:33:21-05:00' cc_emails: null tax_exempt: false vat_number: 012345678 product: id: 4461042 name: Zero Dollar Product handle: zero-dollar-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-02-20T18:28:18-05:00' updated_at: '2017-02-20T18:28:18-05:00' price_in_cents: 0 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 986840 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: - id: 312984 return_url: null return_params: '' url: 'https://general-goods.chargify.com/subscribe/yt4ybcgk7998/zero-dollar-product' credit_card: id: 10548239 first_name: Amelia last_name: Example masked_card_number: XXXX-XXXX-XXXX-2 card_type: bogus expiration_month: 2 expiration_year: 2017 customer_id: 15102905 current_vault: bogus vault_token: '2' billing_address: '' billing_city: '' billing_state: '' billing_zip: '' billing_country: '' customer_vault_token: null billing_address_2: '' payment_type: credit_card '422': description: Unprocessable Entity security: - <>: [] x-stoplight: id: PUT_subscriptions-subscription_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 delete: operationId: DELETE_subscriptions-subscription_id-format summary: Cancel Subscription tags: - Subscription - incomplete - 'Subscriptions: Cancellations' description: "## Cancel Subscription\n\nThe DELETE action causes the cancellation of the Subscription. This means, the method sets the Subscription state to \"canceled\".\n\nThere are no required parameters. Optionally, you can use the `cancellation_message` field to note the reason for cancellation. `cancellation_message` note will be stored with the Subscription.\n\nThe response returns the Subscription object with the canceled state: `\"state\": \"canceled\",` or `canceled`. The `canceled_at` field records the timestamp of the most recent cancellation.\n\n## Cancel Subscription \n\nAdd the following key/value pairs to the DELETE request when cancelling a subscription.\n\n| cancellation_message | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to make a note about the reason for cancellation. |\n|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| reason_code | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled. |\n\n## Cancel Subscription with Reason Code\n\nIf you'd like to cancel a subscription and add a reason/churn code, use the following JSON:\n\n```\n{\n\t\"subscription\": {\n\t\t\"reason_code\": \"CODE\"\n\t}\n}\n```" parameters: - name: body in: body schema: $ref: '#/definitions/subscriptions-cancel-subscription-request' responses: '200': description: OK schema: $ref: '#/definitions/subscription-read-subscription' examples: application/json: subscription: id: 15254809 state: canceled trial_started_at: null trial_ended_at: null activated_at: '2016-11-15T15:33:44-05:00' created_at: '2016-11-15T15:33:44-05:00' updated_at: '2016-11-15T17:13:06-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2017-08-29T12:00:00-04:00' next_assessment_at: '2017-08-29T12:00:00-04:00' canceled_at: '2016-11-15T17:13:06-05:00' cancellation_message: Canceling the subscription via the API next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: merchant_api current_period_started_at: '2016-11-15T15:33:44-05:00' previous_state: active signup_payment_id: 0 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 1000 product_version_number: 7 payment_type: credit_card referral_code: tg8qbq coupon_use_count: null coupon_uses_allowed: null customer: id: 14731081 first_name: John last_name: Doe organization: Acme Widgets email: john.doe@example.com created_at: '2016-11-15T15:33:44-05:00' updated_at: '2016-11-15T15:33:45-05:00' reference: '123' address: null address_2: null city: null state: null zip: null country: null phone: null portal_invite_last_sent_at: '2016-11-15T15:33:45-05:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2016-11-15T15:33:45-05:00' cc_emails: null product: id: 3792003 name: $10 Basic Plan handle: basic description: lorem ipsum accounting_code: basic request_credit_card: false expiration_interval: null expiration_interval_unit: never created_at: '2016-03-24T13:38:39-04:00' updated_at: '2016-11-03T13:03:05-04:00' price_in_cents: 1000 interval: 1 interval_unit: day initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 7 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 281054 return_url: 'http://www.example.com?successfulsignup' return_params: '' url: 'https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic' - id: 281240 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic' - id: 282694 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic' credit_card: id: 10202898 first_name: John last_name: Doe masked_card_number: XXXX-XXXX-XXXX-1111 card_type: visa expiration_month: 12 expiration_year: 2020 customer_id: 14731081 current_vault: authorizenet vault_token: '12345' billing_address: null billing_city: null billing_state: null billing_zip: null billing_country: null customer_vault_token: '67890' billing_address_2: null payment_type: credit_card '404': description: '' '422': description: '' schema: type: object properties: error: type: array items: type: string examples: application/json: errors: - The subscription is already canceled security: - <>: [] x-stoplight: id: DELETE_subscriptions-subscription_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /subscriptions/lookup.json: get: operationId: GET_subscriptions-lookup-reference-format summary: Find Subscription tags: - Subscriptions parameters: - name: reference in: query required: true type: string responses: '200': description: '' schema: $ref: '#/definitions/subscription-read-subscription' security: - <>: [] x-stoplight: id: GET_subscriptions-lookup-reference-format beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/payment_profiles/{payment_profile_id}/change_payment_profile.json': parameters: - name: subscription_id in: path required: true type: string - name: payment_profile_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-payment_profiles-payment_profile_id-change_payment_profile-json summary: Change Default Payment Profile tags: - Subscriptions description: |- ## Change Default Payment Profile for Subscription This will change the default payment profile on the subscription to the existing payment profile with the id specified. You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. responses: '201': description: '' schema: $ref: '#/definitions/subscriptions-change-default-payment-profile-response' examples: application/json: payment_profile: id: 10211899 first_name: Amelia last_name: Example masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 2 expiration_year: 2018 customer_id: 14399371 current_vault: bogus vault_token: '1' billing_address: '' billing_city: '' billing_state: '' billing_zip: '' billing_country: '' customer_vault_token: null billing_address_2: '' payment_type: credit_card '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - This is already the current payment profile security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-paymentprofiles-paymentprofileid-changepaymentprofilejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/purge.json': parameters: - name: subscription_id in: path required: true type: integer post: operationId: POST_subscriptions-subscription_id-purge-json summary: Purge Subscription tags: - Subscriptions description: |- For sites in test mode, you may purge individual subscriptions. Provide the subscription ID in the url. To confirm, supply the customer ID in the query string `ack` parameter. You may also delete the customer record and/or payment profiles by passing `cascade` parameters. For example, to delete just the customer record, the query params would be: `?ack={customer_id}&cascade[]=customer` If you need to remove subscriptions from a live site, please contact support to discuss your use case. ### Delete customer and payment profile The query params will be: `?ack={customer_id}&cascade[]=customer&cascade[]=payment_profile` parameters: - name: ack in: query required: true type: integer - name: cascade in: query description: Options are "customer" or "payment_profile" required: false type: array items: type: string responses: '200': description: '' '400': description: '' security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-purgejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/delayed_cancel.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-delayed_cancel-json summary: Initiate Delayed Cancellation tags: - 'Subscriptions: Cancellations' description: "## Delayed Cancel\nChargify offers the ability to cancel a subscription at the end of the current billing period. This period is set by its current product.\n\nRequesting to cancel the subscription at the end of the period sets the `cancel_at_end_of_period` flag to true.\n\nNote that you cannot set `cancel_at_end_of_period` at subscription creation, or if the subscription is past due.\n\n## Delayed Cancel with Reason Code\n\nIf you'd like to cancel a subscription using the delayed cancellation method, and add a reason/churn code, use the following JSON:\n\n```\n{\n\t\"subscription\": {\n\t\t\"cancellation_message\": \"Switching providers\",\n\t\t\"reason_code\": \"CODE\"\n\t}\n}\n```" consumes: - application/xml produces: - application/xml responses: '200': description: '' security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-delayedcanceljson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_subscriptions-subscription_id-delayed_cancel-json summary: Cancel Delayed Cancellation tags: - 'Subscriptions: Cancellations' description: |- ## Remove Delayed Cancel Removing the delayed cancellation on a subscription will ensure that it doesn't get canceled at the end of the period that it is in. The request will reset the `cancel_at_end_of_period` flag to `false`. This endpoint is idempotent. If the subscription was not set to cancel in the future, removing the delayed cancellation has no effect and the call will be successful. consumes: - application/xml responses: '200': description: '' examples: application/json: subscription: id: 18220670 state: active trial_started_at: null trial_ended_at: null activated_at: '2017-06-27T13:45:15-05:00' created_at: '2017-06-27T13:45:13-05:00' updated_at: '2017-06-30T09:26:50-05:00' expires_at: null balance_in_cents: 10000 current_period_ends_at: '2017-06-30T12:00:00-05:00' next_assessment_at: '2017-06-30T12:00:00-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: end cancellation_method: null current_period_started_at: '2017-06-27T13:45:13-05:00' previous_state: active signup_payment_id: 191819284 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 0 product_version_number: 1 payment_type: null referral_code: d3pw7f coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: null current_billing_amount_in_cents: 10000 customer: id: 17780587 first_name: Catie last_name: Test organization: 'Acme, Inc.' email: catie@example.com created_at: '2017-06-27T13:01:05-05:00' updated_at: '2017-06-30T09:23:10-05:00' reference: 123ABC address: 123 Anywhere Street address_2: 'Apartment #10' city: Los Angeles state: CA zip: '90210' country: US phone: 555-555-5555 portal_invite_last_sent_at: '2017-06-27T13:45:16-05:00' portal_invite_last_accepted_at: null verified: true portal_customer_created_at: '2017-06-27T13:01:08-05:00' cc_emails: support@example.com tax_exempt: true product: id: 4470347 name: Zero Dollar Product handle: zero-dollar-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-03-23T10:54:12-05:00' updated_at: '2017-04-20T15:18:46-05:00' price_in_cents: 0 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 997233 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: - id: 316810 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product' '404': description: '' security: - <>: [] x-stoplight: id: DELETE_subscriptions-subscriptionid-delayedcanceljson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/cancel_dunning.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-cancel_dunning-json summary: Cancel Dunning tags: - 'Subscriptions: Cancel Dunning' description: |- ## Cancel Subscription Dunning If a subscription is currently in dunning, the subscription will be set to active and the active Dunner will be resolved. responses: '200': description: '' schema: $ref: '#/definitions/subscription-read-subscription' x-stoplight: id: POST_subscriptions-subscriptionid-canceldunningjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/charges.json': parameters: - name: subscription_id in: path required: true type: integer post: operationId: POST_subscriptions-subscription_id-charges-json summary: Create a charge tags: - 'Subscriptions: Charges' description: |- ## Create a charge Creating a charge requires a valid, live subscription. The subscription must be referenced by `subscription_id` (available via the API when subscriptions are read or listed – more). A payment in the amount of the assessed charge is automatically captured from the credit card on file for the subscription. This endpoint is only available for Statement-based sites. It is not available for sites using Relationship Invoicing. ## Limitations of attribute combinations When you add a charge to an existing subscription, you may only use the following combinations of attributes: + `delay_capture` = true OR + `delay_capture` = false + `accrue_on_failure` = false OR + `delay_capture` = false + `accrue_on_failure` = true You may not use the following combination of attributes: + `delay_capture` = true + `accrue_on_failure` = true parameters: - name: body in: body schema: $ref: '#/definitions/charges-create-a-charge-request-post' example: charge: memo: Amount collected amount: '10.00' accrue_on_failure: 'false' delay_capture: 'True' taxable: 'true' period_range_start: '2019-03-01 ' period_range_end: '2019-03-01 ' responses: '201': description: '' schema: $ref: '#/definitions/charges-create-a-charge-response-post' examples: application/json: charge: id: 281946395 subscription_id: 25157645 type: Charge kind: one_time transaction_type: charge success: true amount_in_cents: 1000 memo: Amount collected created_at: '2019-01-10T14:05:55-06:00' starting_balance_in_cents: 10000 ending_balance_in_cents: 11000 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 281946397 product_id: 4535641 tax_id: null component_id: null statement_id: 133557427 customer_id: 24926300 item_name: Monthly product COUPON API TEST period_range_start: null period_range_end: null original_amount_in_cents: 1000 discount_amount_in_cents: 0 taxable_amount_in_cents: 1000 price_point_id: null price_point_handle: null taxations: - tax_id: null tax_charge_id: 281946396 tax_name: TX Tax rate: '0.0825' tax_amount_in_cents: 83 tax_rules: - tax_rule_id: null country_code: US subdivision_code: TX rate: '0.0625' tax_amount_in_cents: 63 description: TX STATE TAX - TEXAS - tax_rule_id: null country_code: US subdivision_code: TX rate: '0.02' tax_amount_in_cents: 20 description: TX CITY TAX - AUSTIN '404': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'Memo: cannot be blank.' - 'Amount: is not a number.' security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-chargesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/add_coupon.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: number post: operationId: POST_subscriptions-subscription_id-add_coupon-format?code=coupon_code summary: Add the Coupon to an Existing Subscription tags: - Coupon - incomplete - 'Subscriptions: Coupons' description: |- ## Add the Coupon to an existing Subscription If the coupon is successfully applied, the subscription object will be returned. Otherwise, the "Coupon is invalid" error will be returned. `/subscriptions/9709/add_coupon.json?code=EARLYBIRD` ## Coupon Application Warning Sending this request will overwrite all (single and multiple) coupons previously applied to the subscription. If you want to apply stackable coupons, **remove** any coupons you have and use [request with 'codes' parameter](#endpoint:DbA9MDLykDkNbYCaJ). parameters: - name: code in: query required: true type: string responses: '200': description: OK schema: $ref: '#/definitions/coupon-add-coupon-to-subscription-output' examples: application/json: subscription: id: 50 state: active trial_started_at: null trial_ended_at: null activated_at: '2017-11-01T04:17:47-04:00' created_at: '2017-11-01T04:17:46-04:00' updated_at: '2017-11-08T09:17:44-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2017-12-01T03:17:46-05:00' next_assessment_at: '2017-12-01T03:17:46-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2017-11-01T04:17:46-04:00' previous_state: active signup_payment_id: 109 signup_revenue: '10.00' delayed_cancel_at: null coupon_code: ABC123 total_revenue_in_cents: 1000 product_price_in_cents: 1000 product_version_number: 1 payment_type: credit_card referral_code: null coupon_use_count: 0 coupon_uses_allowed: 1 reason_code: null automatically_resume_at: null coupon_codes: - ABC123 customer: id: 50 first_name: Fred last_name: Jones organization: '' email: fred@jones.com created_at: '2017-11-01T04:17:46-04:00' updated_at: '2017-11-01T04:17:46-04:00' reference: null address: '' address_2: '' city: '' state: '' zip: '' country: '' phone: '' portal_invite_last_sent_at: null portal_invite_last_accepted_at: null verified: false portal_customer_created_at: null cc_emails: null tax_exempt: false product: id: 97 name: User-friendly systemic matrices handle: handle_1d382acd0 description: Fugiat quis mollitia. Ex et sunt sed qui. Facilis qui et sequi laudantium quos autem eos. accounting_code: null request_credit_card: true expiration_interval: null expiration_interval_unit: null created_at: '2017-09-13T12:45:35-04:00' updated_at: '2017-09-13T12:45:35-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: null archived_at: null require_credit_card: true return_params: null taxable: false update_return_url: null tax_code: null initial_charge_after_trial: false version_number: 1 update_return_params: null product_family: id: 4 name: Acme Online description: null handle: acme-online accounting_code: null public_signup_pages: [] credit_card: id: 36 first_name: Fred last_name: Jones masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2025 customer_id: 50 current_vault: bogus vault_token: '1' billing_address: '' billing_city: '' billing_state: AL billing_zip: '' billing_country: US customer_vault_token: null billing_address_2: '' payment_type: credit_card '422': description: '' examples: application/json: codes: - 'Coupon Codes: Subscription already has a non-stackable coupon.' subscription: - Coupon is invalid. security: - <>: [] x-stoplight: id: POST_subscriptions-subscription_id-add_coupon-format?code=coupon_code beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/remove_coupon.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: number delete: operationId: DELETE_subscriptions-subscription_id-remove_coupon-format summary: Remove the Coupon from the Subscription tags: - Coupon - incomplete - 'Subscriptions: Coupons' description: |- ## Remove the Coupon from the Subscription Response If the Coupon is successfully removed, the string will be returned. ```Coupon succesfully removed``` Otherwise, the "422 Unprocessable Entity" error will be returned. ## Documentation For more information on the expected behaviour of removing a coupon from a subscription, please see our documentation [here.](https://help.chargify.com/subscriptions/coupons.html#removing-a-coupon) parameters: - name: coupon_code in: query description: The Coupon code. required: true type: string responses: '422': description: Unprocessable Entity examples: application/json: subscription: - There's no coupon applied to this subscription x-stoplight: id: DELETE_subscriptions-subscription_id-remove_coupon-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/group.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-group-json summary: Add Subscription to Group tags: - 'Subscriptions: Hierarchies / WhoPays' description: |- ## Add Subscription to Group For sites making use of the [Relationship Billing](https://help.chargify.com/invoices/index.html) and [Customer Hierarchy](https://help.chargify.com/relationship-invoicing/customer-hierarchies-whopays.html) features, it is possible to add existing subscriptions to subscription groups. Passing `group` parameters with a `target` containing a `type` and optional `id` is all that's needed. When the `target` parameter specifies a `"customer"` or `"subscription"` that is already part of a hierarchy, the subscription will become a member of the customer's subscription group. If the target customer or subscription is not part of a subscription group, a new group will be created and the subscription will become part of the group with the specified target customer set as the responsible payer for the group's subscriptions. Rather than specifying a customer, the `target` parameter could instead simply have a value of * `"self"` which indicates the subscription will be paid for not by some other customer, but by the subscribing customer, * `"parent"` which indicates the subscription will be paid for by the subscribing customer's parent within a customer hierarchy, or * `"eldest"` which indicates the subscription will be paid for by the root-level customer in the subscribing customer's hierarchy. The optional `billing` parameters specify how some aspects of the billing for the new subscription should be handled. Rather than capturing payment immediately, the `accrue` parameter can be included so that the new subscription charges accrue until the next assessment date. Regarding the date, the `align_date` parameter can be included so that the billing date of the new subscription matches up with the default subscription group in the customer hierarchy. When choosing to align the dates, the `prorate` parameter can also be specified so that the new subscription charges are prorated based on the billing period of the default subscription group in the customer hierarchy also. ### Group Attributes | target | Attributes of the target customer who will be the responsible payer of the created subscription. Required. | |---------|-------------------------------------------------------------------------------------------------------------| | billing | Optional attributes related to billing date and accrual. | #### Group Target Attributes | type | The type of object indicated by the `id` attribute. Only `"customer"`, `"subscription"`, `"self"`, `"parent"`, or `"eldest"` are accepted for adding a subscription to a subscription group. Required. | |------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | The id of the target customer or subscription to group the existing subscription with. Ignored and should not be included if type is `"self"` , `"parent"`, or `"eldest"` | #### Group Billing Attributes | accrue | (Optional, default false) A flag indicating whether or not to accrue charges on the new subscription. | |------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | align_date | (Optional, default false) A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be `true` if `prorate` is also `true`. | | prorate | (Optional, default false) A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of `true` is ignored unless `align_date` is also `true`. | --------- parameters: - name: body in: body schema: $ref: '#/definitions/subscription-add-group-request' example: group: target: type: subscription id: '32987' billing: accrue: true align_date: true prorate: true responses: '200': description: '' schema: $ref: '#/definitions/subscription-add-group' examples: application/json: subscription_group: customer_id: 130690 payment_profile: id: 32055 first_name: Marty last_name: McFly masked_card_number: XXXX-XXXX-XXXX-1111 subscription_ids: - 32988 - 33060 - 32986 created_at: '2018-08-30T17:14:30-04:00' security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-groupjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 delete: operationId: DELETE_subscriptions-subscription_id-group-json summary: Remove Subscription from Group tags: - Subscription - 'Subscriptions: Hierarchies / WhoPays' description: |- ## Remove Subscription from Group For sites making use of the [Relationship Billing](https://help.chargify.com/invoices/index.html) and [Customer Hierarchy](https://help.chargify.com/relationship-invoicing/customer-hierarchies-whopays.html) features, it is possible to remove existing subscription from subscription group. responses: '204': description: '' '404': description: '' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - You can not remove primary subscription when there are others in group security: - <>: [] x-stoplight: id: DELETE_subscriptions-subscriptionid-groupjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/resume.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-resume-json summary: Resume Subscription tags: - 'Subscriptions: Hold / Resume' description: |- ## Resume Subscription Resume a paused (on-hold) subscription. If the normal next renewal date has not passed, the subscription will return to active and will renew on that date. Otherwise, it will behave like a reactivation, setting the billing date to 'now' and charging the subscriber. parameters: - $ref: '#/parameters/trait:calendarBillingTrait:calendar_billing[''resumption_charge'']' responses: '200': description: '' schema: $ref: '#/definitions/subscription-read-subscription' examples: application/json: subscription: id: 18220670 state: active trial_started_at: null trial_ended_at: null activated_at: '2017-06-27T13:45:15-05:00' created_at: '2017-06-27T13:45:13-05:00' updated_at: '2017-06-30T09:26:50-05:00' expires_at: null balance_in_cents: 10000 current_period_ends_at: '2017-06-30T12:00:00-05:00' next_assessment_at: '2017-06-30T12:00:00-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: end cancellation_method: null current_period_started_at: '2017-06-27T13:45:13-05:00' previous_state: active signup_payment_id: 191819284 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 0 product_version_number: 1 payment_type: null referral_code: d3pw7f coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: null current_billing_amount_in_cents: 10000 customer: id: 17780587 first_name: Catie last_name: Test organization: 'Acme, Inc.' email: catie@example.com created_at: '2017-06-27T13:01:05-05:00' updated_at: '2017-06-30T09:23:10-05:00' reference: 123ABC address: 123 Anywhere Street address_2: 'Apartment #10' city: Los Angeles state: CA zip: '90210' country: US phone: 555-555-5555 portal_invite_last_sent_at: '2017-06-27T13:45:16-05:00' portal_invite_last_accepted_at: null verified: true portal_customer_created_at: '2017-06-27T13:01:08-05:00' cc_emails: support@example.com tax_exempt: true product: id: 4470347 name: Zero Dollar Product handle: zero-dollar-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-03-23T10:54:12-05:00' updated_at: '2017-04-20T15:18:46-05:00' price_in_cents: 0 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 997233 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: - id: 316810 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product' security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-resumejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/hold.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-hold-json summary: Hold (Pause) Subscription tags: - 'Subscriptions: Hold / Resume' description: |- ## Pause Subscription This will place the subscription in the on_hold state and it will not renew. ## Limitations You may not place a subscription on hold if the `next_billing` date is within 24 hours. parameters: - name: body in: body schema: $ref: '#/definitions/subscriptions-hold-subscription-request' example: hold: automatically_resume_at: '2017-05-25T11:25:00Z' responses: '200': description: '' schema: $ref: '#/definitions/subscription-read-subscription' examples: application/json: subscription: id: 18220670 state: on-hold trial_started_at: null trial_ended_at: null activated_at: '2017-06-27T13:45:15-05:00' created_at: '2017-06-27T13:45:13-05:00' updated_at: '2017-06-30T09:26:50-05:00' expires_at: null balance_in_cents: 10000 current_period_ends_at: '2017-06-30T12:00:00-05:00' next_assessment_at: '2017-06-30T12:00:00-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: end cancellation_method: null current_period_started_at: '2017-06-27T13:45:13-05:00' previous_state: active signup_payment_id: 191819284 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 0 product_version_number: 1 payment_type: null referral_code: d3pw7f coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: null current_billing_amount_in_cents: 10000 customer: id: 17780587 first_name: Catie last_name: Test organization: 'Acme, Inc.' email: catie@example.com created_at: '2017-06-27T13:01:05-05:00' updated_at: '2017-06-30T09:23:10-05:00' reference: 123ABC address: 123 Anywhere Street address_2: 'Apartment #10' city: Los Angeles state: CA zip: '90210' country: US phone: 555-555-5555 portal_invite_last_sent_at: '2017-06-27T13:45:16-05:00' portal_invite_last_accepted_at: null verified: true portal_customer_created_at: '2017-06-27T13:01:08-05:00' cc_emails: support@example.com tax_exempt: true product: id: 4470347 name: Zero Dollar Product handle: zero-dollar-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-03-23T10:54:12-05:00' updated_at: '2017-04-20T15:18:46-05:00' price_in_cents: 0 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 997233 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: - id: 316810 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - This subscription is not eligible to be put on hold. security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-holdjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 put: operationId: PUT_subscriptions-subscription_id-hold-json summary: Update On-Hold Subscription Attributes tags: - 'Subscriptions: Hold / Resume' description: |- ## Update On-Hold Subscription Attributes To update a subscription's resume date, use this method to change or update the `automatically_resume_at` date. ### Remove the resume date Alternately, you can change the `automatically_resume_at` to `null` if you would like the subscription to not have a resume date. parameters: - name: body in: body schema: $ref: '#/definitions/update-on-hold-subscriptions-input' example: hold: automatically_resume_at: '2019-01-20' responses: '200': description: '' schema: $ref: '#/definitions/update-on-hold-subscriptions-output' examples: application/json: subscription: id: 20359140 state: on_hold trial_started_at: null trial_ended_at: null activated_at: '2018-01-05T17:15:50-06:00' created_at: '2018-01-05T17:15:49-06:00' updated_at: '2018-01-09T10:26:14-06:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2023-01-05T17:15:00-06:00' next_assessment_at: '2023-01-05T17:15:00-06:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2018-01-05T17:15:49-06:00' previous_state: active signup_payment_id: 219829722 signup_revenue: '100.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 10009991 product_price_in_cents: 10000 product_version_number: 1 payment_type: credit_card referral_code: 8y7jqr coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: '2019-01-20T00:00:00-06:00' coupon_codes: [] customer: id: 19948683 first_name: Vanessa last_name: Test organization: '' email: vanessa@example.com created_at: '2018-01-05T17:15:49-06:00' updated_at: '2018-01-05T17:15:51-06:00' reference: null address: 123 Anywhere Ln address_2: '' city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 portal_invite_last_sent_at: '2018-01-05T17:15:51-06:00' portal_invite_last_accepted_at: null verified: null portal_customer_created_at: '2018-01-05T17:15:51-06:00' cc_emails: null tax_exempt: false product: id: 4535643 name: Annual Product handle: annual-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-08-25T10:25:31-05:00' updated_at: '2017-08-25T10:25:31-05:00' price_in_cents: 10000 interval: 12 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 1025627 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: [] credit_card: id: 13826563 first_name: Bomb 3 last_name: Test masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2028 customer_id: 19948683 current_vault: bogus vault_token: '1' billing_address: 123 Anywhere Lane billing_city: Boston billing_state: Ma billing_zip: '02120' billing_country: US customer_vault_token: null billing_address_2: '' payment_type: credit_card security: - <>: [] x-stoplight: id: PUT_subscriptions-subscriptionid-holdjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/invoices.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-invoices-json summary: Create an Invoice tags: - 'Subscriptions: Invoices' description: |- **Note:** This functionality is only available to sites with Relationship Invoicing. ## Create an Invoice This endpoint will allow you to create an ad-hoc, remittance invoice. ### Basic Behavior You can create a basic invoice by sending an array of line items to this endpoint. Each line item, at a minimum, must include a title, a quantity and a unit price. Example: ``` { "invoice": { "line_items": [ { "title": "A Product", "quantity": 12, "unit_price": "150.00" } ] } } ``` The price for each line item will be calculated as well as a total due amount for the invoice. Multiple line items can be sent. ### Line Item Options #### Period Date Range A custom period date range can be defined for each line item with the `period_range_start` and `period_range_end` parameters. Dates must be sent in the `YYYY-MM-DD` format. #### Taxes The `taxable` parameter can be sent as `true` if taxes should be calculated for a specific line item. For this to work, the site should be configured to use and calculate taxes. Further, if the site uses Avalara for tax calculations, a `tax_code` parameter should also be sent. ### Invoice Options #### Issue Date By default, invoices will be created with a issue date set to today. `issue_date` parameter can be send to alter that. Only dates in the past can be send. `issue_date` should be send in `YYYY-MM-DD` format. #### Net Terms By default, invoices will be created with a due date matching the date of invoice creation. If a different due date is desired, the `net_terms` parameter can be sent indicating the number of days in advance the due date should be. #### Addresses The seller, shipping and billing addresses can be sent to override the site's defaults. Each address requires to send a `first_name` at a minimum in order to work. Please see below for the details on which parameters can be sent for each address object. #### Memo and Payment Instructions A custom memo can be sent with the `memo` parameter to override the site's default. Likewise, custom payment instructions can be sent with the `payment_instrucions` parameter. parameters: - name: body in: body schema: type: object properties: invoice: type: object properties: line_items: type: array items: type: object properties: title: type: string quantity: type: integer unit_price: type: string taxable: type: boolean tax_code: type: string period_range_start: type: string period_range_end: type: string issue_date: type: string net_terms: type: integer payment_instructions: type: string memo: type: string seller_address: type: object properties: first_name: type: string last_name: type: string phone: type: string address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string billing_address: type: object properties: first_name: type: string last_name: type: string phone: type: string address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string shipping_address: type: object properties: first_name: type: string last_name: type: string phone: type: string address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string example: invoice: line_items: - title: Some product quantity: 12 unit_price: '150.00' taxable: true tax_code: P0000000 period_range_start: '2020-11-20' period_range_end: '2020-11-25' net_terms: 2 payment_instructions: PAY ME memo: Thank you for your business! seller_address: first_name: Homer last_name: Simpson phone: 123-456-7890 address: 135 Merry Ave. address_2: 'Apt. #2' city: Springfield state: MO zip: '12345' country: US billing_address: first_name: Homer last_name: Simpson phone: 123-456-7890 address: 4220 Lower Roswell Rd address_2: '220' city: Marietta state: GA zip: 30068-4126 country: US shipping_address: first_name: Homer last_name: Simpson phone: 123-456-7890 address: 4220 Lower Roswell Rd address_2: '220' city: Marietta state: GA zip: 30068-4126 country: US responses: '201': description: '' schema: type: object properties: invoice: type: object properties: uid: type: string site_id: type: integer customer_id: type: integer subscription_id: type: integer number: type: string sequence_number: type: integer issue_date: type: string due_date: type: string paid_date: type: 'null' status: type: string collection_method: type: string payment_instructions: type: string currency: type: string consolidation_level: type: string parent_invoice_uid: type: 'null' parent_invoice_number: type: 'null' group_primary_subscription_id: type: 'null' product_name: type: string product_family_name: type: string role: type: string seller: type: object properties: name: type: string address: type: object properties: street: type: 'null' line2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: string customer: type: object properties: chargify_id: type: integer first_name: type: string last_name: type: string organization: type: 'null' email: type: string vat_number: type: 'null' reference: type: 'null' memo: type: string billing_address: type: object properties: street: type: 'null' line2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' shipping_address: type: object properties: street: type: 'null' line2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' subtotal_amount: type: string discount_amount: type: string tax_amount: type: string total_amount: type: string credit_amount: type: string paid_amount: type: string refund_amount: type: string due_amount: type: string line_items: type: array items: type: object properties: uid: type: string title: type: string description: type: string quantity: type: string unit_price: type: string subtotal_amount: type: string discount_amount: type: string tax_amount: type: string total_amount: type: string tiered_unit_price: type: boolean period_range_start: type: string period_range_end: type: string product_id: type: 'null' product_version: type: 'null' product_price_point_id: type: 'null' component_id: type: 'null' price_point_id: type: 'null' discounts: type: array items: type: object taxes: type: array items: type: object credits: type: array items: type: object payments: type: array items: type: object refunds: type: array items: type: object custom_fields: type: array items: type: object public_url: type: string examples: application/json: invoice: uid: inv_98nbmb93gxjz8 site_id: 5 customer_id: 13 subscription_id: 17 number: '1' sequence_number: 1 issue_date: '2020-12-02' due_date: '2020-12-02' paid_date: null status: open collection_method: remittance payment_instructions: '' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Digitized discrete initiative product_family_name: Networked bottom-line orchestration role: adhoc seller: name: 'Steuber, West and Hegmann 1' address: street: null line2: null city: null state: null zip: null country: null phone: (766) 316-0492 customer: chargify_id: 13 first_name: Dean last_name: Adams organization: null email: brandi1@example.com vat_number: null reference: null memo: '' billing_address: street: null line2: null city: null state: null zip: null country: null shipping_address: street: null line2: null city: null state: null zip: null country: null subtotal_amount: '1800.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '1800.0' credit_amount: '0.0' paid_amount: '0.0' refund_amount: '0.0' due_amount: '1800.0' line_items: - uid: li_98nbmb9jgz84c title: Some product description: 12/02/2020 - 12/02/2020 quantity: '12.0' unit_price: '150.0' subtotal_amount: '1800.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '1800.0' tiered_unit_price: false period_range_start: '2020-12-02' period_range_end: '2020-12-02' product_id: null product_version: null product_price_point_id: null component_id: null price_point_id: null discounts: [] taxes: [] credits: [] payments: [] refunds: [] custom_fields: [] public_url: 'https://www.test-chargifypay.com/invoice/inv_98nbmb93gxjz8?token=rmfmwvbdy4xmyw5f29j5gc6x' '422': description: '' schema: type: object properties: errors: type: object examples: application/json: errors: {} security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-invoicesjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/retry.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: number put: operationId: PUT_subscriptions-subscription_id-retry-format summary: Retry Subscription tags: - Subscription - incomplete - 'Subscriptions: Payment Methods / Retries / Balance Reset' description: |- ## Retry a Subscription Chargify offers the ability to retry collecting the balance due on a past due Subscription without waiting for the next scheduled attempt. ## Successful Reactivation The response will be `200 OK` with the updated Subscription. ## Failed Reactivation The response will be `422 "Unprocessable Entity`. responses: '200': description: OK schema: $ref: '#/definitions/subscription-read-subscription' examples: application/json: - subscription: id: 18220670 state: active trial_started_at: null trial_ended_at: null activated_at: '2017-06-27T13:45:15-05:00' created_at: '2017-06-27T13:45:13-05:00' updated_at: '2017-06-30T09:26:50-05:00' expires_at: null balance_in_cents: 10000 current_period_ends_at: '2017-06-30T12:00:00-05:00' next_assessment_at: '2017-06-30T12:00:00-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: end cancellation_method: null current_period_started_at: '2017-06-27T13:45:13-05:00' previous_state: active signup_payment_id: 191819284 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 0 product_version_number: 1 payment_type: null referral_code: d3pw7f coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: null current_billing_amount_in_cents: 10000 customer: id: 17780587 first_name: Catie last_name: Test organization: 'Acme, Inc.' email: catie@example.com created_at: '2017-06-27T13:01:05-05:00' updated_at: '2017-06-30T09:23:10-05:00' reference: 123ABC address: 123 Anywhere Street address_2: 'Apartment #10' city: Los Angeles state: CA zip: '90210' country: US phone: 555-555-5555 portal_invite_last_sent_at: '2017-06-27T13:45:16-05:00' portal_invite_last_accepted_at: null verified: true portal_customer_created_at: '2017-06-27T13:01:08-05:00' cc_emails: support@example.com tax_exempt: true vat_number: 012345678 product: id: 4470347 name: Zero Dollar Product handle: zero-dollar-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-03-23T10:54:12-05:00' updated_at: '2017-04-20T15:18:46-05:00' price_in_cents: 0 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 997233 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: - id: 316810 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product' '422': description: '' schema: type: object properties: errors: type: array items: type: object examples: application/json: errors: [] security: - <>: [] x-stoplight: id: PUT_subscriptions-subscription_id-retry-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/reset_balance.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: number put: operationId: PUT_subscriptions-subscription_id-reset_balance-xml summary: Reset Subscription Balance (Legacy) tags: - Subscription - incomplete - 'Subscriptions: Payment Methods / Retries / Balance Reset' description: |- ## Reset a Subscription Balance If you are on the legacy architecture, Chargify offers the ability to reset the balance of a subscription to zero. If you are using the modern Relationship Invoicing feature, see the [corresponding invoicing docs](#endpoint:fS5WvuG5ByqjTzG6C). Attempting to use this endpoint on a Relationship Invoicing site will not work. In order to reduce the balance of a subscription, please void or apply a service credit directly to an invoice. If a Subscription has a positive balance, this API call will issue a credit to the Subscription for the outstanding balance. This is particularly helpful if you want to reactivate a canceled Subscription without charging the Customer for their previously owed balance. ## Past Due & Unpaid Subscriptions If you have a subscription that is in the `past_due` or `unpaid` state, when you reset the balance, the subscription will transition to `active`. responses: '200': description: OK schema: $ref: '#/definitions/subscription-read-subscription' examples: application/json: subscription: id: 18220670 state: active trial_started_at: null trial_ended_at: null activated_at: '2017-06-27T13:45:15-05:00' created_at: '2017-06-27T13:45:13-05:00' updated_at: '2017-06-30T09:26:50-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2017-06-30T12:00:00-05:00' next_assessment_at: '2017-06-30T12:00:00-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: end cancellation_method: null current_period_started_at: '2017-06-27T13:45:13-05:00' previous_state: active signup_payment_id: 191819284 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 0 product_version_number: 1 payment_type: null referral_code: d3pw7f coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: null current_billing_amount_in_cents: 10000 customer: id: 17780587 first_name: Catie last_name: Test organization: 'Acme, Inc.' email: catie@example.com created_at: '2017-06-27T13:01:05-05:00' updated_at: '2017-06-30T09:23:10-05:00' reference: 123ABC address: 123 Anywhere Street address_2: 'Apartment #10' city: Los Angeles state: CA zip: '90210' country: US phone: 555-555-5555 portal_invite_last_sent_at: '2017-06-27T13:45:16-05:00' portal_invite_last_accepted_at: null verified: true portal_customer_created_at: '2017-06-27T13:01:08-05:00' cc_emails: support@example.com tax_exempt: true vat_number: 012345678 product: id: 4470347 name: Zero Dollar Product handle: zero-dollar-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-03-23T10:54:12-05:00' updated_at: '2017-04-20T15:18:46-05:00' price_in_cents: 0 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 997233 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: - id: 316810 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/69x825m78v3d/zero-dollar-product' security: - <>: [] x-stoplight: id: PUT_subscriptions-subscription_id-reset_balance-xml beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/prepaid_configurations.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-prepaid_configurations-json summary: Update Prepaid Subscription Configuration Request tags: - 'Subscriptions: Prepaid Subscriptions' parameters: - name: body in: body schema: type: object properties: prepaid_configuration: $ref: '#/definitions/prepaid-subscription-configuration' example: prepaid_configuration: initial_funding_amount_in_cents: 50000 replenish_to_amount_in_cents: 50000 auto_replenish: true replenish_threshold_amount_in_cents: 10000 responses: '201': description: '' schema: type: object properties: prepaid_configuration: type: object properties: id: type: integer initial_funding_amount_in_cents: type: integer auto_replenish: type: boolean replenish_to_amount_in_cents: type: integer replenish_threshold_amount_in_cents: type: integer examples: application/json: prepaid_configuration: id: 55 initial_funding_amount_in_cents: 2500 auto_replenish: true replenish_to_amount_in_cents: 50000 replenish_threshold_amount_in_cents: 10000 security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-prepaidconfigurationsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /subscriptions/preview.json: post: operationId: POST_subscriptions-preview-json summary: Create Subscription Preview - Component Price Points tags: - 'Subscriptions: Preview' description: |- ## Create Subscription Preview with Price Points This example **does not** use contact information to create a subscription preview. It's optional, bear in mind! If you do not use a `price_point_id` then the default price point will be used to calculate the preview amounts. parameters: - name: body in: body schema: $ref: '#/definitions/subscription-preview-price-point-id-request' example: subscription: product_handle: monthly-product components: - component_id: 462149 price_point_id: 200543 allocated_quantity: 10 responses: '200': description: '' schema: $ref: '#/definitions/subscription-preview-price-points-response' examples: application/json: subscription_preview: current_billing_manifest: line_items: - transaction_type: charge kind: baseline amount_in_cents: 5000 memo: Monthly product (02/05/2018 - 03/05/2018) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_id: 1780014 product_handle: monthly-product product_name: Monthly product - transaction_type: charge kind: component amount_in_cents: 20000 memo: 'HUNDO: 10 HUNDOs' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 462149 component_handle: hundo component_name: HUNDO total_in_cents: 25000 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 25000 start_date: '2018-02-05T19:36:55Z' end_date: '2018-03-05T19:36:55Z' period_type: recurring existing_balance_in_cents: 0 next_billing_manifest: line_items: - transaction_type: charge kind: baseline amount_in_cents: 5000 memo: Monthly product (03/05/2018 - 04/05/2018) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_id: 1780014 product_handle: monthly-product product_name: Monthly product - transaction_type: charge kind: component amount_in_cents: 20000 memo: 'HUNDO: 10 HUNDOs' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 462149 component_handle: hundo component_name: HUNDO total_in_cents: 25000 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 25000 start_date: '2018-03-05T19:36:55Z' end_date: '2018-04-05T19:36:55Z' period_type: recurring existing_balance_in_cents: 0 security: - <>: [] x-stoplight: id: POST_subscriptions-previewjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/migrations.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-migrations-json summary: Create Migration tags: - 'Subscriptions: Product Changes / Migrations / Upgrades / Downgrades' description: |- ## Create Migration In order to create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You may also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed the subscription will be moved to the products default price point. The response will be the updated subscription. ## Valid Subscriptions Subscriptions should be in the `active` or `trialing` state in order to be migrated. (For backwards compatibility reasons, it is possible to migrate a subscription that is in the `trial_ended` state via the API, however this is not recommended. Since `trial_ended` is an end-of-life state, the subscription should be canceled, the product changed, and then the subscription can be reactivated.) parameters: - name: body in: body schema: $ref: '#/definitions/migrations-create-migration-input' example: migration: product_id: 3801242 include_trial: false include_initial_charge: false include_coupons: true preserve_period: true responses: '200': description: '' schema: $ref: '#/definitions/migrations-create-migration-input' examples: application/json: subscription: id: 15054201 state: trialing trial_started_at: '2016-11-03T13:43:36-04:00' trial_ended_at: '2016-11-10T12:43:36-05:00' activated_at: '2016-11-02T10:20:57-04:00' created_at: '2016-11-02T10:20:55-04:00' updated_at: '2016-11-03T13:43:36-04:00' expires_at: null balance_in_cents: -13989 current_period_ends_at: '2016-11-10T12:43:36-05:00' next_assessment_at: '2016-11-10T12:43:36-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2016-11-03T13:43:35-04:00' previous_state: active signup_payment_id: 160680121 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 14000 product_price_in_cents: 1000 product_version_number: 6 payment_type: credit_card referral_code: ghnhvy coupon_use_count: null coupon_uses_allowed: null customer: id: 14543792 first_name: Frankie last_name: Test organization: null email: testfrankie111@test.com created_at: '2016-11-02T10:20:55-04:00' updated_at: '2016-11-02T10:20:58-04:00' reference: null address: null address_2: null city: null state: null zip: null country: null phone: '5555551212' portal_invite_last_sent_at: '2016-11-02T10:20:58-04:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2016-11-02T10:20:58-04:00' cc_emails: null product: id: 3861800 name: Trial Product handle: trial-product description: Trial period with payment expected at end of trial. accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-07-08T09:53:55-04:00' updated_at: '2016-09-05T13:00:36-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: 0 trial_interval: 7 trial_interval_unit: day archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 6 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 294791 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/xv52yrcc3byx/trial-product' credit_card: id: 10088716 first_name: F last_name: NB masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2017 customer_id: 14543792 current_vault: bogus vault_token: '1' billing_address: 123 Montana Way billing_city: Billings billing_state: MT billing_zip: '59101' billing_country: US customer_vault_token: null billing_address_2: Apt. 10 payment_type: credit_card '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Invalid Product security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-migrationsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/migrations/preview.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-migrations-preview-json summary: Create Preview of Product Migration tags: - 'Subscriptions: Product Changes / Migrations / Upgrades / Downgrades' description: |- ## Preview Migration Required Parameters: `product_id` or `product_handle` Optional Parameters: `product_price_point_id` or `product_price_point_handle` Response: Calculated migration values: | prorated_adjustment_in_cents | Integer, The amount of the prorated adjustment that would be issued for the current subscription. | |------------------------------|---------------------------------------------------------------------------------------------------| | charge_in_cents | Integer, The amount of the charge that would be created for the new product. | | payment_due_in_cents | Integer, The amount of the payment due in the case of an upgrade. | | credit_applied_in_cents | Integer, The amount of the credit that would be left in the case of a | ### Previewing a future date It is also possible to preview the migration for a date in the future, as long as it's still within the subscription's current billing period, by passing a `proration_date` along with the request (eg: `"proration_date": "2020-12-18T18:25:43.511Z"`). This will calculate the prorated adjustment, charge, payment and credit applied values assuming the migration is done at that date in the future as opposed to right now. parameters: - name: body in: body schema: $ref: '#/definitions/preview-migration-input' example: migration: product_id: 3801242 include_trial: false include_initial_charge: false include_coupons: true preserve_period: true proration_date: '2020-12-18T18:25:43.511Z' responses: '200': description: '' schema: $ref: '#/definitions/migrations-preview-migration-output' examples: application/json: migration: prorated_adjustment_in_cents: 0 charge_in_cents: 5000 payment_due_in_cents: 0 credit_applied_in_cents: 0 '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Subscription must be active security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-migrations-previewjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/override.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: number put: operationId: PUT_subscriptions-subscription_id-override-format summary: Subscription Override tags: - Subscription Override - 'Subscriptions: Override' description: |- ## Subscriptions Override Responses ### Successful – 204 No Content On a successful update, a `204` HTTP response is sent along with no body. You can assume the update was successful, and fetch the subscription again if needed. ``` HTTP/1.1 204 No Content Cache-Control: no-cache Connection: keep-alive Date: Tue, 03 Nov 2015 21:40:48 GMT Status: 204 No Content ``` ### Invalid Current Period Starts At - 422 Unprocessable Entity When passing `current_period_starts_at` some validations are made: 1) The subscription needs to be unbilled (no statements or invoices). 2) The value passed must be a valid date/time. 3) The value passed must be before the current date/time. If you don't meet the above requirements, you will receive a 422 response and can run into the following errors: ``` "error":"Current period starts at: can only be updated if subscription has no statements or invoices" "error":"Current period starts at: must be a valid date/time" "error":"Current period starts at: must be before current date and time" ``` ### Unpermitted Parameters – 400 Bad Request If unpermitted parameters are sent, a `400` HTTP response is sent along with a string giving the reason for the problem, e.g. ``` Unpermitted paramters in request: created_at ``` Note: this will be changing to a JSON or XML response in the near future. parameters: - name: body in: body schema: $ref: '#/definitions/subscriptions-subscription-override-request' example: subscription: activated_at: '1999-12-01' canceled_at: '2000-12-31' cancellation_message: Original cancellation in 2000 expires_at: '2001-07-15' responses: '204': description: No Content examples: application/json: subscription: activated_at: '1999-12-01' canceled_at: '2000-12-31' cancellation_message: Original cancellation in 2000 expires_at: '2001-07-15' security: - <>: [] x-stoplight: id: PUT_subscriptions-subscription_id-override-format beforeScript: null afterScript: null public: true mock: statusCode: 200 enabled: false '/subscriptions/{subscription_id}/prepayments.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-prepayments-json summary: Create Prepayment tags: - Subscription - Payment - 'Subscriptions: Prepayments' description: |- ## Create Prepayment In order to specify a prepayment made against a subcription, specify the `amount, memo, details, method`. When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions. Please note that you **can't** pass `amount_in_cents`. ``` { "prepayment": { "amount": 10.00, "details": "Dire Straits - Money for nothing", "memo": "Signup for $10", "method": "check" } } ``` parameters: - name: body in: body schema: type: object properties: prepayment: type: object required: - amount - details - memo - method properties: amount: type: integer minimum: 1 details: type: string memo: type: string method: type: string enum: '[check","cash","money_order","ach","paypal_account","credit_card_on_file","other"]' payment_profile_id: type: integer required: - prepayment example: prepayment: amount: 100 details: John Doe signup for $100 memo: Signup for $100 method: check responses: '200': description: '' schema: type: object properties: prepayment: type: object properties: id: type: integer subscription_id: type: integer amount_in_cents: type: integer memo: type: string created_at: type: string format: date-time starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer examples: application/json: prepayment: id: 1 subscription_id: 1 amount_in_cents: 10000 memo: John Doe - Prepayment created_at: '2020-07-31T05:52:32-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: -10000 security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-prepaymentsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/reactivate.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: number put: operationId: PUT_subscriptions-subscription_id-reactivate-json summary: Canceled Subscription While Preserving Balance tags: - 'Subscriptions: Reactivations' description: |- ## Reactivating Canceled Subscription While Preserving Balance + Given you have a product that costs $20 + Given you have a canceled subscription to the $20 product + 1 charge should exist for $20 + 1 payment should exist for $20 + When the subscription has canceled due to dunning, it retained a negative balance of $20 ### Results The resulting charges upon reactivation will be: + 1 charge for $20 for the new product + 1 charge for $20 for the balance due + Total charges = $40 + The subscription will transition to active + The subscription balance will be zero responses: '200': description: '' schema: $ref: '#/definitions/subscription-read-subscription' x-stoplight: id: PUT_subscriptions-subscriptionid-reactivatejson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/refunds.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-refunds-json summary: Create an External Refund (Legacy) tags: - 'Subscriptions: Refunds (Legacy)' description: |- ## Create an External Refund Use the following method to record an external refund within Chargify. Please note the existence of the following object. ``` "external": 1 ``` This addition to the payload categorizes this refund as **external**. parameters: - name: body in: body schema: $ref: '#/definitions/refunds-external-create-an-external-refund-request' example: refund: amount: 20 memo: 'Refunded with check# 123' external: 1 responses: '201': description: '' schema: $ref: '#/definitions/refunds-external-create-an-external-refund-response' examples: application/json: refund: id: 162275149 subscription_id: 15236915 type: Refund kind: manual transaction_type: refund success: true amount_in_cents: 2000 memo: 'Refunded with check# 123' created_at: '2016-11-14T15:24:41-05:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 80500632 customer_id: 14714298 security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-refundsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/renewals/preview.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-renewals-preview-json summary: Renewal Preview tags: - incomplete - 'Subscriptions: Renewal Preview' description: "## Renewal Preview\n\nThe Chargify API allows you to preview a renewal by posting to the renewals endpoint. \n\n## Renewal Input Fields\n\nThe input request body is entirely optional. If provided, current components and quantities will be ignored, and only the ones in the request body will be included in the preview.\n\nIf no body is provided, current components and quantity values will be used.\n\n**Example _optional_ request body for previewing certain components at certain quantities:**\n\n```json\n{\n \"components\": [\n {\n\t\t\t\"component_id\": 10708,\n\t\t\t\"quantity\": 10000\n\t\t},\n\t\t{\n\t\t\t\"component_id\": \"handle:small-instance-hours\",\n\t\t\t\"quantity\": 10000,\n\t\t\t\"price_point_id\": 8712\n\t\t},\n\t\t{\n\t\t\t\"component_id\": \"handle:large-instance-hours\",\n\t\t\t\"quantity\": 100,\n\t\t\t\"price_point_id\": \"handle:startup-pricing\"\n\t\t}\n\n ]\n}\n```\n\n## Renewal Output Fields\n\nIn the server response you will recieve an array of allocation objects with the following fields:\n\n| next_assessment_at | The timestamp for the subscription’s next renewal |\n|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| existing_balance_in_cents | An integer representing the amount of the subscription’s current balance |\n| subtotal_in_cents | An integer representing the amount of the total pre-tax, pre-discount charges that will be assessed at the next renewal |\n| total_discount_in_cents | An integer representing the amount of the coupon discounts that will be applied to the next renewal |\n| total_tax_in_cents | An integer representing the total tax charges that will be assessed at the next renewal |\n| total_in_cents | An integer representing the total amount owed, less any discounts, that will be assessed at the next renewal |\n| total_amount_due_in_cents | An integer representing the existing_balance_in_cents plus the total_in_cents |\n| uncalculated_taxes | A boolean indicating whether or not additional taxes will be calculated at the time of renewal. This will be true if you are using Avalara and the address of the subscription is in one of your defined taxable regions. |\n| line_items | An array of objects representing the individual transactions that will be created at the next renewal |" parameters: - name: body in: body schema: type: object properties: components: type: array description: 'An optional array of component definitions to preview. Providing any component definitions here will override the actual components on the subscription (and their quantities), and the billing preview will contain _only_ these components (in addition to any product base fees).' items: type: object properties: component_id: type: - string - integer description: |- The component to include in the preview, identified by either its official Chargify ID _or_ its handle. If providing a handle, you must specify the value as a string prepended by `handle:`. Example: ``` "component_id": "handle:server-hours" ``` If identifying the component by official Chargify ID, you may specify the numeric value either as an integer or a string. Example: ``` "component_id": 12345 // OR "component_id": "12345" ``` quantity: type: integer description: | The quantity for which you wish to preview billing. This is useful if you want to preview a predicted, higher usage value than is currently present on the subscription. This quantity represents: * Whether or not an on/off component is enabled - use `0` for disabled or `1` for enabled * The desired `allocated_quantity` for a quantity-based component * The desired `unit_balance` for a metered component * The desired metric quantity for an events-based component price_point_id: type: - string - integer description: |- An optional identifier for the price point to use in computing the billing preview. This value may be provided either as an official Chargify ID or the price point's handle. If no value is provided, the subscription's current price point for the component is used (which may be the default price point if none has been specified on the subscription). If providing a handle, you must specify the value as a string prepended by `handle:`. Example: ``` "price_point_id": "handle:startup-pricing" ``` If identifying the price point by official Chargify ID, you may specify the numeric value either as an integer or a string. Example: ``` "component_id": 12345 // OR "component_id": "12345" ``` required: - component_id - quantity responses: '200': description: '' schema: type: object properties: renewal_preview: type: object properties: next_assessment_at: type: string subtotal_in_cents: type: integer total_tax_in_cents: type: integer total_discount_in_cents: type: integer total_in_cents: type: integer existing_balance_in_cents: type: integer total_amount_due_in_cents: type: integer uncalculated_taxes: type: boolean line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer product_id: type: integer component_id: type: integer component_handle: type: string component_name: type: string product_handle: type: string examples: application/json: renewal_preview: next_assessment_at: '2017-03-13T12:50:55-04:00' subtotal_in_cents: 6000 total_tax_in_cents: 0 total_discount_in_cents: 0 total_in_cents: 6000 existing_balance_in_cents: 0 total_amount_due_in_cents: 6000 uncalculated_taxes: false line_items: - transaction_type: charge kind: baseline amount_in_cents: 5000 memo: Gold Product (03/13/2017 - 04/13/2017) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_id: 1 product_handle: gold-product product_name: Gold Product - transaction_type: charge kind: quantity_based_component amount_in_cents: 1000 memo: 'Quantity Component: 10 Quantity Components' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 104 component_handle: quantity-component component_name: Quantity Component security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-renewals-previewjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/service_credits.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-service_credits-json summary: Issue Service Credit tags: - 'Subscriptions: Service Credits' description: |- ## Issue Service Credit Credit can be issued for a subscription identified by the `subscription_id`. Credit will be added to the subscription in the amount specified in the request body. The credit is subsequently applied to the next generated invoice. A successful POST will respond with 201 HTTP status and an empty response body. parameters: - name: body in: body schema: type: object properties: service_credit: $ref: '#/definitions/service-credit-post' example: service_credit: amount: '1' memo: Courtesy credit responses: '201': description: '' schema: type: string security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-servicecreditsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/subscriptions/{subscription_id}/service_credit_deductions.json': parameters: - name: subscription_id in: path required: true type: string post: operationId: POST_subscriptions-subscription_id-service_credit_deductions-json summary: Deduct Service Credit tags: - 'Subscriptions: Service Credits' description: |- Credit can be deducted for a subscription identified by the `subscription_id`. Credit will be removed from the subscription in the amount specified in the request body. The credit amount being deducted must be equal to or less than the current credit balance. A successful POST will respond with 201 HTTP status and an empty response body. parameters: - name: body in: body schema: type: object properties: deduction: type: object properties: amount: type: string memo: type: string example: deduction: amount: '1' memo: Deduction responses: '201': description: '' schema: type: object '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Amount cannot exceed current service credit account balance. security: - <>: [] x-stoplight: id: POST_subscriptions-subscriptionid-servicecreditdeductionsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /transactions.json: get: operationId: GET_transactions-format summary: Read Transactions for a Site tags: - Transactions description: |- ## Read Transactions for a Site This method will return the full list of transactions for a Site. Pay close attention to filters and pagination in order to control results. **Notes about ID/Date Filters** - Using `since_id` and/or `max_id` is known as creating an “ID Filter”. - Using `since_date` and/or `until_date` is known as creating a “Date Filter”. - You may ONLY make use of either an ID Filter or a Date Filter in any one request. - If you specify both an ID Filter and a Date Filter, the Date Filter will be ignored. **Pagination Notes** Stepping through pages of results by incrementing the page number is typically less performant than using an ID Filter with `since_id`, especially at high values of page. For example, instead of these successive requests to traverse pagination: GET /transactions.json?page=1&per_page=200 GET /transactions.json?page=2&per_page=200 It is usually faster to use `since_id` to continue fetching from the last ID you observed: GET /transactions.json?since_id=0&per_page=200&direction=asc GET /transactions.json?since_id=1567&per_page=200&direction=asc In the above example, 1567 is derived by adding 1 to the “last” ID you received from the first request. parameters: - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' - $ref: '#/parameters/trait:txnKinds:kinds' - $ref: '#/parameters/trait:txnSinceId:since_id' - $ref: '#/parameters/trait:txnMaxId:max_id' - $ref: '#/parameters/trait:txnSinceDate:since_date' - $ref: '#/parameters/trait:txnUntilDate:until_date' - $ref: '#/parameters/trait:txnDirection:direction' - $ref: '#/parameters/trait:txnOrderBy:order_by' responses: '200': description: OK schema: type: array items: $ref: '#/definitions/transactions-transaction-response' examples: application/json: - transaction: id: 162640678 subscription_id: 15268262 type: Payment kind: null transaction_type: payment success: true amount_in_cents: 1000 memo: 'Pookie Test - $10 Basic Plan: Renewal payment' created_at: '2016-11-17T14:03:14-05:00' starting_balance_in_cents: 1000 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 80669157 customer_id: 14743839 item_name: null parent_id: null role: null card_number: XXXX-XXXX-XXXX-1 card_expiration: 10/2020 card_type: bogus refunded_amount_in_cents: 0 - transaction: id: 162640676 subscription_id: 15268319 type: Payment kind: null transaction_type: payment success: true amount_in_cents: 2000 memo: 'Pookie Test - $10 Basic Plan: Renewal payment' created_at: '2016-11-17T14:03:14-05:00' starting_balance_in_cents: 2000 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 80669162 customer_id: 14743895 item_name: null parent_id: null role: null card_number: XXXX-XXXX-XXXX-1 card_expiration: 10/2020 card_type: bogus refunded_amount_in_cents: 0 '404': description: '' schema: type: object description: Transaction does not exist security: - <>: [] x-stoplight: id: GET_transactions-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/transactions/{transaction_id}.json': parameters: - name: transaction_id in: path description: The Transaction ID. required: true type: string get: operationId: GET_transaction_id-format summary: Read Transaction by ID tags: - incomplete - Transactions description: |- ## List transaction by ID Given that you have a valid transaction ID, you can retrieve its full details. parameters: - name: gateway_response in: query description: optionally include the response from the gateway if the transaction is a payment type: boolean default: false - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' responses: '200': description: OK schema: $ref: '#/definitions/transactions-transaction-response' examples: application/json: transaction: id: 237759849 subscription_id: 21607180 type: Payment kind: one_time transaction_type: payment success: true amount_in_cents: 10000 memo: 'Payment for: 123' created_at: '2018-04-24T16:48:19-05:00' starting_balance_in_cents: 10000 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 4610619 tax_id: null component_id: null statement_id: 113513284 customer_id: 21259051 item_name: null parent_id: null role: null card_number: XXXX-XXXX-XXXX-1 card_expiration: 01/2028 card_type: bogus refunded_amount_in_cents: 0 '404': description: Not Found schema: type: object description: Transaction does not exist security: - <>: [] x-stoplight: id: GET_transaction_id-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 '/subscriptions/{subscription_id}/transactions.json': parameters: - name: subscription_id in: path description: The Subscription ID. required: true type: string get: operationId: GET_subscriptions-subscription_id-transactions-format summary: Read Transactions for a Subscription tags: - incomplete - Transactions description: |- ## List Transactions for a Subscription. Given that you have subscriber's ID, you can retrieve a list of transactions associated with the subscription. The sort order is based on the `created_at` timestamp and cannot be changed. parameters: - $ref: '#/parameters/trait:pagination20:page' - $ref: '#/parameters/trait:pagination20:per_page' - $ref: '#/parameters/trait:txnKinds:kinds' - $ref: '#/parameters/trait:txnSinceId:since_id' - $ref: '#/parameters/trait:txnMaxId:max_id' - $ref: '#/parameters/trait:txnSinceDate:since_date' - $ref: '#/parameters/trait:txnUntilDate:until_date' - $ref: '#/parameters/trait:txnDirection:direction' responses: '200': description: '' schema: type: array items: $ref: '#/definitions/transactions-transaction-response' examples: application/json: - transaction: id: 162640678 subscription_id: 15268262 type: Payment kind: null transaction_type: payment success: true amount_in_cents: 1000 memo: 'Amelia Example - $10 Basic Plan: Renewal payment' created_at: '2016-11-17T14:03:14-05:00' starting_balance_in_cents: 1000 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 80669157 customer_id: 14743839 item_name: null parent_id: null role: null card_number: XXXX-XXXX-XXXX-1 card_expiration: 10/2020 card_type: bogus refunded_amount_in_cents: 0 - transaction: id: 162640663 subscription_id: 15268262 type: Charge kind: baseline transaction_type: charge success: true amount_in_cents: 1000 memo: $10 Basic Plan (11/17/2016 - 11/18/2016) created_at: '2016-11-17T14:03:13-05:00' starting_balance_in_cents: 0 ending_balance_in_cents: 1000 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 162640678 product_id: 3792003 tax_id: null component_id: null statement_id: 80669157 customer_id: 14743839 item_name: $10 Basic Plan parent_id: null role: null original_amount_in_cents: 1000 discount_amount_in_cents: 0 taxable_amount_in_cents: null taxations: [] - transaction: id: 162520504 subscription_id: 15268262 type: Payment kind: null transaction_type: payment success: true amount_in_cents: 1000 memo: 'Amelia Example - $10 Basic Plan: Signup payment' created_at: '2016-11-16T13:47:44-05:00' starting_balance_in_cents: 1000 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 80612887 customer_id: 14743839 item_name: null parent_id: null role: null card_number: XXXX-XXXX-XXXX-1 card_expiration: 10/2020 card_type: bogus refunded_amount_in_cents: 0 - transaction: id: 162520501 subscription_id: 15268262 type: Charge kind: baseline transaction_type: charge success: true amount_in_cents: 1000 memo: $10 Basic Plan (11/16/2016 - 11/17/2016) created_at: '2016-11-16T13:47:43-05:00' starting_balance_in_cents: 0 ending_balance_in_cents: 1000 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 162520504 product_id: 3792003 tax_id: null component_id: null statement_id: 80612887 customer_id: 14743839 item_name: $10 Basic Plan parent_id: null role: null original_amount_in_cents: 1000 discount_amount_in_cents: 0 taxable_amount_in_cents: null taxations: [] '404': description: OK schema: type: object description: Transaction does not exist security: - <>: [] x-stoplight: id: GET_subscriptions-subscription_id-transactions-format beforeScript: null afterScript: null public: true mock: statusCode: 200 enabled: false /transactions/count.json: get: operationId: GET_transactions_count-format summary: Read the Count of Transactions for a Site tags: - Transaction - incomplete - Transactions description: |- ## Read the Count of Transactions for a Site This method returns the full count of transactions associated with a Site. responses: '200': description: OK schema: $ref: '#/definitions/count-transactions' examples: application/json: count: 290 '404': description: Not Found schema: type: object description: Transaction does not exist security: - <>: [] x-stoplight: id: GET_transactions_count-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /webhooks.json: get: operationId: GET_webhooks-format summary: Read Webhooks for a Site tags: - Webhook - incomplete - Webhooks description: |- ## List Webhooks for a Site This method allows you to fetch data about webhooks.You can pass query parameters if you want to filter webhooks. Click on examples tab to see more. parameters: - name: status in: query description: '' required: false type: string enum: - successful - failed - pending - paused - name: since_date in: query description: Format YYYY-MM-DD. Returns Webhooks with the `created_at date` greater than or equal to the one specified. required: true type: string - name: until_date in: query description: Format YYYY-MM-DD. Returns Webhooks with the `created_at` date less than or equal to the one specified. required: true type: string - name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The `page` parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a `page` parameter. Retrieve the next page by adding `?page=2` to the query string. If there are no results to return, then an empty result set will be returned.' required: false type: number - name: per_page in: query description: This parameter indicates how many records to fetch in each request. required: false type: number - name: order in: query description: 'The order in which the Webhooks are retured, either “newest_first” or “oldest_first”' required: true type: string - name: subscription in: query description: The ID of a subscription you'd like to filter for. required: false type: integer responses: '200': description: OK schema: $ref: '#/definitions/webhooks-list-webhook-output' examples: application/json: - webhook: event: statement_settled id: 141765032 created_at: '2016-11-08T16:22:26-05:00' last_error: 404 Resource Not Found (retry 5 of 5) last_error_at: '2016-11-08T16:43:54-05:00' accepted_at: null last_sent_at: '2016-11-08T16:43:54-05:00' last_sent_url: 'http://requestb.in/11u45x71' successful: false body: 'id=141765032&event=statement_settled&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][balance_in_cents]=0&payload[customer][id]=14585695&payload[customer][first_name]=Pookie&payload[customer][last_name]=Test&payload[customer][reference]=&payload[customer][organization]=&payload[customer][address]=&payload[customer][address_2]=&payload[customer][city]=&payload[customer][state]=&payload[customer][zip]=&payload[customer][country]=&payload[customer][email]=pookie999%40example.com&payload[customer][phone]=&payload[statement][closed_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][id]=80168049&payload[statement][opened_at]=2016-11-07%2016%3A22%3A15%20-0500&payload[statement][settled_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][subscription_id]=15100141&payload[statement][updated_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][starting_balance_in_cents]=0&payload[statement][ending_balance_in_cents]=0&payload[statement][total_in_cents]=6400&payload[statement][memo]=We%20thank%20you%20for%20your%20continued%20business!&payload[statement][events][0][id]=346956565&payload[statement][events][0][key]=renewal_success&payload[statement][events][0][message]=Successful%20renewal%20for%20Pookie%20Test''s%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][1][id]=346956579&payload[statement][events][1][key]=payment_success&payload[statement][events][1][message]=Successful%20payment%20of%20%2464.00%20for%20Pookie%20Test''s%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][2][id]=347299359&payload[statement][events][2][key]=renewal_success&payload[statement][events][2][message]=Successful%20renewal%20for%20Pookie%20Test''s%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][transactions][0][id]=161537343&payload[statement][transactions][0][subscription_id]=15100141&payload[statement][transactions][0][type]=Charge&payload[statement][transactions][0][kind]=baseline&payload[statement][transactions][0][transaction_type]=charge&payload[statement][transactions][0][success]=true&payload[statement][transactions][0][amount_in_cents]=1000&payload[statement][transactions][0][memo]=%2410%20Basic%20Plan%20(11%2F08%2F2016%20-%2011%2F09%2F2016)&payload[statement][transactions][0][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][0][starting_balance_in_cents]=0&payload[statement][transactions][0][ending_balance_in_cents]=1000&payload[statement][transactions][0][gateway_used]=&payload[statement][transactions][0][gateway_transaction_id]=&payload[statement][transactions][0][gateway_order_id]=&payload[statement][transactions][0][payment_id]=161537369&payload[statement][transactions][0][product_id]=3792003&payload[statement][transactions][0][tax_id]=&payload[statement][transactions][0][component_id]=&payload[statement][transactions][0][statement_id]=80168049&payload[statement][transactions][0][customer_id]=14585695&payload[statement][transactions][0][original_amount_in_cents]=&payload[statement][transactions][0][discount_amount_in_cents]=&payload[statement][transactions][0][taxable_amount_in_cents]=&payload[statement][transactions][1][id]=161537344&payload[statement][transactions][1][subscription_id]=15100141&payload[statement][transactions][1][type]=Charge&payload[statement][transactions][1][kind]=quantity_based_component&payload[statement][transactions][1][transaction_type]=charge&payload[statement][transactions][1][success]=true&payload[statement][transactions][1][amount_in_cents]=5400&payload[statement][transactions][1][memo]=Timesheet%20Users%3A%2018%20Timesheet%20Users&payload[statement][transactions][1][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][1][starting_balance_in_cents]=1000&payload[statement][transactions][1][ending_balance_in_cents]=6400&payload[statement][transactions][1][gateway_used]=&payload[statement][transactions][1][gateway_transaction_id]=&payload[statement][transactions][1][gateway_order_id]=&payload[statement][transactions][1][payment_id]=161537369&payload[statement][transactions][1][product_id]=3792003&payload[statement][transactions][1][tax_id]=&payload[statement][transactions][1][component_id]=277221&payload[statement][transactions][1][statement_id]=80168049&payload[statement][transactions][1][customer_id]=14585695&payload[statement][transactions][1][original_amount_in_cents]=&payload[statement][transactions][1][discount_amount_in_cents]=&payload[statement][transactions][1][taxable_amount_in_cents]=&payload[statement][transactions][2][id]=161537369&payload[statement][transactions][2][subscription_id]=15100141&payload[statement][transactions][2][type]=Payment&payload[statement][transactions][2][kind]=&payload[statement][transactions][2][transaction_type]=payment&payload[statement][transactions][2][success]=true&payload[statement][transactions][2][amount_in_cents]=6400&payload[statement][transactions][2][memo]=Pookie%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[statement][transactions][2][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][transactions][2][starting_balance_in_cents]=6400&payload[statement][transactions][2][ending_balance_in_cents]=0&payload[statement][transactions][2][gateway_used]=bogus&payload[statement][transactions][2][gateway_transaction_id]=53433&payload[statement][transactions][2][gateway_order_id]=&payload[statement][transactions][2][payment_id]=&payload[statement][transactions][2][product_id]=3792003&payload[statement][transactions][2][tax_id]=&payload[statement][transactions][2][component_id]=&payload[statement][transactions][2][statement_id]=80168049&payload[statement][transactions][2][customer_id]=14585695&payload[statement][transactions][2][card_number]=XXXX-XXXX-XXXX-1&payload[statement][transactions][2][card_expiration]=10%2F2020&payload[statement][transactions][2][card_type]=bogus&payload[statement][transactions][2][refunded_amount_in_cents]=0&payload[product][id]=3792003&payload[product][name]=%2410%20Basic%20Plan&payload[product_family][id]=527890&payload[product_family][name]=Acme%20Projects&payload[payment_profile][id]=10102821&payload[payment_profile][first_name]=Pookie&payload[payment_profile][last_name]=Test&payload[payment_profile][billing_address]=&payload[payment_profile][billing_address_2]=&payload[payment_profile][billing_city]=&payload[payment_profile][billing_country]=&payload[payment_profile][billing_state]=&payload[payment_profile][billing_zip]=&payload[event_id]=347299384' signature: 7c606ec4628ce75ec46e284097ce163a signature_hmac_sha_256: 40f25e83dd324508bb2149e3e525821922fb210535ebfbfa81e7ab951996b41d - webhook: event: payment_success id: 141765008 created_at: '2016-11-08T16:22:25-05:00' last_error: 404 Resource Not Found (retry 5 of 5) last_error_at: '2016-11-08T16:43:54-05:00' accepted_at: null last_sent_at: '2016-11-08T16:43:54-05:00' last_sent_url: 'http://requestb.in/11u45x71' successful: false body: 'id=141765008&event=payment_success&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][trial_started_at]=&payload[subscription][trial_ended_at]=&payload[subscription][activated_at]=2016-11-04%2017%3A06%3A43%20-0400&payload[subscription][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][updated_at]=2016-11-08%2016%3A22%3A22%20-0500&payload[subscription][expires_at]=&payload[subscription][balance_in_cents]=0&payload[subscription][current_period_ends_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][next_assessment_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][canceled_at]=&payload[subscription][cancellation_message]=&payload[subscription][next_product_id]=&payload[subscription][cancel_at_end_of_period]=false&payload[subscription][payment_collection_method]=automatic&payload[subscription][snap_day]=&payload[subscription][cancellation_method]=&payload[subscription][current_period_started_at]=2016-11-08%2016%3A06%3A42%20-0500&payload[subscription][previous_state]=active&payload[subscription][signup_payment_id]=161034048&payload[subscription][signup_revenue]=64.00&payload[subscription][delayed_cancel_at]=&payload[subscription][coupon_code]=&payload[subscription][total_revenue_in_cents]=32000&payload[subscription][product_price_in_cents]=1000&payload[subscription][product_version_number]=7&payload[subscription][payment_type]=credit_card&payload[subscription][referral_code]=pggn84&payload[subscription][coupon_use_count]=&payload[subscription][coupon_uses_allowed]=&payload[subscription][customer][id]=14585695&payload[subscription][customer][first_name]=Test&payload[subscription][customer][last_name]=Test&payload[subscription][customer][organization]=&payload[subscription][customer][email]=pookie999%40example.com&payload[subscription][customer][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][customer][updated_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][reference]=&payload[subscription][customer][address]=&payload[subscription][customer][address_2]=&payload[subscription][customer][city]=&payload[subscription][customer][state]=&payload[subscription][customer][zip]=&payload[subscription][customer][country]=&payload[subscription][customer][phone]=&payload[subscription][customer][portal_invite_last_sent_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][portal_invite_last_accepted_at]=&payload[subscription][customer][verified]=false&payload[subscription][customer][portal_customer_created_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][cc_emails]=&payload[subscription][product][id]=3792003&payload[subscription][product][name]=%2410%20Basic%20Plan&payload[subscription][product][handle]=basic&payload[subscription][product][description]=lorem%20ipsum&payload[subscription][product][accounting_code]=basic&payload[subscription][product][request_credit_card]=false&payload[subscription][product][expiration_interval]=&payload[subscription][product][expiration_interval_unit]=never&payload[subscription][product][created_at]=2016-03-24%2013%3A38%3A39%20-0400&payload[subscription][product][updated_at]=2016-11-03%2013%3A03%3A05%20-0400&payload[subscription][product][price_in_cents]=1000&payload[subscription][product][interval]=1&payload[subscription][product][interval_unit]=day&payload[subscription][product][initial_charge_in_cents]=&payload[subscription][product][trial_price_in_cents]=&payload[subscription][product][trial_interval]=&payload[subscription][product][trial_interval_unit]=month&payload[subscription][product][archived_at]=&payload[subscription][product][require_credit_card]=false&payload[subscription][product][return_params]=&payload[subscription][product][taxable]=false&payload[subscription][product][update_return_url]=&payload[subscription][product][initial_charge_after_trial]=false&payload[subscription][product][version_number]=7&payload[subscription][product][update_return_params]=&payload[subscription][product][product_family][id]=527890&payload[subscription][product][product_family][name]=Acme%20Projects&payload[subscription][product][product_family][description]=&payload[subscription][product][product_family][handle]=billing-plans&payload[subscription][product][product_family][accounting_code]=&payload[subscription][product][public_signup_pages][id]=281054&payload[subscription][product][public_signup_pages][return_url]=http%3A%2F%2Fwww.example.com%3Fsuccessfulsignup&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fkqvmfrbgd89q%2Fbasic&payload[subscription][product][public_signup_pages][id]=281240&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fdkffht5dxfd8%2Fbasic&payload[subscription][product][public_signup_pages][id]=282694&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fjwffwgdd95s8%2Fbasic&payload[subscription][credit_card][id]=10102821&payload[subscription][credit_card][first_name]=Pookie&payload[subscription][credit_card][last_name]=Test&payload[subscription][credit_card][masked_card_number]=XXXX-XXXX-XXXX-1&payload[subscription][credit_card][card_type]=bogus&payload[subscription][credit_card][expiration_month]=10&payload[subscription][credit_card][expiration_year]=2020&payload[subscription][credit_card][customer_id]=14585695&payload[subscription][credit_card][current_vault]=bogus&payload[subscription][credit_card][vault_token]=1&payload[subscription][credit_card][billing_address]=&payload[subscription][credit_card][billing_city]=&payload[subscription][credit_card][billing_state]=&payload[subscription][credit_card][billing_zip]=&payload[subscription][credit_card][billing_country]=&payload[subscription][credit_card][customer_vault_token]=&payload[subscription][credit_card][billing_address_2]=&payload[subscription][credit_card][payment_type]=credit_card&payload[transaction][id]=161537369&payload[transaction][subscription_id]=15100141&payload[transaction][type]=Payment&payload[transaction][kind]=&payload[transaction][transaction_type]=payment&payload[transaction][success]=true&payload[transaction][amount_in_cents]=6400&payload[transaction][memo]=Pookie%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[transaction][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[transaction][starting_balance_in_cents]=6400&payload[transaction][ending_balance_in_cents]=0&payload[transaction][gateway_used]=bogus&payload[transaction][gateway_transaction_id]=53433&payload[transaction][gateway_order_id]=&payload[transaction][payment_id]=&payload[transaction][product_id]=3792003&payload[transaction][tax_id]=&payload[transaction][component_id]=&payload[transaction][statement_id]=80168049&payload[transaction][customer_id]=14585695&payload[transaction][card_number]=XXXX-XXXX-XXXX-1&payload[transaction][card_expiration]=10%2F2020&payload[transaction][card_type]=bogus&payload[transaction][refunded_amount_in_cents]=0&payload[transaction][invoice_id]=&payload[event_id]=347299364' signature: fbcf2f6be579f9658cff90c4373e0ca2 signature_hmac_sha_256: db96654f5456c5460062feb944ac8bb1418f9d181ae04a8ed982fe9ffdca8de1 security: - <>: [] x-stoplight: id: GET_webhooks-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /webhooks/replay.json: post: operationId: POST_webhooks-replay-format summary: Replay Webhooks for Site tags: - Webhook - incomplete - Webhooks description: |- ## Replay Webhooks for Site Posting to the replay endpoint does not immediate resend the webhooks. They are added to a queue and will be sent as soon as possible, depending on available system resources. You may submit an array of up to 1000 webhook IDs to replay in the request. parameters: - name: body in: body schema: type: object properties: ids: type: array items: type: integer example: ids: - 123456789 - 123456788 responses: '200': description: OK schema: $ref: '#/definitions/webhooks-replay-webhooks-site' examples: application/json: status: ok security: - <>: [] x-stoplight: id: POST_webhooks-replay-format beforeScript: null afterScript: null public: true mock: enabled: false statusCode: 200 /endpoints.json: post: operationId: POST_endpoints-json summary: Create Endpoint for site tags: - Webhook - Webhooks description: |- ## Endpoint The Chargify API allows you to create an endpoint and assign a list of webhooks subscriptions (events) to it. You can check available events here. [Event keys](https://help.chargify.com/webhooks/webhooks-reference.html#example-payloads) parameters: - name: body in: body schema: type: object description: create endpoint properties: '': $ref: '#/definitions/endpoint-create-update-an-endpoint' example: endpoint: url: 'https://your.site/webhooks' webhook_subscriptions: - payment_success - payment_failure - name: Content-Type in: header required: true type: string default: '' enum: - application/json responses: '200': description: '' schema: type: object properties: endpoint: type: object properties: id: type: integer url: type: string site_id: type: integer status: type: string webhook_subscriptions: type: array items: type: string examples: application/json: endpoint: id: 1 url: 'https://your.site/webhooks' site_id: 1 status: enabled webhook_subscriptions: - payment_success - payment_failure '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - 'URL: invalid, only http and https supported' security: - <>: [] x-stoplight: id: POST_endpointsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 get: operationId: GET_endpoints-json summary: Read Endpoints for site tags: - Webhook - Webhooks description: |- ## List of endpoints for site This method returns created endpoints for site. responses: '200': description: '' schema: type: array items: type: object properties: id: type: integer url: type: string site_id: type: integer status: type: string webhook_subscriptions: type: array items: type: string examples: application/json: - id: 11 url: 'https://foobar.com/webhooks' site_id: 1 status: enabled webhook_subscriptions: - payment_success - payment_failure - id: 12 url: 'https:/example.com/webhooks' site_id: 1 status: enabled webhook_subscriptions: - payment_success - payment_failure - refund_failure security: - <>: [] x-stoplight: id: GET_endpointsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 '/endpoints/{endpoint_id}.json': parameters: - name: endpoint_id in: path required: true type: string get: operationId: GET_endpoints-endpoint_id-json summary: Update Endpoint for site tags: - Webhook - Webhooks description: |- ## Update an Endpoint You can update an Endpoint via the API with a PUT request to the resource endpoint. You can change the `url` of your endpoint which consumes webhooks or list of `webhook_subscriptions`. Check available [Event keys](https://help.chargify.com/webhooks/webhooks-reference.html). Always send a complete list of events which you want subscribe/watch. Sending an PUT request for existing endpoint with empty list of `webhook_subscriptions` will end with unsubscribe from all events. If you want unsubscribe from specific event jest send a list of `webhook_subscriptions` without the specific event key. parameters: - name: body in: body schema: type: object properties: endpoint: $ref: '#/definitions/endpoint-create-update-an-endpoint' example: endpoint: url: 'https://yout.site/webhooks/1/json.' webhook_subscriptions: - payment_failure - payment_success - refund_failure - name: Content-Type in: header required: true type: string enum: - application/json responses: '200': description: '' schema: type: object properties: endpoint: type: object properties: id: type: integer url: type: string site_id: type: integer status: type: string webhook_subscriptions: type: array items: type: string examples: application/json: endpoint: id: 1 url: 'https://yoursite.site/webhooks' site_id: 1 status: enabled webhook_subscriptions: - payment_success - payment_failure - refund_failure '404': description: '' schema: type: 'null' '422': description: '' schema: type: object properties: errors: type: array items: type: string examples: application/json: errors: - Event key is not valid - foobar security: - <>: [] x-stoplight: id: GET_endpoints-endpointidjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 /webhooks/settings.json: put: operationId: PUT_webhooks-settings-json summary: Enable Webhooks for site tags: - Webhook - Webhooks description: |- ## Enable webhooks for site This method allows you to enable webhooks via API for your site parameters: - name: body in: body schema: type: object properties: webhooks_enabled: type: boolean example: webhooks_enabled: true - name: Content-Type in: header description: application/json type: string enum: - application/json default: application/json responses: '200': description: '' schema: type: object properties: webhooks_enabled: type: boolean examples: application/json: webhooks_enabled: true security: - <>: [] x-stoplight: id: PUT_webhooks-settingsjson beforeScript: null afterScript: null public: true mock: enabled: false dynamic: false statusCode: 200 parameters: 'trait:pagination20:page': name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The `page` parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a `page` parameter. Retrieve the next page by adding `?page=2` to the query string. If there are no results to return, then an empty result set will be returned.' type: number default: '' 'trait:pagination20:per_page': name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any `per_page` value over 200 will be changed to 200. type: number default: '' maximum: 200 'trait:pathParameters:subscription_id': name: subscription_id in: query required: true type: string 'trait:pathParameters:format': name: format in: query required: true type: string 'trait:autoInvite:auto_invite': name: auto_invite in: query description: You must specify this value when sending an Invitation email at the same time as enabling Billing Portal. required: true type: integer 'trait:pagination50:page': name: page in: query description: 'Pass an integer in the page parameter via the query string to access subsequent pages of 50 transactions ' type: number default: '' 'trait:startdateEnddateQuery:start_date': name: start_date in: query description: YYYY-MM-DD type: string format: date 'trait:startdateEnddateQuery:end_date': name: end_date in: query description: YYYY-MM-DD type: string format: date 'trait:invoiceStatusQuery:status': name: status in: query type: string enum: - paid - unpaid - partial - archived 'trait:eventsBasicFilters:page': name: page in: query type: integer 'trait:eventsBasicFilters:per_page': name: per_page in: query type: integer 'trait:eventsBasicFilters:since_id': name: since_id in: query type: integer 'trait:eventsBasicFilters:max_id': name: max_id in: query type: integer 'trait:eventsBasicFilters:direction': name: direction in: query type: string default: desc enum: - 'asc, desc' 'trait:pagination30:page': name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The `page` parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a `page` parameter. Retrieve the next page by adding `?page=2` to the query string. If there are no results to return, then an empty result set will be returned.' type: integer 'trait:pagination30:per_page': name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any `per_page` value over 200 will be changed to 200. type: integer 'trait:metafieldsNameRequiredCurrentNameOptional:name': name: name in: query required: true type: string 'trait:metafieldsNameRequiredCurrentNameOptional:current_name': name: current_name in: query description: This only applies when you are updating an existing record and you wish to rename the field. Note you must supply name and current_name to rename the field required: false type: string 'trait:metafieldsNameOptional:name': name: name in: query type: string 'trait:componentParameters:since_id': name: since_id in: query description: Returns usages with an id greater than or equal to the one specified type: integer 'trait:componentParameters:max_id': name: max_id in: query description: Returns usages with an id less than or equal to the one specified type: integer 'trait:componentParameters:since_date': name: since_date in: query description: 'Returns usages with a `created_at` date greater than or equal to midnight (12:00 AM) on the date specified.' type: string format: date 'trait:componentParameters:until_date': name: until_date in: query description: ' Returns usages with a `created_at` date less than or equal to midnight (12:00 AM) on the date specified.' type: string format: date 'trait:componentParameters:page': name: page in: query description: The page number and number of results used for pagination. By default results are paginated 20 per page. type: string 'trait:componentParameters:per_page': name: per_page in: query description: The page number and number of results used for pagination. By default results are paginated 20 per page. type: string 'trait:metafieldsNameRequired:name': name: name in: query required: true type: string 'trait:txnSinceId:since_id': name: since_id in: query description: Returns transactions with an id greater than or equal to the one specified type: integer 'trait:txnKinds:kinds': name: kinds in: query description: 'An array of transaction types, see above. Example: http://example.chargify.com?kinds[]=charge&kinds[]=payment&kinds[]=credit' type: string 'trait:txnSinceDate:since_date': name: since_date in: query description: '(format YYYY-MM-DD) Returns transactions with a `created_at` timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:txnUntilDate:until_date': name: until_date in: query description: '(format YYYY-MM-DD) Returns transactions with a created_at timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:txnDirection:direction': name: direction in: query description: can be either asc for ascending or desc for descending order. (defaults to desc) The sort order is based on the created_at timestamp then id for transactions within the same second. type: string default: desc 'trait:txnOrderBy:order_by': name: order_by in: query description: 'Either `id` or `created_at`. Using an ID filter (`since_id`/`max_id`) will force id order, while using a Date filter (`since_date`/`until_date`) will force created_at order. Otherwise, your requested value will be used.' type: string 'trait:subscriptionQueryString:page': name: page in: query description: 'A integer value which specifies which page of results to fetch, starting at 1. Fetching successively higher page numbers will return additional results, until there are no more results to return (in which case an empty result set will be returned). Defaults to 1.' type: string default: 1 'trait:subscriptionQueryString:per_page': name: per_page in: query description: 'how many records to fetch in each request, defaults to 20. The maximum allowed is 200 – any per_page value over 200 will be changed to 200.' type: integer default: 20 maximum: 200 'trait:subscriptionQueryString:state': name: state in: query description: 'The current state of the subscription. ' type: string enum: - active - canceled - expired - expired_cards - on_hold - past_due - pending_cancellation - pending_renewal - suspended - trial_ended - trialing - unpaid 'trait:subscriptionQueryString:product': name: product in: query description: The product id of the subscription. (Note that the product handle cannot be used.) type: string 'trait:subscriptionQueryString:product_price_point_id': name: product_price_point_id in: query description: 'The ID of the product price point. If supplied, product is required' type: integer 'trait:subscriptionQueryString:coupon': name: coupon in: query description: The numeric id of the coupon currently applied to the subscription. (This can be found in the URL when editing a coupon. Note that the coupon code cannot be used.) type: string 'trait:subscriptionQueryString:date_field': name: date_field in: query description: The type of filter you'd like to apply to your search. type: string enum: - '' - current_period_ends_at - current_period_starts_at - created_at - activated_at - canceled_at - expires_at - trial_started_at - trial_ended_at - updated_at 'trait:subscriptionQueryString:start_date': name: start_date in: query description: 'The start date (format YYYY-MM-DD) with which to filter the `date_field`. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:subscriptionQueryString:end_date': name: end_date in: query description: 'The end date (format YYYY-MM-DD) with which to to filter the `date_field`. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:subscriptionQueryString:start_datetime': name: start_datetime in: query description: 'The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns subscriptions with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `start_date`.' type: string format: date-time 'trait:subscriptionQueryString:end_datetime': name: end_datetime in: query description: 'The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns subscriptions with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `end_date`.' type: string format: date-time 'trait:subscriptionQueryString:metadata[Field Name]': name: 'metadata[Field Name]' in: query description: The value of the metadata field specified in the parameter type: string 'trait:subscriptionQueryString:direction': name: direction in: query description: Controls the order in which results are returned. Can either be `asc` for ascending or `desc` for descending type: string 'trait:txnMaxId:max_id': name: max_id in: query description: Returns transactions with an id less than or equal to the one specified type: integer 'trait:direction:direction': name: direction in: query description: May be asc or desc to sort customers by time of creation type: string default: asc 'trait:searchString:q': name: q in: query description: 'Search by email, ID, reference, organization.' type: string 'trait:subscriptionIdQuery:subscription_id': name: subscription_id in: query type: integer 'trait:metadataValue:value': name: value in: query description: Can be a single item or a list of metadata type: string 'trait:stateStatusQuery:State / Status Filter': name: State / Status Filter in: query description: |+ type: string enum: - trialing - trial_ended - active - soft_failure - past_due - canceled - unpaid - expired 'trait:sinceId:since_id': name: since_id in: query type: string 'trait:sort:sort': name: sort in: query type: string default: created_at enum: - created_at - opened_at - closed_at 'trait:referralCode:code': name: code in: query description: The referral code you are trying to validate required: true type: string 'trait:statementsList:sort': name: sort in: query description: |- Allows specification of the order of the returned list. The list can be sorted by one of the following specifiers: * `closed_at`: Sort by the time the statement was closed (i.e. the end of the period it covers) * `created_at`: Sort by the time the statement was created * `opened_at`: Sort by the time the statement was opened (i.e. the beginning of the period it covers) * `settled_at`: Sort by the time the statement was settled See also the `direction` parameter. type: string enum: - created_at - opened_at - closed_at - settled_at 'trait:statementsList:direction': name: direction in: query description: |- Specifies the direction of the sort on the given `sort` key: * `asc`: Sort in ascending (lowest to highest) order * `desc`: Sort in descending (highest to lowest) order type: string enum: - asc - desc 'trait:settledSinceUnix:settled_since': name: settled_since in: query description: 'Format: UNIX timestamp' type: integer enum: - 1509408720 'trait:filterByEventName:filter': name: filter in: query description: 'You can pass multiple event keys after comma. Example: /events.json?filter=signup_success,payment_success' type: string enum: - account_transaction_changed - billing_date_change - component_allocation_change - customer_update - customer_create - dunning_step_reached - expiration_date_change - expiring_card - metered_usage - payment_success - payment_success_recreated - payment_failure - payment_failure_recreated - refund_failure - refund_success - renewal_success - renewal_success_recreated - renewal_failure - signup_success - signup_failure - statement_closed - statement_settled - subscription_bank_account_update - subscription_deletion - subscription_paypal_account_update - subscription_product_change - subscription_state_change - trial_end_notice - upgrade_downgrade_success - upgrade_downgrade_failure - upcoming_renewal_notice 'trait:relationshipInvoicingTraits:since_date': name: since_date in: query type: string format: date-time 'trait:relationshipInvoicingTraits:since_id': name: since_id in: query type: integer 'trait:relationshipInvoicingTraits:page': name: page in: query type: integer default: 1 'trait:relationshipInvoicingTraits:per_page': name: per_page in: query type: integer default: 100 minimum: 1 maximum: 200 'trait:includesArchive:include_archived': name: include_archived in: query description: Include archived items type: boolean default: false 'trait:calendarBillingTrait:calendar_billing[''resumption_charge'']': name: 'calendar_billing[''resumption_charge'']' in: query description: |- Optional, for calendar billing subscriptions only. Values can be: * `prorated`: The default. Chargify will charge a prorated amount upon resumption. * `immediate`: Chargify will the full product price immediately upon resumption. * `delayed`: Chargify will charge the full product price, at the next renewal. type: string 'trait:legacyFilters:filter': name: filter in: query description: 'Legacy filters used from a previous incident. Part of the API, but not to be used for normal practices.' type: string enum: - renewal_failure_recreated - renewal_success_recreated - payment_failure_recreated - payment_success_recreated 'trait:pagination10:page': name: page in: query description: 'Result records are organized in pages. By default, the first page of results is displayed. The `page` parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a `page` parameter. Retrieve the next page by adding `?page=2` to the query string. If there are no results to return, then an empty result set will be returned.' type: number default: '' 'trait:pagination10:per_page': name: per_page in: query description: This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any `per_page` value over 200 will be changed to 200. type: number default: '' maximum: 200 'trait:customerQueryString:date_field': name: date_field in: query description: The type of filter you would like to apply to your search. type: string enum: - created_at - updated_at 'trait:customerQueryString:start_date': name: start_date in: query description: 'The start date (format YYYY-MM-DD) with which to filter the `date_field`. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:customerQueryString:end_date': name: end_date in: query description: 'The end date (format YYYY-MM-DD) with which to to filter the `date_field`. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:customerQueryString:start_datetime': name: start_datetime in: query description: 'The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns subscriptions with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `start_date`.' type: string format: date-time 'trait:customerQueryString:end_datetime': name: end_datetime in: query description: 'The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns subscriptions with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `end_date`.' type: string format: date-time 'trait:productQueryString:date_field': name: date_field in: query description: The type of filter you would like to apply to your search. type: string enum: - created_at - updated_at 'trait:productQueryString:start_date': name: start_date in: query description: 'The start date (format YYYY-MM-DD) with which to filter the `date_field`. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:productQueryString:end_date': name: end_date in: query description: 'The end date (format YYYY-MM-DD) with which to to filter the `date_field`. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:productQueryString:start_datetime': name: start_datetime in: query description: 'The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `start_date`.' type: string format: date-time 'trait:productQueryString:end_datetime': name: end_datetime in: query description: 'The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `end_date`.' type: string format: date-time 'trait:componentQueryString:date_field': name: date_field in: query description: The type of filter you would like to apply to your search. type: string enum: - created_at - updated_at 'trait:componentQueryString:start_date': name: start_date in: query description: 'The start date (format YYYY-MM-DD) with which to filter the `date_field`. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:componentQueryString:end_date': name: end_date in: query description: 'The end date (format YYYY-MM-DD) with which to to filter the `date_field`. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:componentQueryString:start_datetime': name: start_datetime in: query description: 'The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `start_date`.' type: string format: date-time 'trait:componentQueryString:end_datetime': name: end_datetime in: query description: 'The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `end_date`.' type: string format: date-time 'trait:couponQueryString:date_field': name: date_field in: query description: The type of filter you would like to apply to your search. type: string enum: - created_at - updated_at 'trait:couponQueryString:start_date': name: start_date in: query description: 'The start date (format YYYY-MM-DD) with which to filter the `date_field`. Returns coupons with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:couponQueryString:end_date': name: end_date in: query description: 'The end date (format YYYY-MM-DD) with which to to filter the `date_field`. Returns coupons with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:couponQueryString:start_datetime': name: start_datetime in: query description: 'The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns coupons with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `start_date`.' type: string format: date-time 'trait:couponQueryString:end_datetime': name: end_datetime in: query description: 'The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns coupons with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `end_date`.' type: string format: date-time 'trait:metadataQueryString:date_field': name: date_field in: query description: The type of filter you would like to apply to your search. type: string enum: - created_at - updated_at 'trait:metadataQueryString:start_date': name: start_date in: query description: 'The start date (format YYYY-MM-DD) with which to filter the `date_field`. Returns metadata with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:metadataQueryString:end_date': name: end_date in: query description: 'The end date (format YYYY-MM-DD) with which to to filter the `date_field`. Returns metadata with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:metadataQueryString:start_datetime': name: start_datetime in: query description: 'The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns metadata with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `start_date`.' type: string format: date-time 'trait:metadataQueryString:end_datetime': name: end_datetime in: query description: 'The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns metadata with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `end_date`.' type: string format: date-time 'trait:metadataQueryString:with_deleted': name: with_deleted in: query description: Allow to fetch deleted metadata. type: boolean default: false 'trait:metadataQueryString:resource_ids[]': name: 'resource_ids[]' in: query description: Allow to fetch metadata for multiple records based on provided ids. type: array maxItems: 50 items: type: number 'trait:eventsQueryString:date_field': name: date_field in: query description: The type of filter you would like to apply to your search. type: string enum: - created_at 'trait:eventsQueryString:start_date': name: start_date in: query description: 'The start date (format YYYY-MM-DD) with which to filter the `date_field`. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:eventsQueryString:end_date': name: end_date in: query description: 'The end date (format YYYY-MM-DD) with which to to filter the `date_field`. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:eventsQueryString:start_datetime': name: start_datetime in: query description: 'The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `start_date`.' type: string format: date-time 'trait:eventsQueryString:end_datetime': name: end_datetime in: query description: 'The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `end_date`.' type: string format: date-time 'trait:productFamilyQueryString:date_field': name: date_field in: query description: The type of filter you would like to apply to your search. type: string enum: - created_at - updated_at 'trait:productFamilyQueryString:start_date': name: start_date in: query description: 'The start date (format YYYY-MM-DD) with which to filter the `date_field`. Returns products with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified' type: string format: date 'trait:productFamilyQueryString:end_date': name: end_date in: query description: 'The end date (format YYYY-MM-DD) with which to to filter the `date_field`. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified' type: string format: date 'trait:productFamilyQueryString:start_datetime': name: start_datetime in: query description: 'The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `start_date`.' type: string format: date-time 'trait:productFamilyQueryString:end_datetime': name: end_datetime in: query description: 'The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the `date_field`. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of `end_date`.' type: string format: date-time responses: 'trait:pagination20:200': description: '' definitions: get-a-sale-output: title: Get a Sale Output type: object properties: id: type: string site_id: type: integer subscription_id: type: integer transaction_time: type: string number: type: integer currency: type: string subtotal_in_cents: type: integer discount_in_cents: type: integer taxable_subtotal_in_cents: type: integer tax_in_cents: type: integer total_in_cents: type: integer liability_debit_in_cents: type: integer customer: type: object properties: id: type: integer first_name: type: string last_name: type: string email: type: string organization: type: string reference: type: string shipping_address: type: object properties: line_1: type: string line_2: type: string city: type: string state: type: string zip: type: string country: type: string billing_address: type: object properties: line_1: type: string line_2: type: string city: type: string state: type: string zip: type: string country: type: string line_items: type: array items: type: object properties: transaction_id: type: integer amount_in_cents: type: integer discount_in_cents: type: integer tax_in_cents: type: integer accounting_code: type: - 'null' - string kind: type: string item_type: type: string item_id: type: integer item_name: type: string product_id: type: integer taxable: type: boolean description: type: string discounts: type: array items: type: object properties: transaction_id: type: integer amount_in_cents: type: integer item_type: type: string item_id: type: integer item_name: type: string description: type: string taxes: type: array items: type: object properties: transaction_id: type: integer amount_in_cents: type: integer item_type: type: string item_id: type: integer item_name: type: string description: type: string payments: type: array items: type: object properties: transaction_id: type: integer liability_account: type: string amount_in_cents: type: integer kind: type: 'null' description: type: string payment_method: type: object properties: masked_card_number: type: string card_expiration: type: string card_brand: type: string example: id: f22b6080-4c28-11e5-93ee-000a27020040 site_id: 1 subscription_id: 1 transaction_time: '2015-08-26T15:30:45-04:00' number: 1 currency: USD subtotal_in_cents: 7200 discount_in_cents: 720 taxable_subtotal_in_cents: 6480 tax_in_cents: 549 total_in_cents: 7029 liability_debit_in_cents: 0 customer: id: 1 first_name: Mark last_name: Wahlberg email: marky@example.com organization: The Funky Bunch reference: marky shipping_address: line_1: 100 Shipping St. line_2: Apt 200 city: Pleasantville state: CA zip: '12345' country: US billing_address: line_1: 1 Infinite Loop line_2: Suite 100 city: Cupertino state: CA zip: '95014' country: US line_items: - transaction_id: 1 amount_in_cents: 2900 discount_in_cents: 290 tax_in_cents: 261 accounting_code: basic-plan-000 kind: baseline item_type: Product item_id: 1 item_name: Basic Plan product_id: 1 taxable: true description: Basic Plan (08/26/2015 - 09/26/2015) - transaction_id: 2 amount_in_cents: 1000 discount_in_cents: 100 tax_in_cents: 90 accounting_code: null kind: quantity_based_component item_type: QuantityBasedComponent item_id: 1 item_name: Taxable Widget product_id: 1 taxable: true description: 'Taxable Widget: 10 units' - transaction_id: 3 amount_in_cents: 500 discount_in_cents: 50 tax_in_cents: 0 accounting_code: null kind: quantity_based_component item_type: QuantityBasedComponent item_id: 2 item_name: Non-Taxable Widget product_id: 1 taxable: false description: 'Non-Taxable Widget: 5 units' - transaction_id: 4 amount_in_cents: 1000 discount_in_cents: 100 tax_in_cents: 90 accounting_code: null kind: metered_component item_type: MeteredComponent item_id: 3 item_name: Taxable Minutes product_id: 1 taxable: true description: 'Taxable Minutes: 100 units' - transaction_id: 5 amount_in_cents: 500 discount_in_cents: 50 tax_in_cents: 0 accounting_code: null kind: metered_component item_type: MeteredComponent item_id: 4 item_name: Non-Taxable Minutes product_id: 1 taxable: false description: 'Non-Taxable Minutes: 50 units' - transaction_id: 6 amount_in_cents: 100 discount_in_cents: 10 tax_in_cents: 9 accounting_code: null kind: on_off_component item_type: OnOffComponent item_id: 6 item_name: Taxable Add-On product_id: 1 taxable: true description: Taxable Add-On - transaction_id: 7 amount_in_cents: 100 discount_in_cents: 10 tax_in_cents: 0 accounting_code: null kind: on_off_component item_type: OnOffComponent item_id: 8 item_name: Non-Taxable Add-On product_id: 1 taxable: false description: Non-Taxable Add-On - transaction_id: 8 amount_in_cents: 1100 discount_in_cents: 110 tax_in_cents: 99 accounting_code: basic-plan-000 kind: initial item_type: Product item_id: 1 item_name: Basic Plan product_id: 1 taxable: true description: Initial/Startup fees discounts: - transaction_id: 9 amount_in_cents: -720 item_type: Coupon item_id: 1 item_name: 10% Off description: 'Coupon: 10PERCENT - Save 10% on new signups' taxes: - transaction_id: 10 amount_in_cents: 549 item_type: Tax item_id: 1 item_name: CA Sales Tax description: CA Sales Tax (10.0%) payments: - transaction_id: 11 liability_account: na amount_in_cents: 7029 kind: null description: 'Mark Wahlberg - Basic Plan: Signup payment' payment_method: masked_card_number: XXXX-XXXX-XXXX-1 card_expiration: 12/2022 card_brand: bogus x-stoplight: id: get-a-sale-output name: Get a Sale Output public: true list-sales-output: title: List Sales Output type: object properties: links: type: object properties: self: type: string next: type: string meta: type: object properties: count: type: integer total: type: integer data: type: array items: type: object example: links: self: 'http://subdomain.chargify.com/sales_receipts' next: 'http://subdomain.chargify.com/sales_receipts?before_number=6' meta: count: 20 total: 25 data: [] x-stoplight: id: list-sales-output name: List Sales Output public: true webhooks-list-webhook-output: title: List Webhook Output type: array items: type: object properties: webhook: type: object properties: event: type: string id: type: integer created_at: type: string last_error: type: string last_error_at: type: string accepted_at: type: 'null' last_sent_at: type: string last_sent_url: type: string successful: type: boolean body: type: string signature: type: string signature_hmac_sha_256: type: string example: - webhook: event: statement_settled id: 141765032 created_at: '2016-11-08T16:22:26-05:00' last_error: 404 Resource Not Found (retry 5 of 5) last_error_at: '2016-11-08T16:43:54-05:00' accepted_at: null last_sent_at: '2016-11-08T16:43:54-05:00' last_sent_url: 'http://requestb.in/11u45x71' successful: false body: 'id=141765032&event=statement_settled&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][balance_in_cents]=0&payload[customer][id]=14585695&payload[customer][first_name]=Pookie&payload[customer][last_name]=Test&payload[customer][reference]=&payload[customer][organization]=&payload[customer][address]=&payload[customer][address_2]=&payload[customer][city]=&payload[customer][state]=&payload[customer][zip]=&payload[customer][country]=&payload[customer][email]=pookie999%40example.com&payload[customer][phone]=&payload[statement][closed_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][id]=80168049&payload[statement][opened_at]=2016-11-07%2016%3A22%3A15%20-0500&payload[statement][settled_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][subscription_id]=15100141&payload[statement][updated_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][starting_balance_in_cents]=0&payload[statement][ending_balance_in_cents]=0&payload[statement][total_in_cents]=6400&payload[statement][memo]=We%20thank%20you%20for%20your%20continued%20business!&payload[statement][events][0][id]=346956565&payload[statement][events][0][key]=renewal_success&payload[statement][events][0][message]=Successful%20renewal%20for%20Pookie%20Test''s%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][1][id]=346956579&payload[statement][events][1][key]=payment_success&payload[statement][events][1][message]=Successful%20payment%20of%20%2464.00%20for%20Pookie%20Test''s%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][2][id]=347299359&payload[statement][events][2][key]=renewal_success&payload[statement][events][2][message]=Successful%20renewal%20for%20Pookie%20Test''s%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][transactions][0][id]=161537343&payload[statement][transactions][0][subscription_id]=15100141&payload[statement][transactions][0][type]=Charge&payload[statement][transactions][0][kind]=baseline&payload[statement][transactions][0][transaction_type]=charge&payload[statement][transactions][0][success]=true&payload[statement][transactions][0][amount_in_cents]=1000&payload[statement][transactions][0][memo]=%2410%20Basic%20Plan%20(11%2F08%2F2016%20-%2011%2F09%2F2016)&payload[statement][transactions][0][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][0][starting_balance_in_cents]=0&payload[statement][transactions][0][ending_balance_in_cents]=1000&payload[statement][transactions][0][gateway_used]=&payload[statement][transactions][0][gateway_transaction_id]=&payload[statement][transactions][0][gateway_order_id]=&payload[statement][transactions][0][payment_id]=161537369&payload[statement][transactions][0][product_id]=3792003&payload[statement][transactions][0][tax_id]=&payload[statement][transactions][0][component_id]=&payload[statement][transactions][0][statement_id]=80168049&payload[statement][transactions][0][customer_id]=14585695&payload[statement][transactions][0][original_amount_in_cents]=&payload[statement][transactions][0][discount_amount_in_cents]=&payload[statement][transactions][0][taxable_amount_in_cents]=&payload[statement][transactions][1][id]=161537344&payload[statement][transactions][1][subscription_id]=15100141&payload[statement][transactions][1][type]=Charge&payload[statement][transactions][1][kind]=quantity_based_component&payload[statement][transactions][1][transaction_type]=charge&payload[statement][transactions][1][success]=true&payload[statement][transactions][1][amount_in_cents]=5400&payload[statement][transactions][1][memo]=Timesheet%20Users%3A%2018%20Timesheet%20Users&payload[statement][transactions][1][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][1][starting_balance_in_cents]=1000&payload[statement][transactions][1][ending_balance_in_cents]=6400&payload[statement][transactions][1][gateway_used]=&payload[statement][transactions][1][gateway_transaction_id]=&payload[statement][transactions][1][gateway_order_id]=&payload[statement][transactions][1][payment_id]=161537369&payload[statement][transactions][1][product_id]=3792003&payload[statement][transactions][1][tax_id]=&payload[statement][transactions][1][component_id]=277221&payload[statement][transactions][1][statement_id]=80168049&payload[statement][transactions][1][customer_id]=14585695&payload[statement][transactions][1][original_amount_in_cents]=&payload[statement][transactions][1][discount_amount_in_cents]=&payload[statement][transactions][1][taxable_amount_in_cents]=&payload[statement][transactions][2][id]=161537369&payload[statement][transactions][2][subscription_id]=15100141&payload[statement][transactions][2][type]=Payment&payload[statement][transactions][2][kind]=&payload[statement][transactions][2][transaction_type]=payment&payload[statement][transactions][2][success]=true&payload[statement][transactions][2][amount_in_cents]=6400&payload[statement][transactions][2][memo]=Pookie%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[statement][transactions][2][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][transactions][2][starting_balance_in_cents]=6400&payload[statement][transactions][2][ending_balance_in_cents]=0&payload[statement][transactions][2][gateway_used]=bogus&payload[statement][transactions][2][gateway_transaction_id]=53433&payload[statement][transactions][2][gateway_order_id]=&payload[statement][transactions][2][payment_id]=&payload[statement][transactions][2][product_id]=3792003&payload[statement][transactions][2][tax_id]=&payload[statement][transactions][2][component_id]=&payload[statement][transactions][2][statement_id]=80168049&payload[statement][transactions][2][customer_id]=14585695&payload[statement][transactions][2][card_number]=XXXX-XXXX-XXXX-1&payload[statement][transactions][2][card_expiration]=10%2F2020&payload[statement][transactions][2][card_type]=bogus&payload[statement][transactions][2][refunded_amount_in_cents]=0&payload[product][id]=3792003&payload[product][name]=%2410%20Basic%20Plan&payload[product_family][id]=527890&payload[product_family][name]=Acme%20Projects&payload[payment_profile][id]=10102821&payload[payment_profile][first_name]=Pookie&payload[payment_profile][last_name]=Test&payload[payment_profile][billing_address]=&payload[payment_profile][billing_address_2]=&payload[payment_profile][billing_city]=&payload[payment_profile][billing_country]=&payload[payment_profile][billing_state]=&payload[payment_profile][billing_zip]=&payload[event_id]=347299384' signature: 7c606ec4628ce75ec46e284097ce163a signature_hmac_sha_256: 40f25e83dd324508bb2149e3e525821922fb210535ebfbfa81e7ab951996b41d - webhook: event: payment_success id: 141765008 created_at: '2016-11-08T16:22:25-05:00' last_error: 404 Resource Not Found (retry 5 of 5) last_error_at: '2016-11-08T16:43:54-05:00' accepted_at: null last_sent_at: '2016-11-08T16:43:54-05:00' last_sent_url: 'http://requestb.in/11u45x71' successful: false body: 'id=141765008&event=payment_success&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][trial_started_at]=&payload[subscription][trial_ended_at]=&payload[subscription][activated_at]=2016-11-04%2017%3A06%3A43%20-0400&payload[subscription][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][updated_at]=2016-11-08%2016%3A22%3A22%20-0500&payload[subscription][expires_at]=&payload[subscription][balance_in_cents]=0&payload[subscription][current_period_ends_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][next_assessment_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][canceled_at]=&payload[subscription][cancellation_message]=&payload[subscription][next_product_id]=&payload[subscription][cancel_at_end_of_period]=false&payload[subscription][payment_collection_method]=automatic&payload[subscription][snap_day]=&payload[subscription][cancellation_method]=&payload[subscription][current_period_started_at]=2016-11-08%2016%3A06%3A42%20-0500&payload[subscription][previous_state]=active&payload[subscription][signup_payment_id]=161034048&payload[subscription][signup_revenue]=64.00&payload[subscription][delayed_cancel_at]=&payload[subscription][coupon_code]=&payload[subscription][total_revenue_in_cents]=32000&payload[subscription][product_price_in_cents]=1000&payload[subscription][product_version_number]=7&payload[subscription][payment_type]=credit_card&payload[subscription][referral_code]=pggn84&payload[subscription][coupon_use_count]=&payload[subscription][coupon_uses_allowed]=&payload[subscription][customer][id]=14585695&payload[subscription][customer][first_name]=Test&payload[subscription][customer][last_name]=Test&payload[subscription][customer][organization]=&payload[subscription][customer][email]=pookie999%40example.com&payload[subscription][customer][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][customer][updated_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][reference]=&payload[subscription][customer][address]=&payload[subscription][customer][address_2]=&payload[subscription][customer][city]=&payload[subscription][customer][state]=&payload[subscription][customer][zip]=&payload[subscription][customer][country]=&payload[subscription][customer][phone]=&payload[subscription][customer][portal_invite_last_sent_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][portal_invite_last_accepted_at]=&payload[subscription][customer][verified]=false&payload[subscription][customer][portal_customer_created_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][cc_emails]=&payload[subscription][product][id]=3792003&payload[subscription][product][name]=%2410%20Basic%20Plan&payload[subscription][product][handle]=basic&payload[subscription][product][description]=lorem%20ipsum&payload[subscription][product][accounting_code]=basic&payload[subscription][product][request_credit_card]=false&payload[subscription][product][expiration_interval]=&payload[subscription][product][expiration_interval_unit]=never&payload[subscription][product][created_at]=2016-03-24%2013%3A38%3A39%20-0400&payload[subscription][product][updated_at]=2016-11-03%2013%3A03%3A05%20-0400&payload[subscription][product][price_in_cents]=1000&payload[subscription][product][interval]=1&payload[subscription][product][interval_unit]=day&payload[subscription][product][initial_charge_in_cents]=&payload[subscription][product][trial_price_in_cents]=&payload[subscription][product][trial_interval]=&payload[subscription][product][trial_interval_unit]=month&payload[subscription][product][archived_at]=&payload[subscription][product][require_credit_card]=false&payload[subscription][product][return_params]=&payload[subscription][product][taxable]=false&payload[subscription][product][update_return_url]=&payload[subscription][product][initial_charge_after_trial]=false&payload[subscription][product][version_number]=7&payload[subscription][product][update_return_params]=&payload[subscription][product][product_family][id]=527890&payload[subscription][product][product_family][name]=Acme%20Projects&payload[subscription][product][product_family][description]=&payload[subscription][product][product_family][handle]=billing-plans&payload[subscription][product][product_family][accounting_code]=&payload[subscription][product][public_signup_pages][id]=281054&payload[subscription][product][public_signup_pages][return_url]=http%3A%2F%2Fwww.example.com%3Fsuccessfulsignup&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fkqvmfrbgd89q%2Fbasic&payload[subscription][product][public_signup_pages][id]=281240&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fdkffht5dxfd8%2Fbasic&payload[subscription][product][public_signup_pages][id]=282694&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fjwffwgdd95s8%2Fbasic&payload[subscription][credit_card][id]=10102821&payload[subscription][credit_card][first_name]=Pookie&payload[subscription][credit_card][last_name]=Test&payload[subscription][credit_card][masked_card_number]=XXXX-XXXX-XXXX-1&payload[subscription][credit_card][card_type]=bogus&payload[subscription][credit_card][expiration_month]=10&payload[subscription][credit_card][expiration_year]=2020&payload[subscription][credit_card][customer_id]=14585695&payload[subscription][credit_card][current_vault]=bogus&payload[subscription][credit_card][vault_token]=1&payload[subscription][credit_card][billing_address]=&payload[subscription][credit_card][billing_city]=&payload[subscription][credit_card][billing_state]=&payload[subscription][credit_card][billing_zip]=&payload[subscription][credit_card][billing_country]=&payload[subscription][credit_card][customer_vault_token]=&payload[subscription][credit_card][billing_address_2]=&payload[subscription][credit_card][payment_type]=credit_card&payload[transaction][id]=161537369&payload[transaction][subscription_id]=15100141&payload[transaction][type]=Payment&payload[transaction][kind]=&payload[transaction][transaction_type]=payment&payload[transaction][success]=true&payload[transaction][amount_in_cents]=6400&payload[transaction][memo]=Pookie%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[transaction][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[transaction][starting_balance_in_cents]=6400&payload[transaction][ending_balance_in_cents]=0&payload[transaction][gateway_used]=bogus&payload[transaction][gateway_transaction_id]=53433&payload[transaction][gateway_order_id]=&payload[transaction][payment_id]=&payload[transaction][product_id]=3792003&payload[transaction][tax_id]=&payload[transaction][component_id]=&payload[transaction][statement_id]=80168049&payload[transaction][customer_id]=14585695&payload[transaction][card_number]=XXXX-XXXX-XXXX-1&payload[transaction][card_expiration]=10%2F2020&payload[transaction][card_type]=bogus&payload[transaction][refunded_amount_in_cents]=0&payload[transaction][invoice_id]=&payload[event_id]=347299364' signature: fbcf2f6be579f9658cff90c4373e0ca2 signature_hmac_sha_256: db96654f5456c5460062feb944ac8bb1418f9d181ae04a8ed982fe9ffdca8de1 x-stoplight: id: webhooks-list-webhook-output name: List Webhook Output public: true notes-create-note-output: title: Create Note Output type: object properties: note: type: object properties: id: type: integer body: type: string subscription_id: type: integer created_at: type: string updated_at: type: string sticky: type: boolean example: note: id: 105025 body: New test note. subscription_id: 15054201 created_at: '2016-11-03T14:47:08-04:00' updated_at: '2016-11-03T14:47:08-04:00' sticky: true x-stoplight: id: notes-create-note-output name: Create Note Output public: true event: title: Event type: object properties: event: type: object properties: id: type: integer key: type: string message: type: string subscription_id: type: integer customer_id: type: integer created_at: type: string event_specific_data: type: - 'null' - object properties: previous_subscription_state: type: string new_subscription_state: type: string example: event: id: 343087780 key: subscription_state_change message: State changed on Test subscription to Monthly Product from active to past_due subscription_id: 14950962 customer_id: 234328343 created_at: '2016-10-27T16:42:22-04:00' event_specific_data: previous_subscription_state: active new_subscription_state: past_due x-stoplight: id: event name: Event public: true create-adjustment-request: title: Create Adjustment Request type: object properties: adjustment: type: object required: - amount - memo properties: amount: type: string default: '' description: '(either amount or amount_in_cents is required) If you use this parameter, you should pass a dollar amount represented as a string. For example, $10.00 would be represented as 10.00 and -$10.00 would be represented as -10.00.' memo: type: string maxLength: 255 description: A helpful explanation for the adjustment. This amount will remind you and your customer for the reason for the assessment of the adjustment. period_range_start: type: string format: date description: 'A date range represents a service period. If a start is provided, an end must be supplied as well. These dates are optional and do not impact the billing of the charge. If provided, the date range will be used for revenue placement on the Finance Report and Revenue Recognition report.' period_range_end: type: string format: date description: 'A date range represents a service period. If an end is provided, a start must be supplied as well. These dates are optional and do not impact the billing of the charge. If provided, the date range will be used for revenue placement on the Finance Report and Revenue Recognition report.' adjustment_method: type: string enum: - target description: 'A string that toggles how the adjustment should be applied. If target is passed for this param, the adjustment will automatically set the subscription’s balance to the amount. If left blank, the amount will be added to the current balance.' required: - adjustment example: adjustment: amount: '10.00' memo: Monthly charges x-stoplight: id: create-adjustment-request name: Create Adjustment Request public: true stats-read-stats-output: title: Read Stats Output type: object properties: seller_name: type: string site_name: type: string site_id: type: integer site_currency: type: string stats: type: object properties: total_subscriptions: type: integer subscriptions_today: type: integer total_revenue: type: string revenue_today: type: string revenue_this_month: type: string revenue_this_year: type: string total_canceled_subscriptions: type: integer total_active_subscriptions: type: number total_past_due_subscriptions: type: number total_unpaid_subscriptions: type: number total_dunning_subscriptions: type: number example: seller_name: 'Acme, Inc.' site_name: Production site_id: 12345 site_currency: USD stats: total_subscriptions: 120 subscriptions_today: 4 total_revenue: '$45,978.81' revenue_today: '$1,405.12' revenue_this_month: '$10,000.00' revenue_this_year: '$27,935.24' x-stoplight: id: stats-read-stats-output name: Read Stats Output public: true coupons-create-coupon-output-percentage: title: Create Coupon Output Percentage type: object properties: coupon: type: object properties: id: type: integer name: type: string code: type: string description: type: string amount_in_cents: type: 'null' product_family_id: type: integer product_family_name: type: string created_at: type: string updated_at: type: string start_date: type: string end_date: type: 'null' percentage: type: number duration_period_count: type: 'null' duration_interval: type: 'null' duration_interval_unit: type: 'null' allow_negative_balance: type: boolean archived_at: type: 'null' conversion_limit: type: 'null' stackable: type: boolean compounding_strategy: type: string coupon_restrictions: type: array items: type: object exclude_mid_period_allocations: type: boolean example: coupon: id: 67 name: Foo Bar code: YEPPER99934 description: my cool coupon amount_in_cents: null product_family_id: 4 product_family_name: Billing Plans created_at: '2017-11-08T10:01:15-05:00' updated_at: '2017-11-08T10:01:15-05:00' start_date: '2017-11-08T10:01:15-05:00' end_date: null percentage: 33.3333 duration_period_count: null duration_interval: null duration_interval_unit: null allow_negative_balance: false archived_at: null conversion_limit: null stackable: true compounding_strategy: compound coupon_restrictions: [] exclude_mid_period_allocations: true x-stoplight: id: coupons-create-coupon-output-percentage name: Create Coupon Output Percentage public: true create-allocation-request: title: Create Allocation Request type: object properties: allocation: type: object properties: quantity: type: - integer - number description: 'The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use 1for on and 0 for off.' memo: type: string description: A memo to record along with the allocation proration_downgrade_scheme: type: string description: (deprecated) The scheme used if the proration is a downgrade. Defaults to the site setting if one is not provided. proration_collection_method: type: string default: automatic description: '' proration_upgrade_scheme: type: string description: (deprecated) The scheme used if the proration is an upgrade. Defaults to the site setting if one is not provided. accrue_charge: type: boolean description: 'If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately. Defaults to the site setting if one is not provided.' upgrade_charge: type: string description: The type of charge to be created if the change in cost is an upgrade. Defaults to the component and then site setting if one is not provided. downgrade_credit: type: string description: The type of credit to be created if the change in cost is a downgrade. Defaults to the component and then site setting if one is not provided. payment_collection_method: type: string description: '(deprecated, ignored) The payment_collection_method set on the subscription will be used. For subscriptions on invoice billing, when accrue_charge is false, a mid-period invoice will be created from any charges that are a result of the allocation change.' component_id: type: integer description: (required for the multiple allocations endpoint) The id associated with the component for which the allocation is being made price_point_id: type: - string - integer - 'null' description: 'Price point that the allocation should be charged at. Accepts either the price point''s id (integer) or handle (string). When not specified, the default price point will be used.' required: - quantity example: allocation: quantity: 29 memo: Text messages usage MAy 2020 proration_downgrade_scheme: no-prorate proration_collection_method: automatic proration_upgrade_scheme: no-prorate x-stoplight: id: create-allocation-request name: Create Allocation Request public: true webhooks-replay-webhooks-site: title: Replay Webhooks for Site type: object properties: status: type: string example: status: ok x-stoplight: id: webhooks-replay-webhooks-site name: Replay Webhooks for Site public: true notes-create-note-input: title: Create Note Input type: object properties: note: type: object properties: body: type: string sticky: type: boolean example: note: body: New test note sticky: true x-stoplight: id: notes-create-note-input name: Create Note Input public: true adjustment-response: title: Adjustment Response type: object properties: adjustment: type: object properties: id: type: integer minimum: 1 maximum: 99999999999 success: type: boolean memo: type: string maxLength: 255 amount_in_cents: type: - integer - string minimum: -99999999999 maximum: 99999999999 ending_balance_in_cents: type: integer minimum: -99999999999 maximum: 99999999999 type: type: string maxLength: 255 transaction_type: type: string maxLength: 255 subscription_id: type: integer minimum: 1 maximum: 99999999999 product_id: type: integer minimum: 1 maximum: 99999999999 created_at: type: string format: date-time payment_id: type: 'null' period_range_start: type: - string - 'null' format: date period_range_end: type: - string - 'null' format: date example: adjustment: id: 123456 success: true memo: This is the description of an adjustment on a subscription that increases the balance by a certain dollar amount. amount_in_cents: 400 ending_balance_in_cents: 400 type: Adjustment transaction_type: adjustment subscription_id: 123456 product_id: 123456 created_at: '2012-11-20T22:00:37Z' payment_id: null x-stoplight: id: adjustment-response name: Adjustment Response public: true products-list-products-output: title: Read by Products Output type: array items: type: object properties: product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: - integer - 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: - 'null' - string return_params: type: string url: type: string product_price_point_name: type: string request_billing_address: type: boolean require_billing_address: type: boolean require_shipping_address: type: boolean example: - product: id: 3801242 name: Free product handle: zero-dollar-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-04-21T16:08:39-04:00' updated_at: '2016-08-03T11:27:53-04:00' price_in_cents: 10000 interval: 1 interval_unit: month initial_charge_in_cents: 0 trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 4 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 283460 return_url: null return_params: '' url: 'https://general-goods.chargify.com/subscribe/smcc4j3d2w6h/zero-dollar-product' product_price_point_name: Original - product: id: 3858146 name: Calendar Billing Product handle: calendar-billing-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-07-05T13:07:38-04:00' updated_at: '2016-07-05T13:07:38-04:00' price_in_cents: 10000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 289193 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/gxdbfxzxhcjq/calendar-billing-product' product_price_point_name: Original x-stoplight: id: products-list-products-output name: Read by Products Output public: true renewal-preview-output: title: Renewal Preview Output type: object properties: renewal_preview: type: object properties: next_assessment_at: type: string subtotal_in_cents: type: integer total_tax_in_cents: type: integer total_discount_in_cents: type: integer total_in_cents: type: integer existing_balance_in_cents: type: integer total_amount_due_in_cents: type: integer uncalculated_taxes: type: boolean line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer product_id: type: integer product_handle: type: string component_id: type: integer component_handle: type: string component_name: type: string example: renewal_preview: next_assessment_at: '2017-03-13T12:50:55-04:00' subtotal_in_cents: 6000 total_tax_in_cents: 0 total_discount_in_cents: 0 total_in_cents: 6000 existing_balance_in_cents: 0 total_amount_due_in_cents: 6000 uncalculated_taxes: false line_items: - transaction_type: charge kind: baseline amount_in_cents: 5000 memo: Gold Product (03/13/2017 - 04/13/2017) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_handle: gold-product - transaction_type: charge kind: quantity_based_component amount_in_cents: 1000 memo: 'Quantity Component: 10 Quantity Components' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_id: 113 component_id: 104 component_handle: quantity-component component_name: Quantity Component x-stoplight: id: renewal-preview-output name: Renewal Preview Output public: true count-transactions: title: Read the Count of Transactions for a Site Output type: object properties: count: type: integer example: count: 290 x-stoplight: id: count-transactions name: Read the Count of Transactions for a Site Output public: true allocation-response: title: Allocation Response type: object properties: allocation: type: object properties: component_id: type: integer description: The integer component ID for the allocation. This references a component that you have created in your Product setup subscription_id: type: integer description: The integer subscription ID for the allocation. This references a unique subscription in your Site quantity: type: integer description: The allocated quantity set in to effect by the allocation previous_quantity: type: integer description: The allocated quantity that was in effect before this allocation was created memo: type: string description: The memo passed when the allocation was created timestamp: type: string description: 'The time that the allocation was recorded, in format and UTC timezone, i.e. 2012-11-20T22:00:37Z' proration_upgrade_scheme: type: string description: The scheme used if the proration was an upgrade. This is only present when the allocation was created mid-period. proration_downgrade_scheme: type: string description: The scheme used if the proration was a downgrade. This is only present when the allocation was created mid-period. price_point_id: type: integer previous_price_point_id: type: integer accrue_charge: type: boolean description: 'If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately.' upgrade_charge: type: string description: The type of charge to be created if the change in cost is an upgrade. downgrade_credit: type: string description: The type of credit to be created if the change in cost is a downgrade. payment: type: - object - 'null' description: 'Information for captured payment, if applicable' properties: id: type: number amout_in_cents: type: string success: type: boolean memo: type: string example: allocation: component_id: 4034995 subscription_id: 23737320 quantity: -96752223 previous_quantity: 3010509 memo: dolore cupidatat elit timestamp: ex proident dolor i proration_upgrade_scheme: laboris ipsum dolore proration_downgrade_scheme: eiusmod dolore price_point_id: -69720370 previous_price_point_id: -76493052 accrue_charge: true upgrade_charge: ipsum consectetur downgrade_credit: nulla Ut in do payment: id: -44566528 amout_in_cents: labore in minim ad success: false memo: aliqua x-stoplight: id: allocation-response name: Allocation Response public: true enable-billing-portal-response: title: Enable Billing Portal Response type: object properties: customer: type: object properties: first_name: type: string maxLength: 255 last_name: type: string maxLength: 255 email: type: string format: email organization: type: string maxLength: 255 reference: type: 'null' id: type: integer minimum: 1 maximum: 99999999999 created_at: type: string format: date-time updated_at: type: string format: date-time address: type: string maxLength: 255 address_2: type: string maxLength: 255 city: type: string maxLength: 255 state: type: string maxLength: 255 zip: type: string maxLength: 255 country: type: string maxLength: 255 phone: type: string maxLength: 255 verified: type: boolean portal_customer_created_at: type: string format: date-time portal_invite_last_sent_at: type: - 'null' - string portal_invite_last_accepted_at: type: 'null' example: customer: first_name: John last_name: Doe email: jd@example.com organization: '' reference: null id: 100032 created_at: '2014-04-17T11:13:52-04:00' updated_at: '2014-04-17T15:37:08-04:00' address: 45 Main St address_2: '' city: New York state: NY zip: '10045' country: US phone: '' verified: false portal_customer_created_at: '2014-04-17T15:37:08-04:00' portal_invite_last_sent_at: null portal_invite_last_accepted_at: null x-stoplight: id: enable-billing-portal-response name: Enable Billing Portal Response public: true create-allocations-request: title: Create Allocations Request type: object properties: proration_upgrade_scheme: type: string default: no-prorate description: deprecated proration_downgrade_scheme: type: string description: deprecated default: no-prorate allocations: type: array items: $ref: '#/definitions/create-allocation-request' accrue_charge: type: boolean upgrade_charge: type: string downgrade_credit: type: string example: proration_upgrade_scheme: prorate-attempt-capture proration_downgrade_scheme: no-prorate allocations: - component_id: 123 quantity: 10 memo: foo - component_id: 456 quantity: 5 memo: bar x-stoplight: id: create-allocations-request name: Create Allocations Request public: true create-component: title: Create Component type: object properties: metered_component: type: object description: 'Component type (metered_component, on_off_component, quantity_based_component, prepaid_usage_component)' required: - name - unit_name properties: name: type: string description: 'A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes".' unit_name: type: string description: '(Not required for On/Off Components) The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item' description: type: string description: A description for the component that will be displayed to the user on the hosted signup page. handle: type: string description: 'A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters ''.'', '':'', ''-'', or ''_''.' pattern: '\A[a-z0-9][a-z0-9\-_:.]*\z' taxable: type: boolean description: Boolean flag describing whether a component is taxable or not. pricing_scheme: type: string description: '(Not required for On/Off Components) The identifier for the pricing scheme. Available options: per_unit, volume, tiered, stairstep. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes.' prices: type: array description: '(Not required for On/Off Components or ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://help.chargify.com/products/product-components.html#general-price-bracket-rules) for an overview of how price brackets work for different pricing schemes.' items: type: object properties: starting_quantity: type: integer unit_price: type: integer component: type: 'null' upgrade_charge: type: string downgrade_credit: type: string price_points: type: array items: type: object properties: name: type: string handle: type: string pricing_scheme: type: string prices: type: array items: type: object properties: starting_quantity: type: string unit_price: type: string overage_pricing: $ref: '#/definitions/overage-pricing' unit_price: type: number description: 'The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065' tax_code: type: string description: A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. hide_date_range_on_invoice: type: boolean description: (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. price_in_cents: type: string description: deprecated May 2011 - use unit_price instead overage_pricing: $ref: '#/definitions/overage-pricing' rollover_prepaid_reminder: type: boolean description: (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period renew_prepaid_allocation: type: boolean description: (only for prepaid usage components) Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period expiration_interval: type: number description: (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire expiration_interval_unit: type: string description: '' enum: - day - month required: - metered_component example: metered_component: name: Text messages unit_name: text message taxable: false pricing_scheme: stairstep prices: - starting_quantity: 1 unit_price: 1 component: null x-stoplight: id: create-component name: Create Component public: true list-subscriptions-components: title: List Subscriptions Components type: array items: type: object properties: component: type: object properties: component_id: type: integer minimum: 0 maximum: 99999999999 subscription_id: type: integer minimum: 0 maximum: 99999999999 unit_balance: type: integer minimum: 0 maximum: 999999999 pricing_scheme: type: string name: type: string maxLength: 255 kind: type: string maxLength: 255 unit_name: type: string maxLength: 255 enabled: type: boolean allocated_quantity: type: integer minimum: 0 maximum: 99999999999 example: - {} - component: unit_name: Text messages name: text_messages kind: metered_component component_id: 98322708341 subscription_id: 38855254509 allocated_quantity: 1500 unit_balance: 5000 - component: enabled: true subscription_id: 30336331837 unit_balance: 5000 name: text messages - {} x-stoplight: id: list-subscriptions-components name: List Subscriptions Components public: true charges-create-a-charge-response-post: title: Create a charge / Response POST type: object properties: charge: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: 'null' gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' payment_id: type: integer product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer item_name: type: string period_range_start: type: - 'null' - string format: date period_range_end: type: - 'null' - string format: date original_amount_in_cents: type: integer discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer price_point_id: type: 'null' price_point_handle: type: 'null' taxations: type: array items: type: object properties: tax_id: type: 'null' tax_charge_id: type: integer tax_name: type: string rate: type: string tax_amount_in_cents: type: integer tax_rules: type: array items: type: object properties: tax_rule_id: type: 'null' country_code: type: string subdivision_code: type: string rate: type: string tax_amount_in_cents: type: integer description: type: string example: charge: id: 281946395 subscription_id: 25157645 type: Charge kind: one_time transaction_type: charge success: true amount_in_cents: 1000 memo: Amount collected created_at: '2019-01-10T14:05:55-06:00' starting_balance_in_cents: 10000 ending_balance_in_cents: 11000 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 281946397 product_id: 4535641 tax_id: null component_id: null statement_id: 133557427 customer_id: 24926300 item_name: Monthly product COUPON API TEST period_range_start: null period_range_end: null original_amount_in_cents: 1000 discount_amount_in_cents: 0 taxable_amount_in_cents: 1000 price_point_id: null price_point_handle: null taxations: - tax_id: null tax_charge_id: 281946396 tax_name: TX Tax rate: '0.0825' tax_amount_in_cents: 83 tax_rules: - tax_rule_id: null country_code: US subdivision_code: TX rate: '0.0625' tax_amount_in_cents: 63 description: TX STATE TAX - TEXAS - tax_rule_id: null country_code: US subdivision_code: TX rate: '0.02' tax_amount_in_cents: 20 description: TX CITY TAX - AUSTIN x-stoplight: id: charges-create-a-charge-response-post name: Create a charge / Response POST public: true subscriptions-component: title: Subscriptions Component type: object properties: component: type: object properties: component_id: type: integer subscription_id: type: integer allocated_quantity: type: integer description: 'For Quantity-based components: The current allocation for the component on the given subscription. For On/Off components: Use 1 for on. Use 0 for off.' pricing_scheme: type: string name: type: string kind: type: string unit_name: type: string price_point_id: type: integer price_point_handle: type: string enabled: type: boolean description: (for on/off components) indicates if the component is enabled for the subscription example: component: component_id: 193028 subscription_id: 14593192 allocated_quantity: 1 pricing_scheme: per_unit name: Users kind: quantity_based_component unit_name: Users x-stoplight: id: subscriptions-component name: Subscriptions Component public: true charges-create-a-charge-request-post: title: Create a charge / Request POST type: object properties: charge: type: object properties: memo: type: string amount: type: string accrue_on_failure: type: string delay_capture: type: string taxable: type: string period_range_start: type: - string - 'null' format: date period_range_end: type: - string - 'null' format: date example: charge: memo: Amount collected amount: '10.00' accrue_on_failure: 'false' delay_capture: 'True' taxable: 'true' period_range_start: '2019-03-01' period_range_end: '2019-03-01' x-stoplight: id: charges-create-a-charge-request-post name: Create a charge / Request POST public: true create-credit-for-legacy-invoice: title: Create Credit for Legacy Invoice type: object properties: adjustment: type: object properties: amount: type: integer memo: type: string period_range_start: type: - string - 'null' format: date period_range_end: type: - string - 'null' format: date example: adjustment: amount: 10 memo: Credit for recycling old computers x-stoplight: id: create-credit-for-legacy-invoice name: Create Credit for Legacy Invoice public: true create-charge-for-legacy-invoice: title: Create Charge for Legacy Invoice type: object properties: charge: type: object properties: amount: type: integer memo: type: string period_range_start: type: - string - 'null' format: date period_range_end: type: - string - 'null' format: date required: - amount example: payment: amount: 10 memo: Lorem ipsum x-stoplight: id: create-charge-for-legacy-invoice name: Create Charge for Legacy Invoice public: true create-external-payment: title: Create External Payment for Legacy Invoice type: object properties: payment: type: object properties: amount: type: integer memo: type: string example: payment: amount: 10 memo: Lorem ipsum x-stoplight: id: create-external-payment name: Create External Payment for Legacy Invoice public: true event-count: title: Event Count type: object properties: count: type: integer example: count: 144 x-stoplight: id: event-count name: Event Count public: true charge: title: Charge type: object properties: charge: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: 'null' gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' payment_id: type: 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer original_amount_in_cents: type: 'null' discount_amount_in_cents: type: 'null' taxable_amount_in_cents: type: 'null' taxations: type: array items: type: object period_range_start: type: - string - 'null' format: date period_range_end: type: - string - 'null' format: date example: charge: id: 160573619 subscription_id: 14900541 type: Charge kind: delay_capture transaction_type: charge success: true amount_in_cents: 100 memo: This is the description of the one time charge. created_at: '2016-11-01T16:40:56-04:00' starting_balance_in_cents: 2750 ending_balance_in_cents: 2850 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 79702531 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] x-stoplight: id: charge name: Charge public: true credit: title: Credit type: object properties: adjustment: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: 'null' transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: 'null' gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' payment_id: type: 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer period_range_start: type: - string - 'null' format: date period_range_end: type: - string - 'null' format: date example: adjustment: id: 165068820 subscription_id: 14823581 type: Adjustment kind: null transaction_type: adjustment success: true amount_in_cents: -1000 memo: Credit for recycling old computers created_at: '2016-12-05T13:37:28-05:00' starting_balance_in_cents: 177 ending_balance_in_cents: -823 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3794121 tax_id: null component_id: null statement_id: 79335006 customer_id: 14332342 x-stoplight: id: credit name: Credit public: true update-metadata: title: Update Metadata type: object properties: metadata: type: object properties: current_name: type: string name: type: string value: type: string example: metadata: current_name: Color name: Shirt Color value: Blue x-stoplight: id: update-metadata name: Update Metadata public: true paginated-metafields: title: Paginated Metafields type: object properties: total_count: type: integer current_page: type: integer total_pages: type: integer per_page: type: integer metafields: type: array items: $ref: '#/definitions/metafield' example: total_count: 1 current_page: 1 total_pages: 1 per_page: 20 metafields: - name: Pants scope: hosted: [] csv: '0' statements: '0' invoices: '0' portal: '0' data_count: 1 input_type: text enum: null x-stoplight: id: paginated-metafields name: Paginated Metafields public: true create-metadata: title: Create Metadata type: object properties: metadata: type: array items: type: object properties: name: type: string value: type: string example: metadata: - name: Color value: Blue - name: Something value: Useful x-stoplight: id: create-metadata name: Create Metadata public: true update-metafields: title: Update Metafields type: object properties: metafields: type: object properties: current_name: type: string name: type: string scope: type: object properties: hosted: type: array items: type: string csv: type: string invoices: type: string statements: type: string example: metafields: current_name: shirt name: new-shirt scope: hosted: - '1' - '1' - '1' csv: '1' invoices: '1' statements: '1' portal: '0' x-stoplight: id: update-metafields name: Update Metafields public: true create-usage: title: Create Usage type: object properties: usage: type: object properties: quantity: type: - integer - number description: integer by default or decimal number if fractional quantities are enabled for the component price_point_id: type: string memo: type: string required: - quantity example: usage: quantity: 1000 price_point_id: '149416' memo: My memo x-stoplight: id: create-usage name: Create Usage public: true usage: title: Usage type: object properties: usage: type: object properties: id: type: integer memo: type: string created_at: type: string price_point_id: type: integer quantity: type: integer overage_quantity: type: integer component_id: type: integer component_handle: type: string subscription_id: type: integer example: usage: id: 138522957 memo: My memo created_at: '2017-11-13T10:05:32-06:00' price_point_id: 149416 quantity: 1000 x-stoplight: id: usage name: Usage public: true create-metafields: title: Create Metafields type: object properties: metafields: type: object properties: name: type: string scope: type: object properties: csv: type: string invoices: type: string statements: type: string portal: type: string input_type: type: string enum: type: array items: type: string example: metafields: name: Color scope: csv: '0' invoices: '1' statements: '1' portal: '0' input_type: radio enum: - option 1 - option 2 x-stoplight: id: create-metafields name: Create Metafields public: true notes-update-note-output: title: Update Note Output type: object properties: note: type: object properties: id: type: integer body: type: string subscription_id: type: integer created_at: type: string updated_at: type: string sticky: type: boolean example: note: id: 105025 body: Modified test note. subscription_id: 15054201 created_at: '2016-11-03T14:47:08-04:00' updated_at: '2016-11-03T14:49:09-04:00' sticky: true x-stoplight: id: notes-update-note-output name: Update Note Output public: true payments-create-payment-input: title: Create Payment Input type: object properties: payment: type: object properties: amount: type: integer memo: type: string example: payment: amount: 10 memo: Client x paid with $10.00 of nickles x-stoplight: id: payments-create-payment-input name: Create Payment Input public: true notes-read-show-specific-note-output: title: Read Specific Note Output type: object properties: note: type: object properties: body: type: string created_at: type: string id: type: integer sticky: type: boolean subscription_id: type: integer updated_at: type: string example: note: body: Test note. created_at: '2015-06-15T13:26:47-04:00' id: 5 sticky: false subscription_id: 100046 updated_at: '2015-06-15T13:28:12-04:00' x-stoplight: id: notes-read-show-specific-note-output name: Read Specific Note Output public: true notes-update-note-input: title: Update Note Input type: object properties: note: type: object properties: body: type: string sticky: type: boolean example: note: body: Modified test note. sticky: true x-stoplight: id: notes-update-note-input name: Update Note Input public: true payments-create-payment-output: title: Create Payment Output type: object properties: payment: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: 'null' gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' payment_id: type: 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer card_number: type: 'null' card_expiration: type: 'null' card_type: type: 'null' refunded_amount_in_cents: type: integer example: payment: id: 160873334 subscription_id: 15054201 type: Payment kind: manual transaction_type: payment success: true amount_in_cents: 1000 memo: Client x paid with $10.00 of nickles created_at: '2016-11-03T14:58:30-04:00' starting_balance_in_cents: -13989 ending_balance_in_cents: -14989 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3861800 tax_id: null component_id: null statement_id: 79870822 customer_id: 14543792 card_number: null card_expiration: null card_type: null refunded_amount_in_cents: 0 x-stoplight: id: payments-create-payment-output name: Create Payment Output public: true migrations-create-migration-input: title: Create Migration Input type: object properties: migration: type: object properties: product_id: type: integer product_price_point_id: type: integer include_trial: type: boolean description: 'Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.' include_initial_charge: type: boolean include_coupons: type: boolean preserve_period: type: boolean example: migration: product_id: 3801242 product_price_point_id: 56012 include_trial: false include_initial_charge: false include_coupons: true preserve_period: true x-stoplight: id: migrations-create-migration-input name: Create Migration Input public: true notes-list-notes-output: title: Read Notes Output type: array items: type: object properties: note: type: object properties: body: type: string created_at: type: string id: type: integer sticky: type: boolean subscription_id: type: integer updated_at: type: string example: - note: body: Test note. created_at: '2015-06-15T13:26:47-04:00' id: 5 sticky: false subscription_id: 100046 updated_at: '2015-06-15T13:28:12-04:00' - note: body: Another test note. created_at: '2015-06-15T12:04:46-04:00' id: 4 sticky: false subscription_id: 100046 updated_at: '2015-06-15T13:26:33-04:00' x-stoplight: id: notes-list-notes-output name: Read Notes Output public: true payment-profiles-create-payment-profile-input: title: Create Payment Profile Input type: object properties: payment_profile: type: object properties: first_name: type: string last_name: type: string last_four: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: 'null' payment_type: type: string required: - customer_id example: payment_profile: first_name: Jessica last_name: Test last_four: '1111' card_type: visa expiration_month: 10 expiration_year: 2018 customer_id: 19195410 current_vault: bogus vault_token: '1' billing_address: 123 Main St. billing_city: Boston billing_state: MA billing_zip: '02120' billing_country: US customer_vault_token: null billing_address_2: null payment_type: credit_card x-stoplight: id: payment-profiles-create-payment-profile-input name: Create Payment Profile Input public: true migrations-preview-migration-output: title: Preview Migration Output type: object properties: migration: type: object properties: prorated_adjustment_in_cents: type: integer charge_in_cents: type: integer payment_due_in_cents: type: integer credit_applied_in_cents: type: integer example: migration: prorated_adjustment_in_cents: 0 charge_in_cents: 5000 payment_due_in_cents: 0 credit_applied_in_cents: 0 x-stoplight: id: migrations-preview-migration-output name: Preview Migration Output public: true migrations-create-migration-input-trial-output: title: Create Migration Output type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: string trial_ended_at: type: string activated_at: type: string created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: boolean payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: 'null' total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: string coupon_use_count: type: 'null' coupon_uses_allowed: type: 'null' customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: 'null' email: type: string created_at: type: string updated_at: type: string reference: type: 'null' address: type: 'null' address_2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: string portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' verified: type: boolean portal_customer_created_at: type: string cc_emails: type: 'null' product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: string return_params: type: string url: type: string credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: string payment_type: type: string example: subscription: id: 15054201 state: trialing trial_started_at: '2016-11-03T13:43:36-04:00' trial_ended_at: '2016-11-10T12:43:36-05:00' activated_at: '2016-11-02T10:20:57-04:00' created_at: '2016-11-02T10:20:55-04:00' updated_at: '2016-11-03T13:43:36-04:00' expires_at: null balance_in_cents: -13989 current_period_ends_at: '2016-11-10T12:43:36-05:00' next_assessment_at: '2016-11-10T12:43:36-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2016-11-03T13:43:35-04:00' previous_state: active signup_payment_id: 160680121 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 14000 product_price_in_cents: 1000 product_version_number: 6 payment_type: credit_card referral_code: ghnhvy coupon_use_count: null coupon_uses_allowed: null customer: id: 14543792 first_name: Frankie last_name: Test organization: null email: testfrankie111@test.com created_at: '2016-11-02T10:20:55-04:00' updated_at: '2016-11-02T10:20:58-04:00' reference: null address: null address_2: null city: null state: null zip: null country: null phone: '5555551212' portal_invite_last_sent_at: '2016-11-02T10:20:58-04:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2016-11-02T10:20:58-04:00' cc_emails: null product: id: 3861800 name: Trial Product handle: trial-product description: Trial period with payment expected at end of trial. accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-07-08T09:53:55-04:00' updated_at: '2016-09-05T13:00:36-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: 0 trial_interval: 7 trial_interval_unit: day archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 6 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 294791 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/xv52yrcc3byx/trial-product' credit_card: id: 10088716 first_name: F last_name: NB masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2017 customer_id: 14543792 current_vault: bogus vault_token: '1' billing_address: 123 Montana Way billing_city: Billings billing_state: MT billing_zip: '59101' billing_country: US customer_vault_token: null billing_address_2: Apt. 10 payment_type: credit_card x-stoplight: id: migrations-create-migration-input-trial-output name: Create Migration Output public: true payment-profile-read-payment-output-bank-account: title: Read Payment Output - Bank Account type: object properties: payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: string bank_name: type: string masked_bank_routing_number: type: string masked_bank_account_number: type: string bank_account_type: type: string bank_account_holder_type: type: string payment_type: type: string verified: type: boolean default: false description: denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account example: payment_profile: id: 10089892 first_name: Chester last_name: Tester customer_id: 14543792 current_vault: bogus vault_token: '0011223344' billing_address: 456 Juniper Court billing_city: Boulder billing_state: CO billing_zip: '80302' billing_country: US customer_vault_token: null billing_address_2: '' bank_name: Bank of Kansas City masked_bank_routing_number: XXXX6789 masked_bank_account_number: XXXX3344 bank_account_type: checking bank_account_holder_type: personal payment_type: bank_account x-stoplight: id: payment-profile-read-payment-output-bank-account name: Read Payment Output - Bank Account public: true payment-profile-create-payment-profile-output: title: Create Payment Profile Output type: object properties: payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: 'null' card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: 'null' payment_type: type: string example: payment_profile: id: 13731211 first_name: Jessica last_name: Test masked_card_number: null card_type: visa expiration_month: 10 expiration_year: 2018 customer_id: 19195410 current_vault: bogus vault_token: '1' billing_address: 123 Main St. billing_city: Boston billing_state: MA billing_zip: '02120' billing_country: US customer_vault_token: null billing_address_2: null payment_type: credit_card x-stoplight: id: payment-profile-create-payment-profile-output name: Create Payment Profile Output public: true notes-delete-output: title: Delete Output type: object properties: ok: type: string example: ok: ok x-stoplight: id: notes-delete-output name: Delete Output public: true payment-profiles-read-payment-output-cc: title: Read Payment Output - Credit Card type: object properties: payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: string payment_type: type: string disabled: type: boolean example: payment_profile: id: 10088716 first_name: Test last_name: Subscription masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2022 customer_id: 14543792 current_vault: bogus vault_token: '1' billing_address: 123 Montana Way billing_city: Billings billing_state: MT billing_zip: '59101' billing_country: US customer_vault_token: null billing_address_2: '' payment_type: credit_card x-stoplight: id: payment-profiles-read-payment-output-cc name: Read Payment Output - Credit Card public: true product-families-create-product-family-input: title: Create Product Family Input type: object properties: product_family: type: object properties: name: type: string description: type: string required: - name example: product_family: name: Acme Projects description: Amazing project management tool x-stoplight: id: product-families-create-product-family-input name: Create Product Family Input public: true products-read-the-product-via-chargify-id: title: Read the Product by Product ID type: object properties: product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' '': type: integer trial_interval: type: integer trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: string return_params: type: string url: type: string product_price_point_name: type: string request_billing_address: type: boolean require_billing_address: type: boolean require_shipping_address: type: boolean example: product: id: 3861800 name: Trial Product handle: trial-product description: Trial period with payment expected at end of trial. accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2016-07-08T09:53:55-04:00' updated_at: '2016-09-05T13:00:36-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: 0 trial_interval: 7 trial_interval_unit: day archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 6 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 294791 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/xv52yrcc3byx/trial-product' product_price_point_name: Original x-stoplight: id: products-read-the-product-via-chargify-id name: Read the Product by Product ID public: true products-create-a-product-input: title: Create a Product Input type: object properties: product: type: object properties: name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean price_in_cents: type: integer interval: type: integer interval_unit: type: string auto_create_signup_page: type: boolean tax_code: type: string required: - name - description - price_in_cents - interval - interval_unit example: product: name: ipsum handle: sed qui eu description: exercitation accounting_code: dolor enim proident qui request_credit_card: false price_in_cents: -53555719 interval: -72364360 interval_unit: eu auto_create_signup_page: true tax_code: D0000000 x-stoplight: id: products-create-a-product-input name: Create a Product Input public: true products-update-product-input: title: Update Product Input type: object properties: product: type: object properties: name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean price_in_cents: type: integer interval: type: integer interval_unit: type: string auto_create_signup_page: type: boolean tax_code: type: string example: product: name: Platinum Plan handle: platinum description: This is our platinum plan. accounting_code: '123' request_credit_card: true price_in_cents: 1000 interval: 1 interval_unit: month auto_create_signup_page: true tax_code: D0000000 x-stoplight: id: products-update-product-input name: Update Product Input public: true product-families-create-product-family-output: title: Create Product Family Output type: object properties: product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' example: product_family: id: 933860 name: Acme Projects description: Amazing project management tool handle: acme-projects accounting_code: null x-stoplight: id: product-families-create-product-family-output name: Create Product Family Output public: true components-quantity-create-subscription-with-quantity-based-component: title: Create Subscription with Quantity-based Component type: object properties: subscription: type: object properties: product_handle: type: string customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string credit_card_attributes: type: object properties: full_number: type: string expiration_month: type: string expiration_year: type: string components: type: array items: type: object properties: component_id: type: - integer - string description: 'integer or string prefixed with "handle:"' price_point_id: type: integer allocated_quantity: type: integer required: - component_id - allocated_quantity example: subscription: product_handle: basic customer_attributes: first_name: Matt last_name: Example email: matt@example.com credit_card_attributes: full_number: '1' expiration_month: '10' expiration_year: '2020' components: - component_id: 277221 price_point_id: 20001 allocated_quantity: 18 x-stoplight: id: components-quantity-create-subscription-with-quantity-based-component name: Create Subscription with Quantity-based Component public: true product-families-list-product-family-by-id: title: Read Product Family via Product Family ID type: object properties: product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' example: product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null x-stoplight: id: product-families-list-product-family-by-id name: Read Product Family via Product Family ID public: true products-create-a-product-output: title: Create a Product Output type: object properties: product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean description: Deprecated value that can be ignored unless you have legacy hosted pages expiration_interval: type: 'null' expiration_interval_unit: type: 'null' created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: 'null' archived_at: type: 'null' require_credit_card: type: boolean return_params: type: 'null' taxable: type: boolean update_return_url: type: 'null' initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: 'null' product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: 'null' return_params: type: 'null' url: type: string product_price_point_name: type: string request_billing_address: type: boolean require_billing_address: type: boolean require_shipping_address: type: boolean example: product: id: 4364984 name: Gold Plan handle: gold description: This is our gold plan. accounting_code: '123' request_credit_card: true expiration_interval: null expiration_interval_unit: null created_at: '2016-11-04T16:31:15-04:00' updated_at: '2016-11-04T16:31:15-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: null archived_at: null require_credit_card: true return_params: null taxable: false update_return_url: null initial_charge_after_trial: false version_number: 1 update_return_params: null product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 301078 return_url: null return_params: null url: 'https://general-goods.chargify.com/subscribe/ftgbpq7f5qpr/gold' product_price_point_name: Original x-stoplight: id: products-create-a-product-output name: Create a Product Output public: true products-update-product-output: title: Update Product Output type: object properties: product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: 'null' created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: 'null' archived_at: type: 'null' require_credit_card: type: boolean return_params: type: 'null' taxable: type: boolean update_return_url: type: 'null' initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: 'null' product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: 'null' return_params: type: 'null' url: type: string request_billing_address: type: boolean require_billing_address: type: boolean require_shipping_address: type: boolean example: product: id: 4365034 name: Platinum Plan handle: platinum description: This is our platinum plan. accounting_code: '123' request_credit_card: true expiration_interval: null expiration_interval_unit: null created_at: '2016-11-04T16:34:29-04:00' updated_at: '2016-11-04T16:37:11-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: null archived_at: null require_credit_card: true return_params: null taxable: false update_return_url: null initial_charge_after_trial: false version_number: 1 update_return_params: null product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 301079 return_url: null return_params: null url: 'https://general-goods.chargify.com/subscribe/wgyd96tb5pj9/platinum' x-stoplight: id: products-update-product-output name: Update Product Output public: true statements-list-statement-ids-for-a-subscription-response: title: Read Statement IDs for a Subscription Response type: object properties: statement_ids: type: array items: type: integer example: statement_ids: - 79221109 - 79221381 - 79221642 - 79221742 - 79334531 - 79702531 - 79733833 x-stoplight: id: statements-list-statement-ids-for-a-subscription-response name: Read Statement IDs for a Subscription Response public: true statements-list-statement-ids-for-a-site-response: title: Read Statement IDs for a Site Response type: object properties: statement_ids: type: array items: type: integer example: statement_ids: - 67201893 - 67266652 - 67301249 - 67301813 - 80499378 - 80499379 - 80500632 x-stoplight: id: statements-list-statement-ids-for-a-site-response name: Read Statement IDs for a Site Response public: true refunds-external-create-an-external-refund-request: title: Create an External Refund Request type: object properties: refund: type: object properties: amount: type: integer memo: type: string external: type: integer example: refund: amount: 20 memo: 'Refunded with check# 123' external: 1 x-stoplight: id: refunds-external-create-an-external-refund-request name: Create an External Refund Request public: true refunds-external-create-an-external-refund-response: title: Create an External Refund Response type: object properties: refund: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: 'null' gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' payment_id: type: 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer example: refund: id: 162275149 subscription_id: 15236915 type: Refund kind: manual transaction_type: refund success: true amount_in_cents: 2000 memo: 'Refunded with check# 123' created_at: '2016-11-14T15:24:41-05:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 80500632 customer_id: 14714298 x-stoplight: id: refunds-external-create-an-external-refund-response name: Create an External Refund Response public: true referral-validate-response: title: Validate Referral Response type: object properties: referral_code: type: object properties: id: type: integer site_id: type: integer subscription_id: type: integer code: type: string example: referral_code: id: 919199 site_id: 31615 subscription_id: 15076690 code: gj4rht x-stoplight: id: referral-validate-response name: Validate Referral Response public: true refunds-create-a-refund-request: title: Create a Refund Request type: object properties: refund: type: object properties: payment_id: type: string amount: type: string memo: type: string example: refund: payment_id: '162269766' amount: '100.00' memo: Your memo here. x-stoplight: id: refunds-create-a-refund-request name: Create a Refund Request public: true refunds-create-a-refund-response: title: Create a Refund Response type: object properties: refund: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: 'null' transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: string gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' payment_id: type: integer product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer example: refund: id: 162272485 subscription_id: 15236915 type: Refund kind: null transaction_type: refund success: true amount_in_cents: 10000 memo: Your memo here. created_at: '2016-11-14T15:14:14-05:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: null gateway_order_id: null payment_id: 162269766 product_id: 3792003 tax_id: null component_id: null statement_id: 80500632 customer_id: 14714298 x-stoplight: id: refunds-create-a-refund-response name: Create a Refund Response public: true statements-count-statements-response: title: Count Statements Response type: object properties: count: type: integer example: count: 129 x-stoplight: id: statements-count-statements-response name: Count Statements Response public: true statements-list-statements-for-a-subscription-response: title: Read Statements for a Subscription type: array items: type: object properties: statement: type: object properties: id: type: integer basic_html_view: type: string closed_at: type: string created_at: type: string customer_billing_address: type: string customer_billing_address_2: type: string customer_billing_city: type: string customer_billing_country: type: string customer_billing_state: type: string customer_billing_zip: type: string customer_first_name: type: string customer_last_name: type: string customer_organization: type: string customer_shipping_address: type: string customer_shipping_address_2: type: string customer_shipping_city: type: string customer_shipping_country: type: string customer_shipping_state: type: string customer_shipping_zip: type: string ending_balance_in_cents: type: integer future_payments: type: array items: type: object html_view: type: string memo: type: string opened_at: type: string settled_at: type: string starting_balance_in_cents: type: integer subscription_id: type: integer text_view: type: string updated_at: type: string total_in_cents: type: integer transactions: type: array items: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: - 'null' - string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: - 'null' - string gateway_transaction_id: type: - 'null' - string gateway_order_id: type: 'null' payment_id: type: - integer - 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer item_name: type: string original_amount_in_cents: type: 'null' discount_amount_in_cents: type: 'null' taxable_amount_in_cents: type: - integer - 'null' taxations: type: array items: type: object properties: tax_id: type: 'null' tax_charge_id: type: integer tax_name: type: string rate: type: string tax_amount_in_cents: type: integer tax_rules: type: array items: type: object properties: tax_rule_id: type: 'null' country_code: type: string subdivision_code: type: string rate: type: string tax_amount_in_cents: type: integer description: type: string card_number: type: string card_expiration: type: string card_type: type: string refunded_amount_in_cents: type: integer events: type: array items: type: object properties: event: type: object properties: id: type: integer key: type: string message: type: string subscription_id: type: integer created_at: type: string event_specific_data: type: - 'null' - object properties: product_id: type: integer account_transaction_id: type: - integer - 'null' previous_subscription_state: type: string new_subscription_state: type: string example: - statement: id: 79221109 basic_html_view: |
My Awesome Company
(79221109)
Acme Projects - Trial Product

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

closed_at: '2016-10-24T16:20:13-04:00' created_at: '2016-10-24T16:20:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:12-04:00' settled_at: '2016-10-24T16:20:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221109) billing@example.com Acme Projects - Trial Product ================================================================================ -------- Summary -------- ID......: 79221109 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $0.00 Payments..........: $0.00 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:20PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:20PM EDT Recur Trial Price (10/24/2016 - 10/31/2016) $0.00 ............ ..... ............................................... .......... Totals: $0.00 ### Payments No payments this period --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Signup Success 04:20PM EDT Successful signup for Amelia Example's subscription to Trial Produ ct ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:20:13-04:00' total_in_cents: 0 transactions: - id: 159423810 subscription_id: 14900541 type: Charge kind: trial transaction_type: charge success: true amount_in_cents: 0 memo: Trial Price (10/24/2016 - 10/31/2016) created_at: '2016-10-24T16:20:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3861800 tax_id: null component_id: null statement_id: 79221109 customer_id: 14399371 item_name: Trial Price original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] events: - event: id: 342036408 key: signup_success message: Successful signup for Amelia Example's subscription to Trial Product subscription_id: 14900541 created_at: '2016-10-24T16:20:13-04:00' event_specific_data: product_id: 3861800 account_transaction_id: null - statement: id: 79221381 basic_html_view: |
My Awesome Company
(79221381)
Acme Projects - Basic Plan

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $42.50
Payments: $42.50
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:21PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:21PM EDT Recurring Basic Plan (10/24/2016 - 11/24/2016) $40.00
10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50
Totals $42.50

Payments

Date/Time Type Detail Amount
10/24/2016 04:21PM EDT CC Payment
Amelia Example - Basic Plan: Renewal payment
XXXX-XXXX-XXXX-1 bogus (01/2026)
$42.50
Totals $42.50

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Subscription State Change State changed on Amelia Example's subscription to Basic Plan from trialing to active
10/24/2016 04:20PM EDT Subscription Product Change Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan'
10/24/2016 04:21PM EDT Billing Date Change Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016
10/24/2016 04:21PM EDT Renewal Success Successful renewal for Amelia Example's subscription to Basic Plan
10/24/2016 04:21PM EDT Payment Success Successful payment of $42.50 for Amelia Example's subscription to Basic Plan

We thank you for your continued business!

closed_at: '2016-10-24T16:21:13-04:00' created_at: '2016-10-24T16:21:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $42.50
Payments: $42.50
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:21PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:21PM EDT Recurring Basic Plan (10/24/2016 - 11/24/2016) $40.00
10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50
Totals $42.50

Payments

Date/Time Type Detail Amount
10/24/2016 04:21PM EDT CC Payment
Amelia Example - Basic Plan: Renewal payment
XXXX-XXXX-XXXX-1 bogus (01/2026)
$42.50
Totals $42.50

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Subscription State Change State changed on Amelia Example's subscription to Basic Plan from trialing to active
10/24/2016 04:20PM EDT Subscription Product Change Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan'
10/24/2016 04:21PM EDT Billing Date Change Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016
10/24/2016 04:21PM EDT Renewal Success Successful renewal for Amelia Example's subscription to Basic Plan
10/24/2016 04:21PM EDT Payment Success Successful payment of $42.50 for Amelia Example's subscription to Basic Plan

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:14-04:00' settled_at: '2016-10-24T16:21:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221381) billing@example.com Acme Projects - Basic Plan ================================================================================ -------- Summary -------- ID......: 79221381 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $42.50 Payments..........: $42.50 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:21PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:21PM EDT Recur Basic Plan (10/24/2016 - 11/24/2016) $40.00 ............ ..... ............................................... .......... 10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50 ............ ..... ............................................... .......... Totals: $42.50 ### Payments Date/Time Type Detail Amount ............ ..... ............................................... .......... 10/24/2016 XXXX-XXXX-XXXX-1 bogus (01/2026) 04:21PM EDT CCPay Amelia Example - Basic Plan: Renewal payment $42.50 ............ ..... ............................................... .......... Totals: $42.50 --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Subscription State Change 04:20PM EDT State changed on Amelia Example's subscription to Basic Plan from trialing to active ............ .................................................................. 10/24/2016 Subscription Product Change 04:20PM EDT Product changed on Amelia Example's subscription from 'Trial Produ ct' to 'Basic Plan' ............ .................................................................. 10/24/2016 Billing Date Change 04:21PM EDT Billing date changed on Amelia Example's subscription to Basic Pla n from 10/31/2016 to 10/24/2016 ............ .................................................................. 10/24/2016 Renewal Success 04:21PM EDT Successful renewal for Amelia Example's subscription to Basic Plan ............ .................................................................. 10/24/2016 Payment Success 04:21PM EDT Successful payment of $42.50 for Amelia Example's subscription to Basic Plan ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:21:13-04:00' total_in_cents: 4250 transactions: - id: 159424439 subscription_id: 14900541 type: Charge kind: baseline transaction_type: charge success: true amount_in_cents: 4000 memo: Basic Plan (10/24/2016 - 11/24/2016) created_at: '2016-10-24T16:21:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 4000 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 159424449 product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: 4000 taxations: - tax_id: null tax_charge_id: 159424444 tax_name: MA Tax rate: '0.0625' tax_amount_in_cents: 250 tax_rules: - tax_rule_id: null country_code: US subdivision_code: MA rate: '0.0625' tax_amount_in_cents: 250 description: MA STATE TAX - MASSACHUSETTS - id: 159424444 subscription_id: 14900541 type: Charge kind: tax transaction_type: charge success: true amount_in_cents: 250 memo: MA Tax (6.25%) created_at: '2016-10-24T16:21:12-04:00' starting_balance_in_cents: 4000 ending_balance_in_cents: 4250 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 159424449 product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] - id: 159424449 subscription_id: 14900541 type: Payment kind: null transaction_type: payment success: true amount_in_cents: 4250 memo: 'Amelia Example - Basic Plan: Renewal payment' created_at: '2016-10-24T16:21:13-04:00' starting_balance_in_cents: 4250 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 card_number: XXXX-XXXX-XXXX-1 card_expiration: 01/2026 card_type: bogus refunded_amount_in_cents: 0 events: - event: id: 342036536 key: subscription_state_change message: State changed on Amelia Example's subscription to Basic Plan from trialing to active subscription_id: 14900541 created_at: '2016-10-24T16:20:43-04:00' event_specific_data: previous_subscription_state: trialing new_subscription_state: active - event: id: 342036540 key: subscription_product_change message: Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan' subscription_id: 14900541 created_at: '2016-10-24T16:20:43-04:00' event_specific_data: previous_product_id: 3861800 new_product_id: 3792003 - event: id: 342037380 key: billing_date_change message: Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016 subscription_id: 14900541 created_at: '2016-10-24T16:21:11-04:00' event_specific_data: null - event: id: 342037470 key: renewal_success message: Successful renewal for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-10-24T16:21:14-04:00' event_specific_data: product_id: 3792003 account_transaction_id: 159424449 - event: id: 342037482 key: payment_success message: Successful payment of $42.50 for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-10-24T16:21:14-04:00' event_specific_data: product_id: 3792003 account_transaction_id: 159424449 x-stoplight: id: statements-list-statements-for-a-subscription-response name: Read Statements for a Subscription public: true statements-read-show-by-chargify-id: title: Read by Statement ID type: object properties: statement: type: object properties: id: type: integer basic_html_view: type: string closed_at: type: string created_at: type: string customer_billing_address: type: string customer_billing_address_2: type: string customer_billing_city: type: string customer_billing_country: type: string customer_billing_state: type: string customer_billing_zip: type: string customer_first_name: type: string customer_last_name: type: string customer_organization: type: string customer_shipping_address: type: string customer_shipping_address_2: type: string customer_shipping_city: type: string customer_shipping_country: type: string customer_shipping_state: type: string customer_shipping_zip: type: string ending_balance_in_cents: type: integer future_payments: type: array items: type: object html_view: type: string memo: type: string opened_at: type: string settled_at: type: string starting_balance_in_cents: type: integer subscription_id: type: integer text_view: type: string updated_at: type: string total_in_cents: type: integer transactions: type: array items: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: 'null' gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' payment_id: type: 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer item_name: type: string original_amount_in_cents: type: 'null' discount_amount_in_cents: type: 'null' taxable_amount_in_cents: type: 'null' taxations: type: array items: type: object events: type: array items: type: object properties: event: type: object properties: id: type: integer key: type: string message: type: string subscription_id: type: integer created_at: type: string event_specific_data: type: object properties: product_id: type: integer account_transaction_id: type: 'null' example: statement: id: 79221109 basic_html_view: |
My Awesome Company
(79221109)
Acme Projects - Trial Product

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

closed_at: '2016-10-24T16:20:13-04:00' created_at: '2016-10-24T16:20:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:12-04:00' settled_at: '2016-10-24T16:20:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221109) billing@example.com Acme Projects - Trial Product ================================================================================ -------- Summary -------- ID......: 79221109 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $0.00 Payments..........: $0.00 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:20PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:20PM EDT Recur Trial Price (10/24/2016 - 10/31/2016) $0.00 ............ ..... ............................................... .......... Totals: $0.00 ### Payments No payments this period --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Signup Success 04:20PM EDT Successful signup for Amelia Example's subscription to Trial Produ ct ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:20:13-04:00' total_in_cents: 0 transactions: - id: 159423810 subscription_id: 14900541 type: Charge kind: trial transaction_type: charge success: true amount_in_cents: 0 memo: Trial Price (10/24/2016 - 10/31/2016) created_at: '2016-10-24T16:20:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3861800 tax_id: null component_id: null statement_id: 79221109 customer_id: 14399371 item_name: Trial Price original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] events: - event: id: 342036408 key: signup_success message: Successful signup for Amelia Example's subscription to Trial Product subscription_id: 14900541 created_at: '2016-10-24T16:20:13-04:00' event_specific_data: product_id: 3861800 account_transaction_id: null x-stoplight: id: statements-read-show-by-chargify-id name: Read by Statement ID public: true subscriptions-update-subscription-payment-method-request: title: 'Update Subscription: Payment Method Request' type: object properties: subscription: type: object properties: credit_card_attributes: type: object properties: full_number: type: string expiration_month: type: string expiration_year: type: string example: subscription: credit_card_attributes: full_number: '4111111111111111' expiration_month: '10' expiration_year: '2030' x-stoplight: id: subscriptions-update-subscription-payment-method-request name: 'Update Subscription: Payment Method Request' public: true subscriptions-subscription-import-request: title: Subscription Import Request type: object properties: subscription: type: object properties: product_handle: type: string next_billing_at: type: string customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string reference: type: string organization: type: string payment_profile_attributes: type: object properties: vault_token: type: string customer_vault_token: type: string current_vault: type: string expiration_year: type: string expiration_month: type: string card_type: type: string last_four: type: string canceled_at: type: string cancellation_message: type: string reason_code: type: string activated_at: type: string previous_billing_at: type: string example: subscription: product_handle: basic next_billing_at: '2010-08-29T12:00:00-04:00' previous_billing_at: '2010-07-29T12:00:00-04:00' customer_attributes: first_name: John last_name: Doe email: john.doe@example.com reference: '123' organization: Acme Widgets payment_profile_attributes: vault_token: '12345' customer_vault_token: '67890' current_vault: authorizenet expiration_year: '2020' expiration_month: '12' card_type: visa last_four: '1111' x-stoplight: id: subscriptions-subscription-import-request name: Subscription Import Request public: true subscriptions-cancel-subscription-request: title: Cancel Subscription Request type: object properties: subscription: type: object properties: cancellation_message: type: string cancellation_method: type: string reason_code: type: string example: subscription: cancellation_message: Canceling the subscription via the API x-stoplight: id: subscriptions-cancel-subscription-request name: Cancel Subscription Request public: true subscriptions-update-subscription-product-change-request: title: 'Update Subscription: Product Change Request - handle' type: object properties: subscription: type: object properties: product_handle: type: string example: subscription: product_handle: pro x-stoplight: id: subscriptions-update-subscription-product-change-request name: 'Update Subscription: Product Change Request - handle' public: true subscriptions-create-subscription-request: title: Create Subscription Request type: object properties: subscription: type: object properties: product_handle: type: string description: 'The API Handle of the product for which you are creating a subscription. Required, unless a product_id is given instead.' product_id: type: string description: 'The Product ID of the product for which you are creating a subscription. The product ID is not currently published, so we recommend using the API Handle instead.' product_price_point_handle: type: string description: The user-friendly API handle of a product's particular price point. product_price_point_id: type: string description: The ID of the particular price point on the product. coupon_code: type: string payment_collection_method: type: string receives_invoice_emails: type: boolean net_terms: type: string customer_id: type: string description: 'The ID of an existing customer within Chargify. Required, unless a customer_reference or a set of customer_attributes is given.' next_billing_at: type: string stored_credential_transaction_id: type: integer sales_rep_id: type: integer payment_profile_id: type: string reference: type: string description: The reference value (provided by your app) for the subscription itelf. customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string cc_emails: type: string organization: type: string reference: type: 'null' address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string verified: type: boolean tax_exempt: type: boolean vat_number: type: string credit_card_attributes: type: object properties: chargify_token: type: string id: type: integer payment_type: type: string first_name: type: string last_name: type: string masked_card_number: type: string full_number: type: string card_type: type: string expiration_month: type: - integer - string expiration_year: type: - integer - string billing_address: type: string billing_address_2: type: string billing_city: type: string billing_state: type: 'null' billing_country: type: string billing_zip: type: string current_vault: type: string vault_token: type: string customer_vault_token: type: string customer_id: type: integer paypal_email: type: string payment_method_nonce: type: string gateway_handle: type: string description: Required to identify gateway if using the multi-gateway feature bank_account_attributes: type: object properties: chargify_token: type: string bank_name: type: string bank_routing_number: type: string bank_account_number: type: string bank_account_type: type: string bank_branch_code: type: string bank_iban: type: string bank_account_holder_type: type: string payment_type: type: string components: type: array items: type: object properties: component_id: type: integer enabled: type: boolean unit_balance: type: integer allocated_quantity: type: integer price_point_id: type: integer calendar_billing: type: object properties: snap_day: type: integer calendar_billing_first_charge: type: string metafields: type: object properties: color: type: string comments: type: string currency: type: string customer_reference: type: string description: 'The reference value (provided by your app) of an existing customer within Chargify. Required, unless a customer_id or a set of customer_attributes is given.' example: subscription: product_handle: Pro product_id: '482734' product_price_point_handle: v3 product_price_point_id: '615342' coupon_code: 5SNN6HFK3GBH payment_collection_method: automatic receives_invoice_emails: false net_terms: '10' customer_id: '12345' next_billing_at: 1/1/2020 stored_credential_transaction_id: 166465511220288 payment_profile_id: '54321' reference: my-ref-123 customer_attributes: first_name: Curtis last_name: Test email: curtis@example.com cc_emails: jeff@example.com organization: '' reference: null address: 123 Anywhere Street address_2: '' city: Boulder state: CO zip: '80302' country: US phone: '' verified: false tax_exempt: false vat_number: 012345678 credit_card_attributes: chargify_token: tok_cwhvpfcnbtgkd8nfkzf9dnjn id: 10191713 payment_type: credit_card first_name: Curtis last_name: Test masked_card_number: XXXX-XXXX-XXXX-1 full_number: '' card_type: bogus expiration_month: 1 expiration_year: 2026 billing_address: 123 Anywhere Street billing_address_2: '' billing_city: Boulder billing_state: null billing_country: '' billing_zip: '80302' current_vault: bogus vault_token: '1' customer_vault_token: '1234' customer_id: 14714298 paypal_email: amelia@example.com payment_method_nonce: abc123 bank_account_attributes: chargify_token: tok_cwhvpfcnbtgkd8nfkzf9dnjn bank_name: Best Bank bank_routing_number: 021000089 bank_account_number: '111111111111' bank_account_type: checking bank_branch_code: '00006' bank_iban: FR1420041010050500013M02606 bank_account_holder_type: business payment_type: bank_account components: - component_id: 2500 enabled: true - component_id: 195268 unit_balance: 20 - component_id: 2500 allocated_quantity: 14 price_point_id: 499 calendar_billing: snap_day: 1 calendar_billing_first_charge: immediate metafields: color: blue comments: Thanks! x-stoplight: id: subscriptions-create-subscription-request name: Create Subscription Request public: true subscription-read-subscription: title: Read Subscription MAIN type: object properties: subscription: type: object properties: id: type: integer state: type: string balance_in_cents: type: integer total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer current_period_ends_at: type: string next_assessment_at: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string expires_at: type: 'null' created_at: type: string updated_at: type: string cancellation_message: type: 'null' cancellation_method: type: 'null' cancel_at_end_of_period: type: 'null' canceled_at: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: string payment_collection_method: type: string snap_day: type: 'null' reason_code: type: 'null' receives_invoice_emails: type: boolean net_terms: type: integer reference: type: string customer: type: object properties: first_name: type: string last_name: type: string email: type: string cc_emails: type: string organization: type: string reference: type: 'null' id: type: integer created_at: type: string updated_at: type: string address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string verified: type: boolean portal_customer_created_at: type: string portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' tax_exempt: type: boolean vat_number: type: string product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' expiration_interval: type: 'null' expiration_interval_unit: type: string trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string initial_charge_after_trial: type: boolean return_params: type: string request_credit_card: type: boolean require_credit_card: type: boolean created_at: type: string updated_at: type: string archived_at: type: 'null' update_return_url: type: string update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string handle: type: string accounting_code: type: 'null' description: type: string public_signup_pages: type: array items: type: object properties: id: type: integer url: type: string taxable: type: boolean version_number: type: integer product_price_point_name: type: string credit_card: type: object properties: id: type: integer payment_type: type: string first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer billing_address: type: string billing_address_2: type: string billing_city: type: string billing_state: type: 'null' billing_country: type: string billing_zip: type: string current_vault: type: string vault_token: type: string customer_vault_token: type: 'null' customer_id: type: integer payment_type: type: string referral_code: type: string next_product_id: type: 'null' coupon_use_count: type: integer coupon_uses_allowed: type: integer stored_credential_transaction_id: type: integer next_product_handle: type: 'null' on_hold_at: type: 'null' scheduled_cancellation_at: type: string prepaid_dunning: type: boolean example: subscription: id: 15236915 state: active balance_in_cents: 0 total_revenue_in_cents: 14000 product_price_in_cents: 1000 product_version_number: 7 current_period_ends_at: '2016-11-15T14:48:10-05:00' next_assessment_at: '2016-11-15T14:48:10-05:00' trial_started_at: null trial_ended_at: null activated_at: '2016-11-14T14:48:12-05:00' expires_at: null created_at: '2016-11-14T14:48:10-05:00' updated_at: '2016-11-14T15:24:41-05:00' cancellation_message: null cancellation_method: null cancel_at_end_of_period: null canceled_at: null current_period_started_at: '2016-11-14T14:48:10-05:00' previous_state: active signup_payment_id: 162269766 signup_revenue: '260.00' delayed_cancel_at: null coupon_code: 5SNN6HFK3GBH payment_collection_method: automatic snap_day: null reason_code: null receives_invoice_emails: false net_terms: 0 reference: my-ref-123 customer: first_name: Curtis last_name: Test email: curtis@example.com cc_emails: jeff@example.com organization: '' reference: null id: 14714298 created_at: '2016-11-14T14:48:10-05:00' updated_at: '2016-11-14T14:48:13-05:00' address: 123 Anywhere Street address_2: '' city: Boulder state: CO zip: '80302' country: US phone: '' verified: false portal_customer_created_at: '2016-11-14T14:48:13-05:00' portal_invite_last_sent_at: '2016-11-14T14:48:13-05:00' portal_invite_last_accepted_at: null tax_exempt: false vat_number: 012345678 product: id: 3792003 name: $10 Basic Plan handle: basic description: lorem ipsum accounting_code: basic price_in_cents: 1000 interval: 1 interval_unit: day initial_charge_in_cents: null expiration_interval: null expiration_interval_unit: never trial_price_in_cents: null trial_interval: null trial_interval_unit: month initial_charge_after_trial: false return_params: '' request_credit_card: false require_credit_card: false created_at: '2016-03-24T13:38:39-04:00' updated_at: '2016-11-03T13:03:05-04:00' archived_at: null update_return_url: '' update_return_params: '' product_family: id: 527890 name: Acme Projects handle: billing-plans accounting_code: null description: '' public_signup_pages: - id: 281054 url: 'https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic' - id: 281240 url: 'https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic' - id: 282694 url: 'https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic' taxable: false version_number: 7 product_price_point_name: Default credit_card: id: 10191713 payment_type: credit_card first_name: Curtis last_name: Test masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2026 billing_address: 123 Anywhere Street billing_address_2: '' billing_city: Boulder billing_state: null billing_country: '' billing_zip: '80302' current_vault: bogus vault_token: '1' customer_vault_token: null customer_id: 14714298 payment_type: credit_card referral_code: w7kjc9 next_product_id: null coupon_use_count: 1 coupon_uses_allowed: 1 stored_credential_transaction_id: 166115589220288 next_product_handle: null on_hold_at: null scheduled_cancellation_at: '2016-11-14T14:48:13-05:00' x-stoplight: id: subscription-read-subscription name: Read Subscription MAIN public: true subscriptions-update-subscription-billing-day-change-request: title: 'Update Subscription: Billing Day Change Request' type: object properties: subscription: type: object properties: snap_day: type: string example: subscription: snap_day: end x-stoplight: id: subscriptions-update-subscription-billing-day-change-request name: 'Update Subscription: Billing Day Change Request' public: true subscriptions-subscription-import-response: title: Subscription Import Response type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: 'null' payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: 'null' total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: string coupon_use_count: type: 'null' coupon_uses_allowed: type: 'null' customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: string email: type: string created_at: type: string updated_at: type: string reference: type: string address: type: 'null' address_2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: 'null' portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' verified: type: boolean portal_customer_created_at: type: string cc_emails: type: 'null' product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: string return_params: type: string url: type: string credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: 'null' billing_city: type: 'null' billing_state: type: 'null' billing_zip: type: 'null' billing_country: type: 'null' customer_vault_token: type: string billing_address_2: type: 'null' payment_type: type: string payer_id: type: integer example: subscription: id: 15254809 state: active trial_started_at: null trial_ended_at: null activated_at: '2016-11-15T15:33:44-05:00' created_at: '2016-11-15T15:33:44-05:00' updated_at: '2016-11-15T15:33:44-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2017-08-29T12:00:00-04:00' next_assessment_at: '2017-08-29T12:00:00-04:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: null payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2016-11-15T15:33:44-05:00' previous_state: active signup_payment_id: 0 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 1000 product_version_number: 7 payment_type: credit_card referral_code: tg8qbq coupon_use_count: null coupon_uses_allowed: null customer: id: 14731081 first_name: John last_name: Doe organization: Acme Widgets email: john.doe@example.com created_at: '2016-11-15T15:33:44-05:00' updated_at: '2016-11-15T15:33:45-05:00' reference: '123' address: null address_2: null city: null state: null zip: null country: null phone: null portal_invite_last_sent_at: '2016-11-15T15:33:45-05:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2016-11-15T15:33:45-05:00' cc_emails: null product: id: 3792003 name: $10 Basic Plan handle: basic description: lorem ipsum accounting_code: basic request_credit_card: false expiration_interval: null expiration_interval_unit: never created_at: '2016-03-24T13:38:39-04:00' updated_at: '2016-11-03T13:03:05-04:00' price_in_cents: 1000 interval: 1 interval_unit: day initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 7 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 281054 return_url: 'http://www.example.com?successfulsignup' return_params: '' url: 'https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic' - id: 281240 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic' - id: 282694 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic' credit_card: id: 10202898 first_name: John last_name: Doe masked_card_number: XXXX-XXXX-XXXX-1111 card_type: visa expiration_month: 12 expiration_year: 2020 customer_id: 14731081 current_vault: authorizenet vault_token: '12345' billing_address: null billing_city: null billing_state: null billing_zip: null billing_country: null customer_vault_token: '67890' billing_address_2: null payment_type: credit_card payer_id: 14731081 x-stoplight: id: subscriptions-subscription-import-response name: Subscription Import Response public: true subscriptions-change-default-payment-profile-response: title: Create Default Payment Profile Response type: object properties: payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: string payment_type: type: string example: payment_profile: id: 10211899 first_name: Amelia last_name: Example masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 2 expiration_year: 2018 customer_id: 14399371 current_vault: bogus vault_token: '1' billing_address: '' billing_city: '' billing_state: '' billing_zip: '' billing_country: '' customer_vault_token: null billing_address_2: '' payment_type: credit_card x-stoplight: id: subscriptions-change-default-payment-profile-response name: Create Default Payment Profile Response public: true transactions-transaction-response: title: Transaction Response type: object properties: transaction: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: string gateway_transaction_id: type: string gateway_order_id: type: 'null' payment_id: type: 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer item_name: type: 'null' parent_id: type: 'null' role: type: 'null' card_number: type: string card_expiration: type: string card_type: type: string refunded_amount_in_cents: type: integer period_range_start: type: string period_range_end: type: string price_point_id: type: integer price_point_handle: type: string gateway_response: type: object description: 'the gateway response for a single payment, only if requested in the query string. not available when listing multiple transactions for a site.' component_handle: type: - string - 'null' component_price_point_id: type: - integer - 'null' component_price_point_handle: type: - string - 'null' example: transaction: id: 237759849 subscription_id: 21607180 type: Payment kind: one_time transaction_type: payment success: true amount_in_cents: 10000 memo: 'Payment for: 123' created_at: '2018-04-24T16:48:19-05:00' starting_balance_in_cents: 10000 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 4610619 tax_id: null component_id: null statement_id: 113513284 customer_id: 21259051 item_name: null parent_id: null role: null card_number: XXXX-XXXX-XXXX-1 card_expiration: 01/2028 card_type: bogus refunded_amount_in_cents: 0 period_range_start: '2018-04-24' period_range_end: '2018-05-24' price_point_id: 41975 price_point_handle: default-price x-stoplight: id: transactions-transaction-response name: Transaction Response public: true subscriptions-subscription-preview-request: title: Subscription Preview Request type: object properties: subscription: type: object properties: product_handle: type: string product_price_point_handle: type: string coupon_code: type: string components: type: array items: type: object properties: component_id: type: integer allocated_quantity: type: integer unit_balance: type: integer quantity: type: integer example: subscription: product_handle: gold-product product_price_point_handle: default coupon_code: 1DOLLAR components: - component_id: 462149 allocated_quantity: 14 - component_id: 426665 unit_balance: 20 - component_id: 426670 quantity: 1 x-stoplight: id: subscriptions-subscription-preview-request name: Subscription Preview Request public: true subscriptions-subscription-override-request: title: Subscription Override Request type: object example: subscription: activated_at: '1999-12-01' canceled_at: '2000-12-31' cancellation_message: Original cancellation in 2000 expires_at: '2001-07-15' current_period_starts_at: '2018-01-01' x-stoplight: id: subscriptions-subscription-override-request name: Subscription Override Request public: true coupons-create-coupon-input-percentage: title: Percentage Coupon type: object properties: coupon: type: object properties: name: type: string description: the name of the coupon code: type: string description: type: string percentage: type: number allow_negative_balance: type: string recurring: type: string end_date: type: string product_family_id: type: string stackable: type: string compounding_strategy: type: string exclude_mid_period_allocations: type: boolean restricted_products: type: object properties: '1': type: boolean restricted_components: type: object properties: '1': type: boolean '2': type: boolean example: coupon: name: 15% off code: 15OFF description: 15% off for life percentage: 33.3333 allow_negative_balance: 'false' recurring: 'false' end_date: '2012-08-29T12:00:00-04:00' product_family_id: '2' stackable: 'true' compounding_strategy: compound exclude_mid_period_allocations: true restricted_products: '1': true restricted_components: '1': true '2': false x-stoplight: id: coupons-create-coupon-input-percentage name: Percentage Coupon public: true coupon-create-subscription-with-coupon-output: title: Create Subscription with Coupon Output type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: 'null' payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: string total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: string coupon_use_count: type: integer coupon_uses_allowed: type: 'null' customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: 'null' email: type: string created_at: type: string updated_at: type: string reference: type: 'null' address: type: 'null' address_2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: 'null' portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' verified: type: boolean portal_customer_created_at: type: string cc_emails: type: 'null' tax_exempt: type: boolean product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: string return_params: type: string url: type: string credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: 'null' billing_city: type: 'null' billing_state: type: 'null' billing_zip: type: 'null' billing_country: type: 'null' customer_vault_token: type: 'null' billing_address_2: type: 'null' payment_type: type: string payer_id: type: integer example: subscription: id: 15479934 state: active trial_started_at: null trial_ended_at: null activated_at: '2016-12-02T15:59:08-05:00' created_at: '2016-12-02T15:59:06-05:00' updated_at: '2016-12-02T15:59:08-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2016-12-03T15:59:06-05:00' next_assessment_at: '2016-12-03T15:59:06-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: null payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2016-12-02T15:59:06-05:00' previous_state: active signup_payment_id: 164720323 signup_revenue: '5.00' delayed_cancel_at: null coupon_code: 100PERCENT total_revenue_in_cents: 500 product_price_in_cents: 1000 product_version_number: 7 payment_type: credit_card referral_code: 7b8p8v coupon_use_count: 1 coupon_uses_allowed: null payer_id: 14943291 customer: id: 14943291 first_name: Joe last_name: Blow organization: null email: joe@example.com created_at: '2016-12-02T15:59:06-05:00' updated_at: '2016-12-02T15:59:09-05:00' reference: null address: null address_2: null city: null state: null zip: null country: null phone: null portal_invite_last_sent_at: '2016-12-02T15:59:09-05:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2016-12-02T15:59:09-05:00' cc_emails: null tax_exempt: false product: id: 3792003 name: $10 Basic Plan handle: basic description: lorem ipsum accounting_code: basic request_credit_card: false expiration_interval: null expiration_interval_unit: never created_at: '2016-03-24T13:38:39-04:00' updated_at: '2016-11-03T13:03:05-04:00' price_in_cents: 1000 interval: 1 interval_unit: day initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' initial_charge_after_trial: false version_number: 7 update_return_params: '' product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null public_signup_pages: - id: 281054 return_url: 'http://www.example.com?successfulsignup' return_params: '' url: 'https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic' - id: 281240 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic' - id: 282694 return_url: '' return_params: '' url: 'https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic' credit_card: id: 10345872 first_name: Joe last_name: Blow masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 10 expiration_year: 2020 customer_id: 14943291 current_vault: bogus vault_token: '1' billing_address: null billing_city: null billing_state: null billing_zip: null billing_country: null customer_vault_token: null billing_address_2: null payment_type: credit_card x-stoplight: id: coupon-create-subscription-with-coupon-output name: Create Subscription with Coupon Output public: true coupons-coupon-usage-output: title: Coupon Usage Output type: array items: type: object properties: name: type: string description: Name of the product id: type: integer description: ID of the product signups: type: integer description: Number of times the coupon has been applied savings: type: - number - 'null' description: Dollar amount of customer savings as a result of the coupon. savings_in_cents: type: - number - 'null' description: Dollar amount of customer savings as a result of the coupon. revenue: type: - number - 'null' description: Total revenue of the all subscriptions that have received a discount from this coupon. revenue_in_cents: type: number description: Total revenue of the all subscriptions that have received a discount from this coupon. example: - name: No cost product id: 3903594 signups: 0 savings: 0 savings_in_cents: 0 revenue: 0 revenue_in_cents: 0 - name: Product that expires id: 3853680 signups: 0 savings: 0 savings_in_cents: 0 revenue: 0 revenue_in_cents: 0 - name: Trial Product id: 3861800 signups: 1 savings: 30 savings_in_cents: 3000 revenue: 20 revenue_in_cents: 2000 x-stoplight: id: coupons-coupon-usage-output name: Coupon Usage Output public: true coupon-create-subscription-with-coupon-input: title: Create Subscription with Coupon Input type: object properties: subscription: type: object properties: product_handle: type: string customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string credit_card_attributes: type: object properties: full_number: type: string expiration_month: type: string expiration_year: type: string coupon_code: type: string example: subscription: product_handle: basic customer_attributes: first_name: Joe last_name: Blow email: joe@example.com credit_card_attributes: full_number: '1' expiration_month: '10' expiration_year: '2020' coupon_code: 100PERCENT x-stoplight: id: coupon-create-subscription-with-coupon-input name: Create Subscription with Coupon Input public: true coupons-list-coupons-for-a-site-output: title: List Coupons for a Site Output type: array items: type: object properties: coupon: type: object properties: id: type: integer description: The ID of the coupon in Chargify. name: type: string description: The na code: type: string description: type: string amount_in_cents: type: 'null' product_family_id: type: integer created_at: type: string updated_at: type: string start_date: type: string end_date: type: 'null' percentage: type: - string - 'null' recurring: type: boolean duration_period_count: type: 'null' duration_interval: type: integer duration_interval_unit: type: string allow_negative_balance: type: boolean archived_at: type: 'null' conversion_limit: type: integer stackable: type: boolean compounding_strategy: type: string coupon_restrictions: type: array items: type: object use_site_exchange_rate: type: boolean default: true description: Whether to use the site level exchange rate or to define your own pricing for a given currency if you have defined multiple currencies for the site. example: - coupon: id: 999999 name: 50% coupon code: 50PERCENT description: 50 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 50 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] - coupon: id: 123456 name: 100% coupon code: 100PERCENT description: 100 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 50 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] - coupon: id: 888888 name: 25% coupon code: 25PERCENT description: 25 PERCENT OFF amount_in_cents: null product_family_id: 527890 created_at: '2016-10-21T17:02:08-04:00' updated_at: '2016-10-21T17:06:11-04:00' start_date: '2016-10-21T17:02:08-04:00' end_date: null percentage: 25 recurring: true duration_period_count: null duration_interval: 1 duration_interval_unit: day allow_negative_balance: true archived_at: null conversion_limit: 100 stackable: false compounding_strategy: compound coupon_restrictions: [] x-stoplight: id: coupons-list-coupons-for-a-site-output name: List Coupons for a Site Output public: true coupon-subcodes-create-a-coupon-subcode: title: Create Coupon Subcode type: object properties: codes: type: array items: type: string example: codes: - 15OFF - 20OFF - 50 OFF x-stoplight: id: coupon-subcodes-create-a-coupon-subcode name: Create Coupon Subcode public: true coupons-subcodes-create-a-coupon-subcode-output: title: Create Coupon Subcode Response type: object properties: created_codes: type: array items: type: string duplicate_codes: type: array items: type: object invalid_codes: type: array items: type: object example: created_codes: - BALTIMOREFALL - ORLANDOFALL - DETROITFALL duplicate_codes: [] invalid_codes: [] x-stoplight: id: coupons-subcodes-create-a-coupon-subcode-output name: Create Coupon Subcode Response public: true coupons-subcodes-retrieve-coupon-subcodes-output: title: Coupon Subcodes Response type: object properties: codes: type: array items: type: string example: codes: - 3JU6PR - 9RO6MP - 8OG1VV - 5FL7VV - 2SV8XK - 4LW8LH - 3VL4GZ - 9UI9XO - 0LZ0CC - 8XI9JV - 9UV5YE - 3UI4GX - 6SL5ST - 9WC8IJ - 2KA3PZ - 7WR1VR - 3VY7MN - 6KC3KB - 7DF7YT - 9FH1ED x-stoplight: id: coupons-subcodes-retrieve-coupon-subcodes-output name: Coupon Subcodes Response public: true payment: title: Payment type: object properties: payment: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: 'null' gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' payment_id: type: 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer card_number: type: 'null' card_expiration: type: 'null' card_type: type: 'null' refunded_amount_in_cents: type: integer example: payment: id: 165068629 subscription_id: 14823581 type: Payment kind: manual transaction_type: payment success: true amount_in_cents: 1000 memo: Lorem ipsum created_at: '2016-12-05T13:33:58-05:00' starting_balance_in_cents: 2177 ending_balance_in_cents: 1177 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3794121 tax_id: null component_id: null statement_id: 81751632 customer_id: 14332342 card_number: null card_expiration: null card_type: null refunded_amount_in_cents: 0 x-stoplight: id: payment name: Payment public: true paginated-metadata: title: Paginated Metadata type: object properties: total_count: type: integer current_page: type: integer total_pages: type: integer per_page: type: integer metadata: type: array items: $ref: '#/definitions/metadata' example: total_count: 2 current_page: 1 total_pages: 1 per_page: 20 metadata: - value: The quick brown fox resource_id: 15479934 name: Comments - value: L resource_id: 15479934 name: T-Shirt Size x-stoplight: id: paginated-metadata name: Paginated Metadata public: true customer-subscriptions: title: Customer Subscriptions type: array items: type: object properties: subscription: type: object properties: id: type: integer state: type: string balance_in_cents: type: integer total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer current_period_ends_at: type: string next_assessment_at: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string expires_at: type: 'null' created_at: type: string updated_at: type: string cancellation_message: type: 'null' cancellation_method: type: 'null' cancel_at_end_of_period: type: boolean canceled_at: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: 'null' payment_collection_method: type: string snap_day: type: 'null' customer: type: object properties: first_name: type: string last_name: type: string email: type: string cc_emails: type: string organization: type: string reference: type: 'null' id: type: integer created_at: type: string updated_at: type: string address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string verified: type: boolean portal_customer_created_at: type: string portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' tax_exempt: type: boolean vat_number: type: string description: The VAT number for the customer. parent_id: type: - integer - 'null' product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' expiration_interval: type: 'null' expiration_interval_unit: type: string trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string initial_charge_after_trial: type: boolean return_params: type: string request_credit_card: type: boolean require_credit_card: type: boolean created_at: type: string updated_at: type: string archived_at: type: 'null' update_return_url: type: string update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string handle: type: string accounting_code: type: 'null' description: type: string public_signup_pages: type: array items: type: object properties: id: type: integer url: type: string taxable: type: boolean version_number: type: integer credit_card: type: object properties: id: type: integer payment_type: type: string first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer billing_address: type: string billing_address_2: type: string billing_city: type: string billing_state: type: string billing_country: type: string billing_zip: type: string current_vault: type: string vault_token: type: string customer_vault_token: type: 'null' customer_id: type: integer payment_type: type: string referral_code: type: string next_product_id: type: 'null' coupon_use_count: type: 'null' coupon_uses_allowed: type: 'null' example: - subscription: id: 14950975 state: active balance_in_cents: 0 total_revenue_in_cents: 22500 product_price_in_cents: 7500 product_version_number: 1 current_period_ends_at: '2017-10-27T16:40:38-04:00' next_assessment_at: '2017-10-27T16:40:38-04:00' trial_started_at: null trial_ended_at: null activated_at: '2016-10-27T12:06:32-04:00' expires_at: null created_at: '2016-10-27T12:06:30-04:00' updated_at: '2016-11-18T13:22:53-05:00' cancellation_message: null cancellation_method: null cancel_at_end_of_period: false canceled_at: null current_period_started_at: '2016-10-27T16:40:38-04:00' previous_state: active signup_payment_id: 159783974 signup_revenue: '75.00' delayed_cancel_at: null coupon_code: null payment_collection_method: automatic snap_day: null customer: first_name: Martha last_name: Example email: marthw@example.com cc_emails: '' organization: '' reference: null id: 14451040 created_at: '2016-10-27T12:05:23-04:00' updated_at: '2016-12-05T10:53:37-05:00' address: 123 Anywhere Street address_2: '' city: Boston state: MA zip: '02120' country: US phone: '' verified: false portal_customer_created_at: '2016-10-27T12:05:25-04:00' portal_invite_last_sent_at: '2016-10-27T12:06:32-04:00' portal_invite_last_accepted_at: null tax_exempt: false product: id: 4298069 name: ANNUAL product handle: annual-product-test description: '' accounting_code: '' price_in_cents: 7500 interval: 12 interval_unit: month initial_charge_in_cents: null expiration_interval: null expiration_interval_unit: never trial_price_in_cents: null trial_interval: null trial_interval_unit: month initial_charge_after_trial: false return_params: '' request_credit_card: true require_credit_card: true created_at: '2016-10-27T11:59:59-04:00' updated_at: '2016-10-27T11:59:59-04:00' archived_at: null update_return_url: '' update_return_params: '' product_family: id: 528484 name: Products handle: wild-about-animals accounting_code: null description: Products public_signup_pages: - id: 299848 url: 'https://general-goods.chargify.com/subscribe/pxfxqcgz8pq8/annual-product-test' taxable: false version_number: 1 credit_card: id: 10228039 payment_type: credit_card first_name: Example last_name: Exampe masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2018 billing_address: '' billing_address_2: '' billing_city: '' billing_state: '' billing_country: '' billing_zip: '' current_vault: bogus vault_token: '1' customer_vault_token: null customer_id: 14451040 payment_type: credit_card referral_code: 9652hf next_product_id: null coupon_use_count: null coupon_uses_allowed: null - subscription: id: 14950962 state: past_due balance_in_cents: 1000 total_revenue_in_cents: 3000 product_price_in_cents: 1000 product_version_number: 1 current_period_ends_at: '2016-12-27T15:42:19-05:00' next_assessment_at: '2016-12-05T18:22:22-05:00' trial_started_at: null trial_ended_at: null activated_at: '2016-10-27T12:05:24-04:00' expires_at: null created_at: '2016-10-27T12:05:23-04:00' updated_at: '2016-12-04T18:22:22-05:00' cancellation_message: null cancellation_method: null cancel_at_end_of_period: false canceled_at: null current_period_started_at: '2016-11-27T15:42:19-05:00' previous_state: past_due signup_payment_id: 159783933 signup_revenue: '10.00' delayed_cancel_at: null coupon_code: null payment_collection_method: automatic snap_day: null customer: first_name: Martha last_name: Example email: marthw@example.com cc_emails: '' organization: '' reference: null id: 14451040 created_at: '2016-10-27T12:05:23-04:00' updated_at: '2016-12-05T10:53:37-05:00' address: 123 Anywhere Street address_2: '' city: Boston state: MA zip: '02120' country: US phone: '' verified: false portal_customer_created_at: '2016-10-27T12:05:25-04:00' portal_invite_last_sent_at: '2016-10-27T12:06:32-04:00' portal_invite_last_accepted_at: null tax_exempt: false vat_number: 012345678 product: id: 4298068 name: Platinum Plan handle: platinum123 description: This is our platinum plan. accounting_code: '123' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null expiration_interval: null expiration_interval_unit: never trial_price_in_cents: null trial_interval: null trial_interval_unit: month initial_charge_after_trial: false return_params: '' request_credit_card: true require_credit_card: true created_at: '2016-10-27T11:58:02-04:00' updated_at: '2016-11-04T16:55:23-04:00' archived_at: null update_return_url: '' update_return_params: '' product_family: id: 528484 name: Products handle: wild-about-animals accounting_code: null description: Products public_signup_pages: - id: 299847 url: 'https://general-goods.chargify.com/subscribe/s5bc5q6gjftv/platinum123' taxable: false version_number: 1 credit_card: id: 10228046 payment_type: credit_card first_name: Example last_name: Example masked_card_number: XXXX-XXXX-XXXX-2 card_type: bogus expiration_month: 2 expiration_year: 2018 billing_address: '' billing_address_2: '' billing_city: '' billing_state: '' billing_country: '' billing_zip: '' current_vault: bogus vault_token: '2' customer_vault_token: null customer_id: 14451040 payment_type: credit_card referral_code: gkgb6g next_product_id: null coupon_use_count: null coupon_uses_allowed: null x-stoplight: id: customer-subscriptions name: Customer Subscriptions public: true payment-profiles-list-payment-profiles-for-a-site-outuput: title: List Payment Profiles for a Site Output type: array items: type: object properties: payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: string bank_name: type: string masked_bank_routing_number: type: string masked_bank_account_number: type: string bank_account_type: type: string bank_account_holder_type: type: string payment_type: type: string example: - payment_profile: id: 10089892 first_name: Chester last_name: Tester customer_id: 14543792 current_vault: bogus vault_token: '0011223344' billing_address: 456 Juniper Court billing_city: Boulder billing_state: CO billing_zip: '80302' billing_country: US customer_vault_token: null billing_address_2: '' bank_name: Bank of Kansas City masked_bank_routing_number: XXXX6789 masked_bank_account_number: XXXX3344 bank_account_type: checking bank_account_holder_type: personal payment_type: bank_account - payment_profile: id: 10188522 first_name: Frankie last_name: Tester customer_id: 14543712 current_vault: bogus vault_token: '123456789' billing_address: 123 Montana Way billing_city: Los Angeles billing_state: CA billing_zip: '90210' billing_country: US customer_vault_token: null billing_address_2: '' bank_name: Bank of Kansas City masked_bank_routing_number: XXXX6789 masked_bank_account_number: XXXX6789 bank_account_type: checking bank_account_holder_type: personal payment_type: bank_account x-stoplight: id: payment-profiles-list-payment-profiles-for-a-site-outuput name: List Payment Profiles for a Site Output public: true components-metered-create-usage-when-creating-a-new-subscription-input: title: Create Usage When Creating a New Subscription Input type: object properties: subscription: type: object properties: product_handle: type: string customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string credit_card_attributes: type: object properties: full_number: type: string expiration_month: type: string expiration_year: type: string components: type: array items: type: object properties: component_id: type: - integer - string default: 'integer or string prefixed with "handle:"' unit_balance: type: integer price_point_id: type: integer example: subscription: product_handle: basic customer_attributes: first_name: Joe last_name: Blow email: joe1049am@example.com credit_card_attributes: full_number: '1' expiration_month: '10' expiration_year: '2020' components: - component_id: 195268 unit_balance: 20 price_point_id: 12345 x-stoplight: id: components-metered-create-usage-when-creating-a-new-subscription-input name: Create Usage When Creating a New Subscription Input public: true statements-list-statements-for-a-site: title: Read Statements for a Site type: array items: type: object properties: statement: type: object properties: id: type: integer basic_html_view: type: string closed_at: type: string created_at: type: string customer_billing_address: type: string customer_billing_address_2: type: string customer_billing_city: type: string customer_billing_country: type: string customer_billing_state: type: string customer_billing_zip: type: string customer_first_name: type: string customer_last_name: type: string customer_organization: type: string customer_shipping_address: type: string customer_shipping_address_2: type: string customer_shipping_city: type: string customer_shipping_country: type: string customer_shipping_state: type: string customer_shipping_zip: type: string ending_balance_in_cents: type: integer future_payments: type: array items: type: object html_view: type: string memo: type: string opened_at: type: string settled_at: type: string starting_balance_in_cents: type: integer subscription_id: type: integer text_view: type: string updated_at: type: string total_in_cents: type: integer transactions: type: array items: type: object properties: id: type: integer subscription_id: type: integer type: type: string kind: type: - 'null' - string transaction_type: type: string success: type: boolean amount_in_cents: type: integer memo: type: string created_at: type: string starting_balance_in_cents: type: integer ending_balance_in_cents: type: integer gateway_used: type: - 'null' - string gateway_transaction_id: type: - 'null' - string gateway_order_id: type: 'null' payment_id: type: - integer - 'null' product_id: type: integer tax_id: type: 'null' component_id: type: 'null' statement_id: type: integer customer_id: type: integer item_name: type: string original_amount_in_cents: type: 'null' discount_amount_in_cents: type: 'null' taxable_amount_in_cents: type: - integer - 'null' taxations: type: array items: type: object properties: tax_id: type: 'null' tax_charge_id: type: integer tax_name: type: string rate: type: string tax_amount_in_cents: type: integer tax_rules: type: array items: type: object properties: tax_rule_id: type: 'null' country_code: type: string subdivision_code: type: string rate: type: string tax_amount_in_cents: type: integer description: type: string card_number: type: string card_expiration: type: string card_type: type: string refunded_amount_in_cents: type: integer events: type: array items: type: object properties: event: type: object properties: id: type: integer key: type: string message: type: string subscription_id: type: integer created_at: type: string event_specific_data: type: - 'null' - object properties: product_id: type: integer account_transaction_id: type: - integer - 'null' previous_subscription_state: type: string new_subscription_state: type: string example: - statement: id: 79221109 basic_html_view: |
My Awesome Company
(79221109)
Acme Projects - Trial Product

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

closed_at: '2016-10-24T16:20:13-04:00' created_at: '2016-10-24T16:20:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $0.00
Payments: $0.00
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:20PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:20PM EDT Recurring Trial Price (10/24/2016 - 10/31/2016) $0.00
Totals $0.00

Payments

Date/Time Type Detail Amount
No payments this period
Totals $0.00

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Signup Success Successful signup for Amelia Example's subscription to Trial Product

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:12-04:00' settled_at: '2016-10-24T16:20:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221109) billing@example.com Acme Projects - Trial Product ================================================================================ -------- Summary -------- ID......: 79221109 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $0.00 Payments..........: $0.00 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:20PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:20PM EDT Recur Trial Price (10/24/2016 - 10/31/2016) $0.00 ............ ..... ............................................... .......... Totals: $0.00 ### Payments No payments this period --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Signup Success 04:20PM EDT Successful signup for Amelia Example's subscription to Trial Produ ct ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:20:13-04:00' total_in_cents: 0 transactions: - id: 159423810 subscription_id: 14900541 type: Charge kind: trial transaction_type: charge success: true amount_in_cents: 0 memo: Trial Price (10/24/2016 - 10/31/2016) created_at: '2016-10-24T16:20:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 0 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: null product_id: 3861800 tax_id: null component_id: null statement_id: 79221109 customer_id: 14399371 item_name: Trial Price original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] events: - event: id: 342036408 key: signup_success message: Successful signup for Amelia Example's subscription to Trial Product subscription_id: 14900541 created_at: '2016-10-24T16:20:13-04:00' event_specific_data: product_id: 3861800 account_transaction_id: null - statement: id: 79221381 basic_html_view: |
My Awesome Company
(79221381)
Acme Projects - Basic Plan

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $42.50
Payments: $42.50
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:21PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:21PM EDT Recurring Basic Plan (10/24/2016 - 11/24/2016) $40.00
10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50
Totals $42.50

Payments

Date/Time Type Detail Amount
10/24/2016 04:21PM EDT CC Payment
Amelia Example - Basic Plan: Renewal payment
XXXX-XXXX-XXXX-1 bogus (01/2026)
$42.50
Totals $42.50

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Subscription State Change State changed on Amelia Example's subscription to Basic Plan from trialing to active
10/24/2016 04:20PM EDT Subscription Product Change Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan'
10/24/2016 04:21PM EDT Billing Date Change Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016
10/24/2016 04:21PM EDT Renewal Success Successful renewal for Amelia Example's subscription to Basic Plan
10/24/2016 04:21PM EDT Payment Success Successful payment of $42.50 for Amelia Example's subscription to Basic Plan

We thank you for your continued business!

closed_at: '2016-10-24T16:21:13-04:00' created_at: '2016-10-24T16:21:12-04:00' customer_billing_address: 123 Anywhere Street customer_billing_address_2: '' customer_billing_city: Anywhere customer_billing_country: US customer_billing_state: MA customer_billing_zip: '02120' customer_first_name: Amelia customer_last_name: Example customer_organization: '' customer_shipping_address: 123 Anywhere Street customer_shipping_address_2: '' customer_shipping_city: Anywhere customer_shipping_country: US customer_shipping_state: MA customer_shipping_zip: '02120' ending_balance_in_cents: 0 future_payments: [] html_view: |

Account Information

Amelia Example
555-555-1212

Shipping Address

123 Anywhere Street
Anywhere, MA 02120
US

Billing Address

123 Anywhere Street
Anywhere, MA 02120
US

Summary

Date: 10/24/2016
Billing Date: 10/24/2016
Starting Balance: $0.00
Current Charges: $42.50
Payments: $42.50
Ending Balance: $0.00
Balance Paid: 10/24/2016 04:21PM EDT
PAID

Detail

Current Charges and Adjustments

Date/Time Type Detail Charge
10/24/2016 04:21PM EDT Recurring Basic Plan (10/24/2016 - 11/24/2016) $40.00
10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50
Totals $42.50

Payments

Date/Time Type Detail Amount
10/24/2016 04:21PM EDT CC Payment
Amelia Example - Basic Plan: Renewal payment
XXXX-XXXX-XXXX-1 bogus (01/2026)
$42.50
Totals $42.50

Period Activity

Date/Time Event Detail
10/24/2016 04:20PM EDT Subscription State Change State changed on Amelia Example's subscription to Basic Plan from trialing to active
10/24/2016 04:20PM EDT Subscription Product Change Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan'
10/24/2016 04:21PM EDT Billing Date Change Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016
10/24/2016 04:21PM EDT Renewal Success Successful renewal for Amelia Example's subscription to Basic Plan
10/24/2016 04:21PM EDT Payment Success Successful payment of $42.50 for Amelia Example's subscription to Basic Plan

We thank you for your continued business!

memo: We thank you for your continued business! opened_at: '2016-10-24T16:20:14-04:00' settled_at: '2016-10-24T16:21:13-04:00' starting_balance_in_cents: 0 subscription_id: 14900541 text_view: | My Awesome Company (79221381) billing@example.com Acme Projects - Basic Plan ================================================================================ -------- Summary -------- ID......: 79221381 Date....: 10/24/2016 Billing Date......: 10/24/2016 Starting Balance..: $0.00 Current Charges...: $42.50 Payments..........: $42.50 Ending Balance....: $0.00 Balance Paid......: 10/24/2016 04:21PM EDT ------------------- Account Information ------------------- Amelia Example amelia@example.com 555-555-1212 ### Shipping Address 123 Anywhere Street Anywhere, MA 02120 US ### Billing Address 123 Anywhere Street Anywhere, MA 02120 US ------- Detail ------- ### Current Charges and Adjustments Date/Time Type Detail Charges ............ ..... ............................................... .......... 10/24/2016 04:21PM EDT Recur Basic Plan (10/24/2016 - 11/24/2016) $40.00 ............ ..... ............................................... .......... 10/24/2016 04:21PM EDT Tax MA Tax (6.25%) $2.50 ............ ..... ............................................... .......... Totals: $42.50 ### Payments Date/Time Type Detail Amount ............ ..... ............................................... .......... 10/24/2016 XXXX-XXXX-XXXX-1 bogus (01/2026) 04:21PM EDT CCPay Amelia Example - Basic Plan: Renewal payment $42.50 ............ ..... ............................................... .......... Totals: $42.50 --------------- Period Activity --------------- Date/Time Event/Details ............ .................................................................. 10/24/2016 Subscription State Change 04:20PM EDT State changed on Amelia Example's subscription to Basic Plan from trialing to active ............ .................................................................. 10/24/2016 Subscription Product Change 04:20PM EDT Product changed on Amelia Example's subscription from 'Trial Produ ct' to 'Basic Plan' ............ .................................................................. 10/24/2016 Billing Date Change 04:21PM EDT Billing date changed on Amelia Example's subscription to Basic Pla n from 10/31/2016 to 10/24/2016 ............ .................................................................. 10/24/2016 Renewal Success 04:21PM EDT Successful renewal for Amelia Example's subscription to Basic Plan ............ .................................................................. 10/24/2016 Payment Success 04:21PM EDT Successful payment of $42.50 for Amelia Example's subscription to Basic Plan ............ .................................................................. We thank you for your continued business! updated_at: '2016-10-24T16:21:13-04:00' total_in_cents: 4250 transactions: - id: 159424439 subscription_id: 14900541 type: Charge kind: baseline transaction_type: charge success: true amount_in_cents: 4000 memo: Basic Plan (10/24/2016 - 11/24/2016) created_at: '2016-10-24T16:21:12-04:00' starting_balance_in_cents: 0 ending_balance_in_cents: 4000 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 159424449 product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: 4000 taxations: - tax_id: null tax_charge_id: 159424444 tax_name: MA Tax rate: '0.0625' tax_amount_in_cents: 250 tax_rules: - tax_rule_id: null country_code: US subdivision_code: MA rate: '0.0625' tax_amount_in_cents: 250 description: MA STATE TAX - MASSACHUSETTS - id: 159424444 subscription_id: 14900541 type: Charge kind: tax transaction_type: charge success: true amount_in_cents: 250 memo: MA Tax (6.25%) created_at: '2016-10-24T16:21:12-04:00' starting_balance_in_cents: 4000 ending_balance_in_cents: 4250 gateway_used: null gateway_transaction_id: null gateway_order_id: null payment_id: 159424449 product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 original_amount_in_cents: null discount_amount_in_cents: null taxable_amount_in_cents: null taxations: [] - id: 159424449 subscription_id: 14900541 type: Payment kind: null transaction_type: payment success: true amount_in_cents: 4250 memo: 'Amelia Example - Basic Plan: Renewal payment' created_at: '2016-10-24T16:21:13-04:00' starting_balance_in_cents: 4250 ending_balance_in_cents: 0 gateway_used: bogus gateway_transaction_id: '53433' gateway_order_id: null payment_id: null product_id: 3792003 tax_id: null component_id: null statement_id: 79221381 customer_id: 14399371 card_number: XXXX-XXXX-XXXX-1 card_expiration: 01/2026 card_type: bogus refunded_amount_in_cents: 0 events: - event: id: 342036536 key: subscription_state_change message: State changed on Amelia Example's subscription to Basic Plan from trialing to active subscription_id: 14900541 created_at: '2016-10-24T16:20:43-04:00' event_specific_data: previous_subscription_state: trialing new_subscription_state: active - event: id: 342036540 key: subscription_product_change message: Product changed on Amelia Example's subscription from 'Trial Product' to 'Basic Plan' subscription_id: 14900541 created_at: '2016-10-24T16:20:43-04:00' event_specific_data: previous_product_id: 3861800 new_product_id: 3792003 - event: id: 342037380 key: billing_date_change message: Billing date changed on Amelia Example's subscription to Basic Plan from 10/31/2016 to 10/24/2016 subscription_id: 14900541 created_at: '2016-10-24T16:21:11-04:00' event_specific_data: null - event: id: 342037470 key: renewal_success message: Successful renewal for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-10-24T16:21:14-04:00' event_specific_data: product_id: 3792003 account_transaction_id: 159424449 - event: id: 342037482 key: payment_success message: Successful payment of $42.50 for Amelia Example's subscription to Basic Plan subscription_id: 14900541 created_at: '2016-10-24T16:21:14-04:00' event_specific_data: product_id: 3792003 account_transaction_id: 159424449 x-stoplight: id: statements-list-statements-for-a-site name: Read Statements for a Site public: true reason_code-update_response: title: ReasonCode Update Response type: object properties: reason_code: type: object properties: id: type: integer site_id: type: integer code: type: string description: type: string position: type: integer created_at: type: string updated_at: type: string example: reason_code: id: 1 site_id: 2 code: '00023' description: Not using the product currently position: 2 created_at: '2017-02-16T16:48:45-05:00' updated_at: '2017-02-21T16:33:10-05:00' x-stoplight: id: reason_code-update_response name: ReasonCode Update Response public: true reason_code-show_response: title: ReasonCode Show Response type: object properties: reason_code: type: object properties: id: type: integer site_id: type: integer code: type: string description: type: string position: type: integer created_at: type: string updated_at: type: string example: reason_code: id: 1 site_id: 2 code: CHEAP description: This is muuy caro position: 2 created_at: '2017-02-16T16:48:45-05:00' updated_at: '2017-02-17T16:29:59-05:00' x-stoplight: id: reason_code-show_response name: ReasonCode Show Response public: true reason_codes-delete_response: title: Delete a Reason Code Response type: object properties: ok: type: string example: ok: ok x-stoplight: id: reason_codes-delete_response name: Delete a Reason Code Response public: true reason_code-list_response: title: Read Reason Codes for a Site Response type: array items: type: object properties: reason_code: type: object properties: id: type: integer site_id: type: integer code: type: string description: type: string position: type: integer created_at: type: string updated_at: type: string example: - reason_code: id: 2 site_id: 2 code: LARGE description: This is too complicated position: 1 created_at: '2017-02-16T16:49:07-05:00' updated_at: '2017-02-17T16:29:51-05:00' - reason_code: id: 1 site_id: 2 code: CH1 description: This doesnt meet my needs position: 2 created_at: '2017-02-16T16:48:45-05:00' updated_at: '2017-02-17T16:29:59-05:00' - reason_code: id: 5 site_id: 2 code: HAN99 description: Hard to setup position: 3 created_at: '2017-02-17T16:29:42-05:00' updated_at: '2017-02-17T16:29:59-05:00' x-stoplight: id: reason_code-list_response name: Read Reason Codes for a Site Response public: true reason_codes-create_code_response: title: ReasonCode Create Response type: object properties: reason_code: type: object properties: id: type: integer site_id: type: integer code: type: string description: type: - 'null' - string position: type: integer created_at: type: string updated_at: type: string example: reason_code: id: 6 site_id: 2 code: NOTHANKYOU description: null position: 6 created_at: '2017-02-21T16:20:00-05:00' updated_at: '2017-02-21T16:20:00-05:00' x-stoplight: id: reason_codes-create_code_response name: ReasonCode Create Response public: true reason_codes-create_code_request: title: ReasonCode Create Request type: object properties: reason_code: type: object properties: code: type: string description: type: string position: type: integer example: reason_code: code: NOTHANKYOU description: No thank you! position: 5 x-stoplight: id: reason_codes-create_code_request name: ReasonCode Create Request public: true subscriptions-hold-subscription-request: title: Hold (Pause) Subscription Request type: object properties: hold: type: object properties: automatically_resume_at: type: string format: date-time example: hold: automatically_resume: true automatically_resume_at: '2017-05-25T11:25:00Z' x-stoplight: id: subscriptions-hold-subscription-request name: Hold (Pause) Subscription Request public: true payments-update-payment-profile: title: Update Payment Profile type: object properties: payment_profile: type: object properties: first_name: type: string last_name: type: string full_number: type: string card_type: type: string expiration_month: type: string expiration_year: type: string current_vault: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string billing_address_2: type: 'null' example: payment_profile: first_name: Graham last_name: Test full_number: '4111111111111111' card_type: master expiration_month: '04' expiration_year: '2030' current_vault: bogus vault_token: '1' billing_address: 456 Juniper Court billing_city: Boulder billing_state: CO billing_zip: '80302' billing_country: US billing_address_2: null x-stoplight: id: payments-update-payment-profile name: Update Payment Profile public: true components-price-points-create-price-point-request: title: Create Price Point Request type: object properties: price_point: type: object required: - name - pricing_scheme - prices properties: name: type: string handle: type: string pricing_scheme: type: string prices: type: array items: type: object properties: starting_quantity: type: integer ending_quantity: type: integer unit_price: type: integer use_site_exchange_rate: type: boolean default: true description: Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. required: - price_point example: price_point: name: Wholesale handle: wholesale-handle pricing_scheme: stairstep prices: - starting_quantity: 1 ending_quantity: 100 unit_price: 5 - starting_quantity: 101 unit_price: 4 x-stoplight: id: components-price-points-create-price-point-request name: Create Price Point Request public: true components-price-points-create-price-point-response: title: Create Price Point Response type: object properties: price_point: type: object properties: id: type: integer default: type: boolean name: type: string pricing_scheme: type: string component_id: type: integer handle: type: string archived_at: type: 'null' created_at: type: string updated_at: type: string prices: type: array items: type: object properties: id: type: integer component_id: type: integer starting_quantity: type: integer ending_quantity: type: - integer - 'null' unit_price: type: string use_site_exchange_rate: type: boolean description: Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. default: true example: price_point: id: 79 default: false name: Wholesale pricing_scheme: stairstep component_id: 74 handle: wholesale-handle archived_at: null created_at: '2017-07-05T13:44:30-04:00' updated_at: '2017-07-05T13:44:30-04:00' prices: - id: 119 component_id: 74 starting_quantity: 1 ending_quantity: 100 unit_price: '5.0' - id: 120 component_id: 74 starting_quantity: 101 ending_quantity: null unit_price: '4.0' x-stoplight: id: components-price-points-create-price-point-response name: Create Price Point Response public: true components-price-points-bulk-create-price-points-request: title: Bulk Create Price Points Request type: object properties: price_points: type: array items: type: object properties: name: type: string handle: type: string pricing_scheme: type: string prices: type: array items: type: object properties: starting_quantity: type: integer unit_price: type: integer ending_quantity: type: integer use_site_exchange_rate: type: boolean default: true description: Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. required: - name - pricing_scheme - prices required: - price_points example: price_points: - name: Wholesale handle: wholesale pricing_scheme: per_unit prices: - starting_quantity: 1 unit_price: 5 - name: MSRP handle: msrp pricing_scheme: per_unit prices: - starting_quantity: 1 ending_quantity: 100 unit_price: 4 - starting_quantity: 101 unit_price: 4 x-stoplight: id: components-price-points-bulk-create-price-points-request name: Bulk Create Price Points Request public: true components-price-points-list-price-points-response: title: List Price Points Response type: object properties: price_points: type: array items: type: object properties: id: type: integer default: type: boolean name: type: string pricing_scheme: type: string component_id: type: integer handle: type: string archived_at: type: 'null' created_at: type: string updated_at: type: string prices: type: array items: type: object properties: id: type: integer component_id: type: integer starting_quantity: type: integer ending_quantity: type: 'null' unit_price: type: string example: price_points: - id: 80 default: false name: Wholesale Two pricing_scheme: per_unit component_id: 74 handle: wholesale-two archived_at: null created_at: '2017-07-05T13:55:40-04:00' updated_at: '2017-07-05T13:55:40-04:00' prices: - id: 121 component_id: 74 starting_quantity: 1 ending_quantity: null unit_price: '5.0' - id: 81 default: false name: MSRP pricing_scheme: per_unit component_id: 74 handle: msrp archived_at: null created_at: '2017-07-05T13:55:40-04:00' updated_at: '2017-07-05T13:55:40-04:00' prices: - id: 122 component_id: 74 starting_quantity: 1 ending_quantity: null unit_price: '4.0' x-stoplight: id: components-price-points-list-price-points-response name: List Price Points Response public: true components-price-points-update-price-point-request: title: Update Price Point Request type: object properties: price_point: type: object properties: name: type: string prices: type: array items: type: object properties: id: type: integer ending_quantity: type: integer unit_price: type: integer _destroy: type: string starting_quantity: type: integer example: price_point: name: Default prices: - id: 1 ending_quantity: 100 unit_price: 5 - id: 2 _destroy: 'true' - starting_quantity: 101 unit_price: 4 x-stoplight: id: components-price-points-update-price-point-request name: Update Price Point Request public: true components-onoff-create-subscription-with-onoff-component: title: Create Subscription with On/Off Component Request type: object properties: subscription: type: object properties: product_handle: type: string customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string credit_card_attributes: type: object properties: full_number: type: string expiration_month: type: string expiration_year: type: string components: type: array items: type: object properties: component_id: type: integer enabled: type: boolean example: subscription: product_handle: one-hundred-dollar-product customer_attributes: first_name: Joe last_name: Blow email: joe@example.com credit_card_attributes: full_number: '1' expiration_month: '10' expiration_year: '2020' components: - component_id: 399853 enabled: true price_point_id: 123456 x-stoplight: id: components-onoff-create-subscription-with-onoff-component name: Create Subscription with On/Off Component Request public: true components-price-points-bulk-update-a-subscriptions-components-price-points: title: Bulk Update a Subscription's Component's Price Points type: object properties: components: type: array items: type: object properties: component_id: type: integer price_point: type: - integer - string example: components: - component_id: 997 price_point: 1022 - component_id: 998 price_point: wholesale-handle - component_id: 999 price_point: _default x-stoplight: id: components-price-points-bulk-update-a-subscriptions-components-price-points name: Bulk Update a Subscription's Component's Price Points public: true components-price-points-bulk-reset-a-subscriptions-components-price-points: title: Bulk Reset a Subscription's Component's Price Points $ref: '#/definitions/subscription-read-subscription' example: subscription: id: -70678768 state: non trial_started_at: null trial_ended_at: null activated_at: ex adipisicing dolore created_at: fugiat pariatur updated_at: proident aliqua expires_at: null balance_in_cents: 57088831 current_period_ends_at: nostrud Duis next_assessment_at: officia in canceled_at: aliqua culpa cancellation_message: null next_product_id: -42919579 cancel_at_end_of_period: false payment_collection_method: nostrud ex ullamco offici snap_day: null cancellation_method: null current_period_started_at: elit previous_state: sunt anim nostrud adipisicing Lorem signup_payment_id: -99401772 signup_revenue: anim in nulla aliqua delayed_cancel_at: null coupon_code: null total_revenue_in_cents: -71744706 product_price_in_cents: -35608324 product_version_number: -66245013 payment_type: eiusmod proident ea velit referral_code: Duis ex coupon_use_count: null coupon_uses_allowed: null reason_code: adipisicing eiusmod laboris automatically_resume_at: null current_billing_amount_in_cents: 25153479 customer: id: 54798682 first_name: magna consectetur last_name: eu in organization: elit Lorem eiusmod in email: quis pariatur created_at: adipisicing updated_at: irure reference: null address: proident incididunt dolore mollit address_2: null city: cillum state: null zip: null country: sit ipsum consequat reprehenderit phone: null portal_invite_last_sent_at: laboris id do velit portal_invite_last_accepted_at: null verified: null portal_customer_created_at: qui reprehenderit cc_emails: quis id nostrud cupidatat tax_exempt: true product: id: 22472781 name: in nisi aliqua handle: dolor description: eiusmod enim accounting_code: cupidatat consectetur Ut eiusmod request_credit_card: true expiration_interval: null expiration_interval_unit: sit created_at: sunt adipisicing ex vel updated_at: cupidatat ipsum Lorem dolor id price_in_cents: 37028840 interval: -83120871 interval_unit: magna irure incididunt initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: eiusmod ullamco ipsum voluptate archived_at: null require_credit_card: false return_params: laboris veniam adipisicing aute taxable: true update_return_url: commodo dolor sit tax_code: dolor exercitation mollit initial_charge_after_trial: true version_number: -59532114 update_return_params: labore commodo product_family: id: 46591404 name: e description: exercitation pariatur Lorem fugiat handle: Ut cillum reprehenderit accounting_code: null public_signup_pages: - {} - return_params: null return_url: null - {} x-stoplight: id: components-price-points-bulk-reset-a-subscriptions-components-price-points name: Bulk Reset a Subscription's Component's Price Points public: true coupon-add-coupon-to-subscription-output: title: Add the Coupon to Subscription Output type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: boolean payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: string total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: 'null' coupon_use_count: type: integer coupon_uses_allowed: type: integer reason_code: type: 'null' automatically_resume_at: type: 'null' coupon_codes: type: array items: type: string customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: string email: type: string created_at: type: string updated_at: type: string reference: type: 'null' address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string portal_invite_last_sent_at: type: 'null' portal_invite_last_accepted_at: type: 'null' verified: type: boolean portal_customer_created_at: type: 'null' cc_emails: type: 'null' tax_exempt: type: boolean product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: 'null' request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: 'null' created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: 'null' archived_at: type: 'null' require_credit_card: type: boolean return_params: type: 'null' taxable: type: boolean update_return_url: type: 'null' tax_code: type: 'null' initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: 'null' product_family: type: object properties: id: type: integer name: type: string description: type: 'null' handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: string payment_type: type: string payer_id: type: integer example: subscription: id: 50 state: active trial_started_at: null trial_ended_at: null activated_at: '2017-11-01T04:17:47-04:00' created_at: '2017-11-01T04:17:46-04:00' updated_at: '2017-11-08T09:17:44-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2017-12-01T03:17:46-05:00' next_assessment_at: '2017-12-01T03:17:46-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2017-11-01T04:17:46-04:00' previous_state: active signup_payment_id: 109 signup_revenue: '10.00' delayed_cancel_at: null coupon_code: ABC123 total_revenue_in_cents: 1000 product_price_in_cents: 1000 product_version_number: 1 payment_type: credit_card referral_code: null coupon_use_count: 0 coupon_uses_allowed: 1 reason_code: null automatically_resume_at: null coupon_codes: - ABC123 customer: id: 50 first_name: Fred last_name: Jones organization: '' email: fred@jones.com created_at: '2017-11-01T04:17:46-04:00' updated_at: '2017-11-01T04:17:46-04:00' reference: null address: '' address_2: '' city: '' state: '' zip: '' country: '' phone: '' portal_invite_last_sent_at: null portal_invite_last_accepted_at: null verified: false portal_customer_created_at: null cc_emails: null tax_exempt: false product: id: 97 name: User-friendly systemic matrices handle: handle_1d382acd0 description: Fugiat quis mollitia. Ex et sunt sed qui. Facilis qui et sequi laudantium quos autem eos. accounting_code: null request_credit_card: true expiration_interval: null expiration_interval_unit: null created_at: '2017-09-13T12:45:35-04:00' updated_at: '2017-09-13T12:45:35-04:00' price_in_cents: 1000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: null archived_at: null require_credit_card: true return_params: null taxable: false update_return_url: null tax_code: null initial_charge_after_trial: false version_number: 1 update_return_params: null product_family: id: 4 name: Acme Online description: null handle: acme-online accounting_code: null public_signup_pages: [] credit_card: id: 36 first_name: Fred last_name: Jones masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2025 customer_id: 50 current_vault: bogus vault_token: '1' billing_address: '' billing_city: '' billing_state: AL billing_zip: '' billing_country: US customer_vault_token: null billing_address_2: '' payment_type: credit_card payer_id: 50 x-stoplight: id: coupon-add-coupon-to-subscription-output name: Add the Coupon to Subscription Output public: true create-subscription-with-multiple-coupon-output: title: Create Subscription with Multiple Coupon Output type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: 'null' payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: string total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: - 'null' - string coupon_use_count: type: integer coupon_uses_allowed: type: integer reason_code: type: 'null' automatically_resume_at: type: 'null' coupon_codes: type: array items: type: string customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: 'null' email: type: string created_at: type: string updated_at: type: string reference: type: 'null' address: type: 'null' address_2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: 'null' portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' verified: type: boolean portal_customer_created_at: type: string cc_emails: type: 'null' tax_exempt: type: boolean product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string tax_code: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: 'null' return_params: type: string url: type: string credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: 'null' billing_city: type: 'null' billing_state: type: 'null' billing_zip: type: 'null' billing_country: type: 'null' customer_vault_token: type: 'null' billing_address_2: type: 'null' payment_type: type: string payer_id: type: integer example: subscription: id: 19730041 state: active trial_started_at: null trial_ended_at: null activated_at: '2017-11-13T12:51:27-06:00' created_at: '2017-11-13T12:51:26-06:00' updated_at: '2017-11-13T12:51:27-06:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2017-12-13T12:51:26-06:00' next_assessment_at: '2017-12-13T12:51:26-06:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: null payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2017-11-13T12:51:26-06:00' previous_state: active signup_payment_id: 211813093 signup_revenue: '225.00' delayed_cancel_at: null coupon_code: STACK_COMP_100_DOLLAR total_revenue_in_cents: 22500 product_price_in_cents: 100000 product_version_number: 1 payment_type: credit_card referral_code: null coupon_use_count: 1 coupon_uses_allowed: 1 reason_code: null automatically_resume_at: null coupon_codes: - STACK_COMP_100_DOLLAR - STACK_COMP_75_PERCENT customer: id: 19311096 first_name: Joe last_name: Example organization: null email: joe@example.com created_at: '2017-11-13T12:51:26-06:00' updated_at: '2017-11-13T12:51:28-06:00' reference: null address: null address_2: null city: null state: null zip: null country: null phone: null portal_invite_last_sent_at: '2017-11-13T12:51:28-06:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2017-11-13T12:51:28-06:00' cc_emails: null tax_exempt: false product: id: 4581816 name: Basic handle: basic description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-11-02T15:00:11-05:00' updated_at: '2017-11-07T09:20:12-06:00' price_in_cents: 100000 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 1025627 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: - id: 333589 return_url: null return_params: '' url: 'https://general-goods.chargify.com/subscribe/hbwtd98j3hk2/basic' credit_card: id: 13380483 first_name: Joe last_name: Example masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 10 expiration_year: 2020 customer_id: 19311096 current_vault: bogus vault_token: '1' billing_address: null billing_city: null billing_state: null billing_zip: null billing_country: null customer_vault_token: null billing_address_2: null payment_type: credit_card payer_id: 19311096 x-stoplight: id: create-subscription-with-multiple-coupon-output name: Create Subscription with Multiple Coupon Output public: true create-subscription-with-multiple-coupon-input: title: Create Subscription with Multiple Coupon Input type: object properties: subscription: type: object properties: product_handle: type: string customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string credit_card_attributes: type: object properties: full_number: type: string expiration_month: type: string expiration_year: type: string coupon_codes: type: array items: type: string example: subscription: product_handle: basic customer_attributes: first_name: Joe last_name: Example email: joe@example.com credit_card_attributes: full_number: '1' expiration_month: '10' expiration_year: '2020' coupon_codes: - STACK_COMP_100_DOLLAR - STACK_COMP_75_PERCENT x-stoplight: id: create-subscription-with-multiple-coupon-input name: Create Subscription with Multiple Coupon Input public: true update-on-hold-subscriptions-input: title: Update On-Hold Subscriptions Input type: object example: hold: automatically_resume_at: '2019-01-20' x-stoplight: id: update-on-hold-subscriptions-input name: Update On-Hold Subscriptions Input public: true update-on-hold-subscriptions-output: title: Update On-Hold Subscriptions Output type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: boolean payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: 'null' total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: string coupon_use_count: type: 'null' coupon_uses_allowed: type: 'null' reason_code: type: 'null' automatically_resume_at: type: string coupon_codes: type: array items: type: object customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: string email: type: string created_at: type: string updated_at: type: string reference: type: 'null' address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' verified: type: 'null' portal_customer_created_at: type: string cc_emails: type: 'null' tax_exempt: type: boolean product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string tax_code: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: string billing_city: type: string billing_state: type: string billing_zip: type: string billing_country: type: string customer_vault_token: type: 'null' billing_address_2: type: string payment_type: type: string payer_id: type: integer example: subscription: id: 20359140 state: on_hold trial_started_at: null trial_ended_at: null activated_at: '2018-01-05T17:15:50-06:00' created_at: '2018-01-05T17:15:49-06:00' updated_at: '2018-01-09T10:26:14-06:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2023-01-05T17:15:00-06:00' next_assessment_at: '2023-01-05T17:15:00-06:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2018-01-05T17:15:49-06:00' previous_state: active signup_payment_id: 219829722 signup_revenue: '100.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 10009991 product_price_in_cents: 10000 product_version_number: 1 payment_type: credit_card referral_code: 8y7jqr coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: '2019-01-20T00:00:00-06:00' coupon_codes: [] customer: id: 19948683 first_name: Vanessa last_name: Test organization: '' email: vanessa@example.com created_at: '2018-01-05T17:15:49-06:00' updated_at: '2018-01-05T17:15:51-06:00' reference: null address: 123 Anywhere Ln address_2: '' city: Boston state: MA zip: '02120' country: US phone: 555-555-1212 portal_invite_last_sent_at: '2018-01-05T17:15:51-06:00' portal_invite_last_accepted_at: null verified: null portal_customer_created_at: '2018-01-05T17:15:51-06:00' cc_emails: null tax_exempt: false product: id: 4535643 name: Annual Product handle: annual-product description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-08-25T10:25:31-05:00' updated_at: '2017-08-25T10:25:31-05:00' price_in_cents: 10000 interval: 12 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 1025627 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: [] credit_card: id: 13826563 first_name: Bomb 3 last_name: Test masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2028 customer_id: 19948683 current_vault: bogus vault_token: '1' billing_address: 123 Anywhere Lane billing_city: Boston billing_state: Ma billing_zip: '02120' billing_country: US customer_vault_token: null billing_address_2: '' payment_type: credit_card payer_id: 19948683 x-stoplight: id: update-on-hold-subscriptions-output name: Update On-Hold Subscriptions Output public: true read-a-product-output: title: Read a Product Output type: object properties: product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: integer expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: integer trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string tax_code: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string public_signup_pages: type: array items: type: object properties: '': type: - string - array items: {} product_price_point_name: type: string request_billing_address: type: boolean require_billing_address: type: boolean require_shipping_address: type: boolean default_product_price_point_id: type: integer example: product: id: 4535635 name: Paid Annual Seats handle: paid-annual-seats description: Paid annual seats for our commercial enterprise product accounting_code: paid-annual-seats request_credit_card: true expiration_interval: 1 expiration_interval_unit: day created_at: '2017-08-25T10:25:31-05:00' updated_at: '2018-01-16T12:58:04-06:00' price_in_cents: 10000 interval: 12 interval_unit: month initial_charge_in_cents: 4900 trial_price_in_cents: 1000 trial_interval: 14 trial_interval_unit: day archived_at: null require_credit_card: true return_params: 'id={subscription_id}&ref={customer_reference}' taxable: true update_return_url: 'http://www.example.com' tax_code: D0000000 initial_charge_after_trial: false version_number: 4 update_return_params: 'id={subscription_id}&ref={customer_reference}' product_family: id: 1025627 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: [] product_price_point_name: Original x-stoplight: id: read-a-product-output name: Read a Product Output public: true archive-a-product-output: title: Archive a Product Output type: object properties: product: type: object properties: id: type: integer name: type: string handle: type: 'null' description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string archived_at: type: string require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string tax_code: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object product_price_point_name: type: string request_billing_address: type: boolean require_billing_address: type: boolean require_shipping_address: type: boolean example: product: id: 4535638 name: Business Monthly handle: null description: Business Monthly accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-08-25T10:25:31-05:00' updated_at: '2018-01-16T13:02:44-06:00' price_in_cents: 4900 interval: 1 interval_unit: month initial_charge_in_cents: null trial_price_in_cents: 0 trial_interval: 1 trial_interval_unit: day archived_at: '2018-01-16T13:02:44-06:00' require_credit_card: false return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 1025627 name: Acme Products description: '' handle: acme-products accounting_code: null public_signup_pages: [] product_price_point_name: Original x-stoplight: id: archive-a-product-output name: Archive a Product Output public: true subscription-preview-price-point-id-request: title: Subscription Preview Price Point ID type: object properties: subscription: type: object properties: product_handle: type: string components: type: array items: type: object properties: component_id: type: integer price_point_id: type: integer allocated_quantity: type: integer example: subscription: product_handle: monthly-product components: - component_id: 462149 price_point_id: 200543 allocated_quantity: 10 x-stoplight: id: subscription-preview-price-point-id-request name: Subscription Preview Price Point ID public: true subscription-preview-price-points-response: title: Subscription Preview Price Points Response type: object properties: subscription_preview: type: object properties: current_billing_manifest: type: object properties: line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer component_id: type: integer component_handle: type: string component_name: type: string product_id: type: integer total_in_cents: type: integer total_discount_in_cents: type: integer total_tax_in_cents: type: integer subtotal_in_cents: type: integer start_date: type: string end_date: type: string period_type: type: string existing_balance_in_cents: type: integer next_billing_manifest: type: object properties: line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer component_id: type: integer component_handle: type: string component_name: type: string product_id: type: integer total_in_cents: type: integer total_discount_in_cents: type: integer total_tax_in_cents: type: integer subtotal_in_cents: type: integer start_date: type: string end_date: type: string period_type: type: string existing_balance_in_cents: type: integer example: subscription_preview: current_billing_manifest: line_items: - transaction_type: charge kind: baseline amount_in_cents: 5000 memo: Monthly product (02/05/2018 - 03/05/2018) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_id: 1780014 product_handle: monthly-product product_name: Monthly product - transaction_type: charge kind: component amount_in_cents: 20000 memo: 'HUNDO: 10 HUNDOs' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 462149 component_handle: hundo component_name: HUNDO total_in_cents: 25000 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 25000 start_date: '2018-02-05T19:36:55Z' end_date: '2018-03-05T19:36:55Z' period_type: recurring existing_balance_in_cents: 0 next_billing_manifest: line_items: - transaction_type: charge kind: baseline amount_in_cents: 5000 memo: Monthly product (03/05/2018 - 04/05/2018) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_id: 1780014 product_handle: monthly-product product_name: Monthly product - transaction_type: charge kind: component amount_in_cents: 20000 memo: 'HUNDO: 10 HUNDOs' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 462149 component_handle: hundo component_name: HUNDO total_in_cents: 25000 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 25000 start_date: '2018-03-05T19:36:55Z' end_date: '2018-04-05T19:36:55Z' period_type: recurring existing_balance_in_cents: 0 x-stoplight: id: subscription-preview-price-points-response name: Subscription Preview Price Points Response public: true update-subscription-request: title: Update Subscription Request type: object properties: subscription: type: object properties: next_billing_at: type: string product_handle: type: string product_id: type: integer payment_collection_method: type: string receives_invoice_emails: type: boolean net_terms: type: - integer - string - 'null' stored_credential_transaction_id: type: - integer - 'null' example: subscription: next_billing_at: '2010-08-06T15:34:00Z' product_handle: basic product_id: 123456789 payment_collection_method: invoice receives_invoice_emails: false net_terms: 10 stored_credential_transaction_id: 165565533220288 x-stoplight: id: update-subscription-request name: Update Subscription Request public: true update-subscription-delayed-product-change-request: title: 'Update Subscription: Delayed Product Change Request' type: object properties: subscription: type: object properties: product_handle: type: string product_change_delayed: type: boolean example: subscription: product_handle: gold-product product_change_delayed: true x-stoplight: id: update-subscription-delayed-product-change-request name: 'Update Subscription: Delayed Product Change Request' public: true update-subscription-cancel-delayed-product-change-request: title: 'Update Subscription: Cancel Delayed Product Change Request' type: object properties: subscription: type: object properties: next_product_id: type: string next_product_price_point_id: type: string example: subscription: next_product_id: '' next_product_price_point_id: '' x-stoplight: id: update-subscription-cancel-delayed-product-change-request name: 'Update Subscription: Cancel Delayed Product Change Request' public: true add-multiple-coupons-to-existing-subscription-input: title: Add Multiple Coupons to Existing Subscription Input type: object properties: codes: type: array items: type: string example: codes: - COUPON_1 - COUPON_2 x-stoplight: id: add-multiple-coupons-to-existing-subscription-input name: Add Multiple Coupons to Existing Subscription Input public: true add-multiple-coupons-to-existing-subscription-output: title: Add Multiple Coupons to Existing Subscription Output type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: boolean payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: string total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: string coupon_use_count: type: integer coupon_uses_allowed: type: integer reason_code: type: 'null' automatically_resume_at: type: 'null' coupon_codes: type: array items: type: string customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: string email: type: string created_at: type: string updated_at: type: string reference: type: 'null' address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' verified: type: boolean portal_customer_created_at: type: string cc_emails: type: string tax_exempt: type: boolean product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: integer trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string tax_code: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: string return_params: type: string url: type: string credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: 'null' billing_city: type: 'null' billing_state: type: 'null' billing_zip: type: string billing_country: type: 'null' customer_vault_token: type: 'null' billing_address_2: type: 'null' payment_type: type: string payer_id: type: integer example: subscription: id: 21607180 state: active trial_started_at: null trial_ended_at: null activated_at: '2018-04-20T14:20:57-05:00' created_at: '2018-04-20T14:20:57-05:00' updated_at: '2018-05-11T13:53:44-05:00' expires_at: null balance_in_cents: 49000 current_period_ends_at: '2018-05-12T11:33:03-05:00' next_assessment_at: '2018-05-12T11:33:03-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: invoice snap_day: null cancellation_method: null current_period_started_at: '2018-05-11T11:33:03-05:00' previous_state: active signup_payment_id: 237154761 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: COUPONA total_revenue_in_cents: 52762 product_price_in_cents: 100000 product_version_number: 2 payment_type: credit_card referral_code: x45nc8 coupon_use_count: 0 coupon_uses_allowed: 1 reason_code: null automatically_resume_at: null coupon_codes: - COUPONA - COUPONB customer: id: 21259051 first_name: K last_name: C organization: '' email: example@chargify.com created_at: '2018-04-20T14:20:57-05:00' updated_at: '2018-04-23T15:29:28-05:00' reference: null address: '' address_2: '' city: '' state: '' zip: '' country: '' phone: '' portal_invite_last_sent_at: '2018-04-20T14:20:59-05:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2018-04-20T14:20:59-05:00' cc_emails: '' tax_exempt: false product: id: 4581816 name: Basic handle: basic description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-11-02T15:00:11-05:00' updated_at: '2018-04-10T09:02:59-05:00' price_in_cents: 100000 interval: 1 interval_unit: month initial_charge_in_cents: 100000 trial_price_in_cents: 1000 trial_interval: 10 trial_interval_unit: month archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 2 update_return_params: '' product_family: id: 1025627 name: My Product Family description: '' handle: acme-products accounting_code: null public_signup_pages: - id: 333589 return_url: '' return_params: '' url: 'https://general-goods.chargifypay.com/subscribe/hbwtd98j3hk2/basic' - id: 335926 return_url: '' return_params: '' url: 'https://general-goods.chargifypay.com/subscribe/g366zy67c7rm/basic' - id: 345555 return_url: '' return_params: '' url: 'https://general-goods.chargifypay.com/subscribe/txqyyqk7d8rz/basic' - id: 345556 return_url: '' return_params: '' url: 'https://general-goods.chargifypay.com/subscribe/2zss3qpf4249/basic' credit_card: id: 14839830 first_name: John last_name: Doe masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2028 customer_id: 21259051 current_vault: bogus vault_token: '1' billing_address: null billing_city: null billing_state: null billing_zip: '99999' billing_country: null customer_vault_token: null billing_address_2: null payment_type: credit_card payer_id: 21259051 x-stoplight: id: add-multiple-coupons-to-existing-subscription-output name: Add Multiple Coupons to Existing Subscription Output public: true subscription-preview-response: title: Subscription Preview Response type: object properties: subscription_preview: type: object properties: current_billing_manifest: type: object properties: line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer component_id: type: integer total_in_cents: type: integer total_discount_in_cents: type: integer total_tax_in_cents: type: integer subtotal_in_cents: type: integer start_date: type: string end_date: type: string period_type: type: string existing_balance_in_cents: type: integer next_billing_manifest: type: object properties: line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer component_id: type: integer total_in_cents: type: integer total_discount_in_cents: type: integer total_tax_in_cents: type: integer subtotal_in_cents: type: integer start_date: type: string end_date: type: string period_type: type: string existing_balance_in_cents: type: integer example: subscription_preview: current_billing_manifest: line_items: - transaction_type: charge kind: baseline amount_in_cents: 5000 memo: Gold Product (08/21/2018 - 09/21/2018) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_id: 1 product_handle: gold-product product_name: Gold Product - transaction_type: charge kind: component amount_in_cents: 28000 memo: 'Component name: 14 Unit names' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 462149 component_handle: handle component_name: Component name - transaction_type: charge kind: component amount_in_cents: 2000 memo: 'Fractional Metered Components: 20.0 Fractional Metereds' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 426665 component_handle: handle component_name: Fractional Metered Components - transaction_type: charge kind: component amount_in_cents: 0 memo: On/Off Component discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 426670 component_handle: handle component_name: On/Off Component - transaction_type: adjustment kind: coupon amount_in_cents: 0 memo: 'Coupon: 1DOLLAR - You only get $1.00 off' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 total_in_cents: 35000 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 35000 start_date: '2018-08-21T21:25:21Z' end_date: '2018-09-21T21:25:21Z' period_type: recurring existing_balance_in_cents: 0 next_billing_manifest: line_items: - transaction_type: charge kind: baseline amount_in_cents: 5000 memo: Gold Product (09/21/2018 - 10/21/2018) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 product_id: 1 product_handle: gold-product product_name: Gold Product - transaction_type: charge kind: component amount_in_cents: 28000 memo: 'Component name: 14 Unit names' discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 462149 component_handle: handle component_name: Component name - transaction_type: charge kind: component amount_in_cents: 0 memo: On/Off Component discount_amount_in_cents: 0 taxable_amount_in_cents: 0 component_id: 426670 component_handle: handle component_name: On/Off Component total_in_cents: 33000 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 33000 start_date: '2018-09-21T21:25:21Z' end_date: '2018-10-21T21:25:21Z' period_type: recurring existing_balance_in_cents: 0 x-stoplight: id: subscription-preview-response name: Subscription Preview Response public: true invoice-new: title: Read One Invoice type: object properties: uid: type: string description: Unique identifier for the invoice. It is generated automatically by Chargify and has the prefix "inv_" followed by alphanumeric characters. site_id: type: integer description: ID of the site to which the invoice belongs. customer_id: type: integer description: ID of the customer to which the invoice belongs. subscription_id: type: integer description: ID of the subscription that generated the invoice. number: type: string description: |- A unique, identifying string that appears on the invoice and in places the invoice is referenced. While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike. sequence_number: type: integer description: A monotonically increasing number assigned to invoices as they are created. This number is unique within a site and can be used to sort and order invoices. issue_date: type: string description: |- Date the invoice was issued to the customer. This is the date that the invoice was made available for payment. The format is `"YYYY-MM-DD"`. due_date: type: string description: |- Date the invoice is due. The format is `"YYYY-MM-DD"`. paid_date: type: string description: |- Date the invoice became fully paid. If partial payments are applied to the invoice, this date will not be present until payment has been made in full. The format is `"YYYY-MM-DD"`. status: type: string description: |- Current status of the invoice. One of: * "draft" * "pending" * "open" * "paid" * "voided" * "canceled" See [Invoice Statuses](https://help.chargify.com/invoices/index.html#invoice-statuses) for more. collection_method: type: string description: 'The collection method of the invoice, which is either "automatic" (tried and retried on an existing payment method by Chargify) or "remittance" (payment must be remitted by the customer or keyed in by the merchant).' payment_instructions: type: string description: 'A message that is printed on the invoice when it is marked for remittance collection. It is intended to describe to the customer how they may make payment, and is configured by the merchant.' currency: type: string description: The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. consolidation_level: type: string description: |- Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: * "none": A normal invoice with no consolidation. * "child": An invoice segment which has been combined into a consolidated invoice. * "parent": A consolidated invoice, whose contents are composed of invoice segments. "Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments. See also the [invoice consolidation documentation](https://help.chargify.com/invoices/consolidation.html). parent_invoice_uid: type: 'null' description: 'For invoices with `consolidation_level` of `child`, this specifies the UID of the parent (consolidated) invoice.' parent_invoice_number: type: 'null' description: 'For invoices with `consolidation_level` of `child`, this specifies the number of the parent (consolidated) invoice.' group_primary_subscription_id: type: 'null' description: 'For invoices with `consolidation_level` of `parent`, this specifies the ID of the subscription which was the primary subscription of the subscription group that generated the invoice.' product_name: type: string description: The name of the product subscribed when the invoice was generated. product_family_name: type: string description: The name of the product family subscribed when the invoice was generated. seller: type: object description: Information about the seller (merchant) listed on the masthead of the invoice. properties: name: type: string address: type: object properties: street: type: 'null' line2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: string '': type: string customer: type: object description: Information about the customer who is owner or recipient the invoiced subscription. properties: chargify_id: type: integer first_name: type: string last_name: type: string organization: type: 'null' email: type: string memo: type: string description: The memo printed on invoices of any collection type. This message is in control of the merchant. billing_address: type: object description: The invoice billing address. properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string shipping_address: type: object description: The invoice shipping address. properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string subtotal_amount: type: string description: 'Subtotal of the invoice, which is the sum of all line items before discounts or taxes.' discount_amount: type: string description: Total discount applied to the invoice. tax_amount: type: string description: Total tax on the invoice. total_amount: type: string description: 'The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.''' credit_amount: type: string description: |- The amount of credit (from credit notes) applied to this invoice. Credits offset the amount due from the customer. refund_amount: type: string paid_amount: type: string description: The amount paid on the invoice by the customer. due_amount: type: string description: 'Amount due on the invoice, which is `total_amount - credit_amount - paid_amount`.' line_items: type: array description: Line items on the invoice. items: type: object properties: uid: type: string description: Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. title: type: string description: A short descriptor for the charge or item represented by this line. description: type: string description: |- Detailed description for the charge or item represented by this line. May include proration details in plain text. Note: this string may contain line breaks that are hints for the best display format on the invoice. quantity: type: string description: |- The quantity or count of units billed by the line item. This is a decimal number represented as a string. (See "About Decimal Numbers".) unit_price: type: string description: |- The price per unit for the line item. When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. subtotal_amount: type: string description: 'The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount).' discount_amount: type: string description: |- The approximate discount applied to just this line. The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. tax_amount: type: string description: |- The approximate tax applied to just this line. The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. total_amount: type: string description: |- The non-canonical total amount for the line. `subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. tiered_unit_price: type: boolean description: 'When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units.' period_range_start: type: string description: |- Start date for the period covered by this line. The format is `"YYYY-MM-DD"`. * For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future. * For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the previous billing, and the end date will be the current billing date. * For non-periodic charges, this date and the end date will match. period_range_end: type: string description: |- End date for the period covered by this line. The format is `"YYYY-MM-DD"`. * For periodic charges paid in advance, this date will match the next (future) billing date. * For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the current billing date. * For non-periodic charges, this date and the start date will match. product_id: type: integer description: |- The ID of the product subscribed when the charge was made. This may be set even for component charges, so true product-only (non-component) charges will also have a nil `component_id`. product_version: type: integer description: The version of the product subscribed when the charge was made. component_id: type: - integer - 'null' description: The ID of the component being billed. Will be `nil` for non-component charges. price_point_id: type: - integer - 'null' description: The price point ID of the component being billed. Will be `nil` for non-component charges. product_price_point_id: type: - 'null' - integer description: The price point ID of the line item's product discounts: type: array items: type: object properties: uid: type: string title: type: string code: type: string source_type: type: string source_id: type: integer discount_type: type: string percentage: type: string eligible_amount: type: string discount_amount: type: string line_item_breakouts: type: array items: type: object properties: uid: type: string eligible_amount: type: string discount_amount: type: string taxes: type: array items: type: object properties: uid: type: string title: type: string source_type: type: string source_id: type: integer percentage: type: string taxable_amount: type: string tax_amount: type: string line_item_breakouts: type: array items: type: object properties: uid: type: string taxable_amount: type: string tax_amount: type: string credits: type: array items: type: object properties: uid: type: string credit_note_number: type: string credit_note_uid: type: string transaction_time: type: string memo: type: string original_amount: type: string applied_amount: type: string refunds: type: array items: type: object properties: transaction_id: type: integer payment_id: type: integer memo: type: string original_amount: type: string applied_amount: type: string gateway_transaction_id: type: - string - 'null' description: The transaction ID for the refund as returned from the payment gateway payments: type: array items: type: object properties: transaction_time: type: string memo: type: string original_amount: type: string applied_amount: type: string payment_method: type: object properties: details: type: string kind: type: string memo: type: string type: type: string card_brand: type: string card_expiration: type: string last_four: type: string masked_card_number: type: string transaction_id: type: integer prepayment: type: boolean gateway_transaction_id: type: - string - 'null' description: The transaction ID for the payment as returned from the payment gateway custom_fields: type: array items: type: object properties: name: type: string value: type: string owner_id: type: number owner_type: type: string public_url: type: string description: The public URL of the invoice previous_balance_data: type: object properties: capture_date: type: string invoices: type: array items: type: object properties: uid: type: string number: type: string outstanding_amount: type: string example: uid: inv_8cvtwz27ptgp3 site_id: 20 customer_id: 3 subscription_id: 2 number: '17' sequence_number: 17 issue_date: '2018-05-24' due_date: '2018-05-24' paid_date: '2018-05-24' status: paid collection_method: automatic payment_instructions: 'Please make checks payable to \"Acme, Inc.\"' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Professional Plan product_family_name: Cloud Compute Servers seller: name: 'Acme, Inc.' address: street: null line2: null city: null state: null zip: null country: null phone: 555-555-1234 x137 customer: chargify_id: 3 first_name: Marty last_name: McFly organization: null email: timetraveller1985@example.com memo: 'Thanks for your business! If you have any questions, please contact your account manager.' billing_address: street: 200 Billing Rd. line2: Suite 100 city: Needham state: MA zip: 02494 country: US shipping_address: street: 100 Shipping St. line2: Apt 200 city: Pleasantville state: NC zip: '12345' country: US subtotal_amount: '473.75' discount_amount: '47.38' tax_amount: '28.78' total_amount: '455.15' credit_amount: '4.8' paid_amount: '450.35' due_amount: '0.0' line_items: - uid: li_8cvtwyyncxtdv title: Professional Plan description: 05/24/2018 - 06/24/2018 quantity: '1.0' unit_price: '99.0' subtotal_amount: '99.0' discount_amount: '9.9' tax_amount: '6.01425' total_amount: '95.11425' tiered_unit_price: false period_range_start: '2018-05-24' period_range_end: '2018-06-24' product_id: 84 product_version: 1 component_id: null price_point_id: null - uid: li_8cvtwyyxc6x4q title: Small Instance (Hourly) description: '' quantity: '201.0' unit_price: '0.25' subtotal_amount: '50.25' discount_amount: '5.03' tax_amount: '3.05235' total_amount: '48.27235' tiered_unit_price: false period_range_start: '2018-04-24' period_range_end: '2018-05-24' product_id: 84 product_version: 1 component_id: 76 price_point_id: null - uid: li_8cvtwyyybg5r3 title: Large Instance (Hourly) description: '' quantity: '629.0' unit_price: '0.5' subtotal_amount: '314.5' discount_amount: '31.45' tax_amount: '19.105875' total_amount: '302.155875' tiered_unit_price: false period_range_start: '2018-04-24' period_range_end: '2018-05-24' product_id: 84 product_version: 1 component_id: 77 price_point_id: null - uid: li_8cvtwyyzcz3j8 title: IP Addresses description: '' quantity: '5.0' unit_price: '2.0' subtotal_amount: '10.0' discount_amount: '1.0' tax_amount: '0.6075' total_amount: '9.6075' tiered_unit_price: false period_range_start: '2018-05-24' period_range_end: '2018-06-24' product_id: 84 product_version: 1 component_id: 78 price_point_id: 87 discounts: - uid: dli_8cvtwyzctqwz5 title: Multi-service discount (10%) code: MULTI3 source_type: Coupon source_id: 40 discount_type: percentage percentage: '10.0' eligible_amount: '473.75' discount_amount: '47.38' line_item_breakouts: - uid: li_8cvtwyyncxtdv eligible_amount: '99.0' discount_amount: '9.9' - uid: li_8cvtwyyxc6x4q eligible_amount: '50.25' discount_amount: '5.03' - uid: li_8cvtwyyybg5r3 eligible_amount: '314.5' discount_amount: '31.45' - uid: li_8cvtwyyzcz3j8 eligible_amount: '10.0' discount_amount: '1.0' taxes: - uid: tli_8cvtwyztnz268 title: NC Sales Tax source_type: Tax source_id: 1 percentage: '6.75' taxable_amount: '426.37' tax_amount: '28.78' line_item_breakouts: - uid: li_8cvtwyyncxtdv taxable_amount: '89.1' tax_amount: '6.01425' - uid: li_8cvtwyyxc6x4q taxable_amount: '45.22' tax_amount: '3.05235' - uid: li_8cvtwyyybg5r3 taxable_amount: '283.05' tax_amount: '19.105875' - uid: li_8cvtwyyzcz3j8 taxable_amount: '9.0' tax_amount: '0.6075' credits: - uid: cdt_8cvtwz7h2yg7g credit_note_number: '16' credit_note_uid: cn_8ch6kd5y4dd9d transaction_time: '2018-05-24T14:23:18Z' memo: Credit balance applied original_amount: '4.8' applied_amount: '4.8' payments: - transaction_time: '2018-05-24T14:23:18Z' memo: 'Prepayment applied to invoice #17.' original_amount: '50.0' applied_amount: '50.0' payment_method: details: 'Check #45678' kind: Check memo: Check received via mail type: external transaction_id: 71 prepayment: true - transaction_time: '2018-05-24T14:23:20Z' memo: 'Marty McFly - Professional Plan: Renewal payment' original_amount: '400.35' applied_amount: '400.35' payment_method: card_brand: visa card_expiration: 12/2022 last_four: '1111' masked_card_number: XXXX-XXXX-XXXX-1111 type: credit_card transaction_id: 113 prepayment: false custom_fields: - name: Account Manager value: Gerald Strickland - name: Account Manager Phone value: 555-555-9999 x807 public_url: 'https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y' x-stoplight: id: invoice-new name: Read One Invoice public: true list-offer-output: title: List Offer Output type: object properties: offers: type: array items: type: object properties: id: type: integer site_id: type: integer product_family_id: type: integer product_family_name: type: string product_id: type: integer product_name: type: string product_price_in_cents: type: integer product_revisable_number: type: integer product_price_point_id: type: integer product_price_point_name: type: string name: type: string handle: type: string description: type: string created_at: type: string updated_at: type: string archived_at: type: 'null' offer_items: type: array items: type: object properties: component_id: type: integer component_name: type: string component_unit_price: type: string price_point_id: type: integer price_point_name: type: string starting_quantity: type: string editable: type: boolean currency_prices: type: array items: $ref: '#/definitions/price-point-currency-price' offer_discounts: type: array items: type: object properties: coupon_id: type: integer coupon_code: type: string coupon_name: type: string offer_signup_pages: type: array items: type: object properties: id: type: integer enabled: type: boolean nickname: type: string return_url: type: string return_params: type: string url: type: string example: offers: - id: 239 site_id: 48110 product_family_id: 1025627 product_family_name: Gold product_id: 110 product_name: Pro product_price_in_cents: 1000 product_revisable_number: 0 product_price_point_id: 138 product_price_point_name: Default name: Third Offer handle: third description: '' created_at: '2018-08-03T09:56:11-05:00' updated_at: '2018-08-03T09:56:11-05:00' archived_at: null offer_items: - component_id: 426665 component_name: Database Size (GB) component_unit_price: '1.0' price_point_id: 149438 price_point_name: Auto-created starting_quantity: '0.0' editable: false currency_prices: [] offer_discounts: - coupon_id: 234 coupon_code: GR8_CUSTOMER coupon_name: Multi-service Discount offer_signup_pages: - id: 356482 nickname: ggoods enabled: true return_url: '' return_params: '' url: 'https://general-goods.chargifypay.com/subscribe/hjpvhnw63tzy' x-stoplight: id: list-offer-output name: List Offer Output public: true create-offer-output: title: Create Offer Output type: object properties: offer: type: object properties: id: type: integer site_id: type: integer product_family_id: type: integer product_id: type: integer product_price_point_id: type: integer product_revisable_number: type: integer name: type: string handle: type: string description: type: string created_at: type: string updated_at: type: string archived_at: type: 'null' offer_items: type: array items: type: object properties: component_id: type: integer price_point_id: type: integer starting_quantity: type: string editable: type: boolean component_unit_price: type: string offer_discounts: type: array items: type: object properties: coupon_code: type: string product_family_name: type: string product_name: type: string product_price_point_name: type: string product_price_in_cents: type: integer example: offer: id: 3 site_id: 2 product_family_id: 4 product_family_name: Chargify product_id: 31 product_name: 31-Day Trial product_price_in_cents: 2000 product_price_point_id: 103 product_price_point_name: Default product_revisable_number: 0 name: Solo handle: han_shot_first description: A Star Wars Story created_at: '2018-06-08T14:51:52-04:00' updated_at: '2018-06-08T14:51:52-04:00' archived_at: null offer_items: - component_id: 24 component_name: Invoices component_unit_price: '3.0' price_point_id: 104 price_point_name: Original starting_quantity: '1.0' editable: false offer_discounts: - coupon_id: 3 coupon_code: DEF456 coupon_name: IB Loyalty - Managed for $500 x-stoplight: id: create-offer-output name: Create Offer Output public: true create-offer-input: title: Create Offer Input type: object properties: offer: type: object properties: name: type: string handle: type: string description: type: string product_id: type: integer product_price_point_id: type: integer components: type: array items: type: object properties: component_id: type: integer starting_quantity: type: integer coupons: type: array items: type: string example: offer: name: Solo handle: han_shot_first description: A Star Wars Story product_id: 31 product_price_point_id: 102 components: - component_id: 24 starting_quantity: 1 coupons: - DEF456 x-stoplight: id: create-offer-input name: Create Offer Input public: true show-offer-output: title: Show Offer Output type: object properties: offer: type: object properties: id: type: integer site_id: type: integer product_family_id: type: integer product_id: type: integer product_price_point_id: type: integer product_revisable_number: type: integer name: type: string handle: type: string description: type: string created_at: type: string updated_at: type: string archived_at: type: string offer_items: type: array items: type: object properties: component_id: type: integer price_point_id: type: integer starting_quantity: type: string editable: type: boolean component_name: type: string price_point_name: type: string component_unit_price: type: string offer_discounts: type: array items: type: object properties: coupon_code: type: string coupon_id: type: integer coupon_name: type: string offer_signup_pages: type: array items: type: object properties: id: type: integer enabled: type: boolean return_url: type: string return_params: type: string url: type: string product_family_name: type: string product_name: type: string product_price_point_name: type: string product_price_in_cents: type: integer example: offer: id: 1 site_id: 2 product_family_id: 4 product_family_name: Chargify product_id: 32 product_name: 30-Day Square Trial product_price_in_cents: 2000 product_price_point_id: 132 product_price_point_name: Default product_revisable_number: 0 name: Offer One handle: handle-1 description: An eloquent description. created_at: '2018-06-04T16:19:33-04:00' updated_at: '2018-06-12T10:46:44-04:00' archived_at: '2018-06-12T10:46:44-04:00' offer_items: - component_id: 22 component_name: Invoices component_unit_price: '3.0' price_point_id: 102 price_point_name: Original starting_quantity: '0.0' editable: false offer_discounts: - coupon_id: 3 coupon_code: DEF456 coupon_name: IB Loyalty offer_signup_pages: - id: 55 enabled: true return_url: '' return_params: '' url: 'http://acme.chargifypay.test/subscribe/hbg544f4gph2/pro' - id: 56 enabled: true return_url: '' return_params: '' url: 'http://acme.chargifypay.test/subscribe/5tjy2dpg48b8/pro' x-stoplight: id: show-offer-output name: Show Offer Output public: true update-subscription-product-change-request-id: title: 'Update Subscription: Product Change Request - ID' type: object properties: subscription: type: object properties: product_id: type: string example: subscription: product_id: '123456' x-stoplight: id: update-subscription-product-change-request-id name: 'Update Subscription: Product Change Request - ID' public: true create-subscription-group-request: title: Subscription Create Group Request type: object properties: subscription: type: object properties: product_handle: type: string customer_id: type: integer payment_profile_id: type: integer group: type: object properties: target: type: object properties: type: type: string id: type: integer billing: type: object properties: align_date: type: boolean prorate: type: boolean accrue: type: boolean example: subscription: product_handle: product-xyz customer_id: 17346006 payment_profile_id: 11991557 group: target: type: subscription id: 12345 billing: align_date: true prorate: true accrue: true x-stoplight: id: create-subscription-group-request name: Subscription Create Group Request public: true create-subscription-with-offer-response: title: Create Subscription with Offer Response type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: boolean payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: string total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: string coupon_use_count: type: integer coupon_uses_allowed: type: integer reason_code: type: 'null' automatically_resume_at: type: 'null' coupon_codes: type: array items: type: string offer_id: type: integer customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: string email: type: string created_at: type: string updated_at: type: string reference: type: 'null' address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string portal_invite_last_sent_at: type: 'null' portal_invite_last_accepted_at: type: 'null' verified: type: 'null' portal_customer_created_at: type: string vat_number: type: 'null' cc_emails: type: 'null' tax_exempt: type: boolean product: type: object properties: id: type: integer name: type: string handle: type: 'null' description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string tax_code: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: 'null' return_params: type: string url: type: string credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: 'null' billing_city: type: 'null' billing_state: type: 'null' billing_zip: type: 'null' billing_country: type: 'null' customer_vault_token: type: 'null' billing_address_2: type: 'null' payment_type: type: string payer_id: type: integer example: subscription: id: 22885645 state: active trial_started_at: null trial_ended_at: null activated_at: '2018-08-03T12:53:28-05:00' created_at: '2018-08-03T12:53:28-05:00' updated_at: '2018-08-03T12:53:28-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2018-08-07T12:53:28-05:00' next_assessment_at: '2018-08-07T12:53:28-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null current_period_started_at: '2018-08-03T12:53:28-05:00' previous_state: active signup_payment_id: 254497876 signup_revenue: '100.00' delayed_cancel_at: null coupon_code: POINTFIVE total_revenue_in_cents: 10000 product_price_in_cents: 10000 product_version_number: 1 payment_type: credit_card referral_code: c85dkg coupon_use_count: 0 coupon_uses_allowed: 1 reason_code: null automatically_resume_at: null coupon_codes: - POINTFIVE offer_id: 238 customer: id: 22575681 first_name: Meg last_name: 'Whitney ' organization: '' email: meg@example.com created_at: '2018-08-02T09:37:02-05:00' updated_at: '2018-08-02T09:37:03-05:00' reference: null address: 123 Anywhere Street address_2: '' city: '123' state: AL zip: '12345' country: US phone: '' portal_invite_last_sent_at: null portal_invite_last_accepted_at: null verified: null portal_customer_created_at: '2018-08-02T09:37:03-05:00' vat_number: null cc_emails: null tax_exempt: false product: id: 4671521 name: 4 Day Product handle: null description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2018-07-16T12:32:20-05:00' updated_at: '2018-07-16T12:32:20-05:00' price_in_cents: 10000 interval: 4 interval_unit: day initial_charge_in_cents: null trial_price_in_cents: null trial_interval: null trial_interval_unit: month archived_at: null require_credit_card: true return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 1025629 name: Products description: Invoice handle: test accounting_code: null public_signup_pages: - id: 356487 return_url: null return_params: '' url: 'https://general-goods.chargifypay.com/subscribe/xj3ptd3gs7v6' credit_card: id: 15869432 first_name: Meg last_name: 'Whitney ' masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 10 expiration_year: 2020 customer_id: 22575681 current_vault: bogus vault_token: '1' billing_address: null billing_city: null billing_state: null billing_zip: null billing_country: null customer_vault_token: null billing_address_2: null payment_type: credit_card payer_id: 22575681 x-stoplight: id: create-subscription-with-offer-response name: Create Subscription with Offer Response public: true create-subscription-with-offer-request: title: Create Subscription with Offer Request type: object properties: subscription: type: object properties: offer_id: type: integer customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string credit_card_attributes: type: object properties: full_number: type: string expiration_month: type: string expiration_year: type: string example: subscription: offer_id: 123456789 customer_attributes: first_name: Alysa last_name: Test email: alysa@example.com credit_card_attributes: full_number: '1' expiration_month: '10' expiration_year: '2020' x-stoplight: id: create-subscription-with-offer-request name: Create Subscription with Offer Request public: true subscription-preview-with-custom-taxes: title: Subscription Preview with Custom Taxes Request type: object properties: subscription: type: object properties: product_handle: type: string customer_attributes: type: object properties: address: type: string address_2: type: 'null' city: type: string state: type: string zip: type: string country: type: string example: subscription: product_handle: paid-annual-seats customer_attributes: address: 870 Massachusetts Ave address_2: null city: Boston state: MA zip: 02118 country: US x-stoplight: id: subscription-preview-with-custom-taxes name: Subscription Preview with Custom Taxes Request public: true subscription-preview-with-custom-taxes-response: title: Subscription Preview with Taxes Response type: object properties: subscription_preview: type: object properties: current_billing_manifest: type: object properties: line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer taxations: type: array items: type: object properties: tax_id: type: integer tax_name: type: string rate: type: string tax_amount_in_cents: type: integer tax_rules: type: array items: type: object properties: tax_rule_id: type: integer country_code: type: string subdivision_code: type: string rate: type: string tax_amount_in_cents: type: integer description: type: 'null' total_in_cents: type: integer total_discount_in_cents: type: integer total_tax_in_cents: type: integer subtotal_in_cents: type: integer start_date: type: string end_date: type: string period_type: type: string existing_balance_in_cents: type: integer next_billing_manifest: type: object properties: line_items: type: array items: type: object total_in_cents: type: integer total_discount_in_cents: type: integer total_tax_in_cents: type: integer subtotal_in_cents: type: integer start_date: type: string end_date: type: string period_type: type: string existing_balance_in_cents: type: integer example: subscription_preview: current_billing_manifest: line_items: - transaction_type: charge kind: initial amount_in_cents: 4900 memo: Initial/Startup fees discount_amount_in_cents: 0 taxable_amount_in_cents: 4900 taxations: - tax_id: 7843 tax_name: US TAX rate: '0.1' tax_amount_in_cents: 490 tax_rules: - tax_rule_id: 18819 country_code: US subdivision_code: MA rate: '0.1' tax_amount_in_cents: 490 description: null - transaction_type: charge kind: trial amount_in_cents: 1000 memo: Trial Price (08/29/2018 - 09/12/2018) discount_amount_in_cents: 0 taxable_amount_in_cents: 1000 taxations: - tax_id: 7843 tax_name: US TAX rate: '0.1' tax_amount_in_cents: 100 tax_rules: - tax_rule_id: 18819 country_code: US subdivision_code: MA rate: '0.1' tax_amount_in_cents: 100 description: null - transaction_type: charge kind: tax amount_in_cents: 590 memo: US TAX (10.0%) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 total_in_cents: 6490 total_discount_in_cents: 0 total_tax_in_cents: 590 subtotal_in_cents: 5900 start_date: '2018-08-29T14:18:02Z' end_date: '2018-09-12T14:18:02Z' period_type: trial existing_balance_in_cents: 0 next_billing_manifest: line_items: [] total_in_cents: 0 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 0 start_date: '2018-09-12T14:18:02Z' end_date: '2019-09-12T14:18:02Z' period_type: recurring existing_balance_in_cents: 0 x-stoplight: id: subscription-preview-with-custom-taxes-response name: Subscription Preview with Taxes Response public: true subscription-preview-avalara-request: title: Subscription Preview Avalara Request type: object properties: subscription: type: object properties: product_handle: type: string customer_attributes: type: object properties: address: type: string address_2: type: 'null' city: type: string state: type: string zip: type: string country: type: string example: subscription: product_handle: paid-annual-seats customer_attributes: address: 870 Massachusetts Ave address_2: null city: Boston state: MA zip: 02118 country: US x-stoplight: id: subscription-preview-avalara-request name: Subscription Preview Avalara Request public: true subscription-preview-avalara-response: title: Subscription Preview Avalara Response type: object properties: subscription_preview: type: object properties: current_billing_manifest: type: object properties: line_items: type: array items: type: object properties: transaction_type: type: string kind: type: string amount_in_cents: type: integer memo: type: string discount_amount_in_cents: type: integer taxable_amount_in_cents: type: integer taxations: type: array items: type: object properties: tax_id: type: 'null' tax_name: type: string rate: type: string tax_amount_in_cents: type: integer tax_rules: type: array items: type: object total_in_cents: type: integer total_discount_in_cents: type: integer total_tax_in_cents: type: integer subtotal_in_cents: type: integer start_date: type: string end_date: type: string period_type: type: string existing_balance_in_cents: type: integer next_billing_manifest: type: object properties: line_items: type: array items: type: object total_in_cents: type: integer total_discount_in_cents: type: integer total_tax_in_cents: type: integer subtotal_in_cents: type: integer start_date: type: string end_date: type: string period_type: type: string existing_balance_in_cents: type: integer example: subscription_preview: current_billing_manifest: line_items: - transaction_type: charge kind: initial amount_in_cents: 4900 memo: Initial/Startup fees discount_amount_in_cents: 0 taxable_amount_in_cents: 4900 taxations: - tax_id: null tax_name: MA Tax (6.25%) rate: '' tax_amount_in_cents: 306 tax_rules: [] - transaction_type: charge kind: trial amount_in_cents: 1000 memo: Trial Price (08/29/2018 - 09/12/2018) discount_amount_in_cents: 0 taxable_amount_in_cents: 1000 taxations: - tax_id: null tax_name: MA Tax (6.25%) rate: '' tax_amount_in_cents: 63 tax_rules: [] - transaction_type: charge kind: tax amount_in_cents: 306 memo: MA Tax (6.25%) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 - transaction_type: charge kind: tax amount_in_cents: 63 memo: MA Tax (6.25%) discount_amount_in_cents: 0 taxable_amount_in_cents: 0 total_in_cents: 6269 total_discount_in_cents: 0 total_tax_in_cents: 369 subtotal_in_cents: 5900 start_date: '2018-08-29T14:20:29Z' end_date: '2018-09-12T14:20:29Z' period_type: trial existing_balance_in_cents: 0 next_billing_manifest: line_items: [] total_in_cents: 0 total_discount_in_cents: 0 total_tax_in_cents: 0 subtotal_in_cents: 0 start_date: '2018-09-12T14:20:29Z' end_date: '2019-09-12T14:20:29Z' period_type: recurring existing_balance_in_cents: 0 x-stoplight: id: subscription-preview-avalara-response name: Subscription Preview Avalara Response public: true read-invoice-events-response: title: Read Invoice Events Response type: object properties: events: type: array items: type: object properties: id: type: integer event_type: type: string enum: - issue_invoice - apply_credit_note - apply_payment - refund_invoice - ' void_invoice' - void_remainder event_data: type: object description: |- The event data is the data that, when combined with the command, results in the output `invoice` found in the `invoice` field. The data depends on the event: *`apply_payment`* * `memo`: The payment memo * `original_amount`: The full, original amount of the payment transaction as a string in full units. Incoming payments can be split amongst several invoices, which will result in a `applied_amount` less than the `original_amount`. Example: A $100.99 payment, of which $40.11 is applied to this invoice, will have an `original_amount` of `"100.99"`. * `applied_amount`: The amount of the payment applied to this invoice. Incoming payments can be split amongst several invoices, which will result in a `applied_amount` less than the `original_amount`. Example: A $100.99 payment, of which $40.11 is applied to this invoice, will have an `applied_amount` of `"40.11"`. * `transaction_time`: The time the payment was removed, in ISO 8601 format, i.e. `"2019-06-07T17:20:06Z"` * `payment_method`: A nested data structure detailing the method of payment * `transaction_id`: The ID of the original payment (a Chargify-generated identifier) *`remove_payment`* This data matches the data from `apply_payment`. The amount of the payment being removed is the `applied_amount`. timestamp: type: string format: date-time invoice: $ref: '#/definitions/invoice-new' page: type: integer per_page: type: integer total_pages: type: integer example: events: - id: 83 event_type: apply_payment event_data: memo: 'Non-Resumable Canceled On Purpose - Standard Plan: Renewal payment' original_amount: '168.61' applied_amount: '168.61' transaction_time: '2018-08-01T16:00:00Z' payment_method: card_brand: visa card_expiration: 12/2022 last_four: null masked_card_number: XXXX-XXXX-XXXX-1111 type: credit_card transaction_id: 126 consolidation_level: none parent_invoice_number: null timestamp: '2018-08-01T16:00:00Z' invoice: id: 614942008934401500 uid: inv_8gk5bwkct3gqt site_id: 20 customer_id: 6 subscription_id: 10 number: '25' sequence_number: 25 transaction_time: '2018-08-01T16:00:00Z' created_at: '2018-08-01T16:00:00Z' updated_at: '2018-08-01T16:00:00Z' issue_date: '2018-08-01' due_date: '2018-08-01' paid_date: '2018-08-01' status: paid role: renewal collection_method: automatic payment_instructions: 'Please make checks payable to "Acme, Inc."' currency: USD consolidation_level: none parent_invoice_id: null subscription_group_id: null parent_invoice_number: null product_name: Standard Plan product_family_name: Cloud Compute Servers seller: name: 'Acme, Inc.' address: street: null line2: null city: null state: null zip: null country: null phone: 555-555-1234 x137 logo_url: null customer: chargify_id: 6 first_name: Non-Resumable last_name: Canceled On Purpose organization: null email: evan4@example.com payer: chargify_id: 6 first_name: Non-Resumable last_name: Canceled On Purpose organization: null email: evan4@example.com recipient_emails: [] terms: due_on_receipt memo: 'Thanks for your business! If you have any questions, please contact your account manager.' billing_address: street: 200 Billing Rd. line2: Suite 100 city: Needham state: MA zip: 02494 country: US shipping_address: street: 100 Shipping St. line2: Apt 200 city: Pleasantville state: NC zip: '12345' country: US line_items: - uid: li_8gk5bwkct3gqk title: Standard Plan description: 08/01/2018 - 09/01/2018 quantity: '1.0' unit_price: '99.0' subtotal_amount: '99.0' discount_amount: '9.9' tax_amount: '6.01425' total_amount: '95.11425' tiered_unit_price: false period_range_start: '2018-08-01' period_range_end: '2018-09-01' transaction_id: 120 product_id: 84 product_version: 1 component_id: null price_point_id: null hide: false component_cost_data: null - uid: li_8gk5bwkct3gqm title: Small Instance (Hourly) description: 07/22/2018 - 08/01/2018 quantity: '162.0' unit_price: '0.09567901' subtotal_amount: '15.5' discount_amount: '1.55' tax_amount: '0.941625' total_amount: '14.891625' tiered_unit_price: true period_range_start: '2018-07-22' period_range_end: '2018-08-01' transaction_id: 121 product_id: 84 product_version: 1 component_id: 76 price_point_id: null hide: false component_cost_data: rates: - component_code_id: null price_point_id: 160 product_id: 84 quantity: '162.0' amount: '15.5' pricing_scheme: tiered tiers: - starting_quantity: 1 ending_quantity: 100 quantity: '100.0' unit_price: '0.0' amount: '0.0' - starting_quantity: 101 ending_quantity: null quantity: '62.0' unit_price: '0.25' amount: '15.5' - uid: li_8gk5bwkct3gqn title: Large Instance (Hourly) description: 07/22/2018 - 08/01/2018 quantity: '194.0' unit_price: '0.24226804' subtotal_amount: '47.0' discount_amount: '4.7' tax_amount: '2.85525' total_amount: '45.15525' tiered_unit_price: true period_range_start: '2018-07-22' period_range_end: '2018-08-01' transaction_id: 122 product_id: 84 product_version: 1 component_id: 77 price_point_id: null hide: false component_cost_data: rates: - component_code_id: null price_point_id: 161 product_id: 84 quantity: '194.0' amount: '47.0' pricing_scheme: tiered tiers: - starting_quantity: 1 ending_quantity: 100 quantity: '100.0' unit_price: '0.0' amount: '0.0' - starting_quantity: 101 ending_quantity: null quantity: '94.0' unit_price: '0.5' amount: '47.0' - uid: li_8gk5bwkct3gqp title: IP Addresses description: 08/01/2018 - 09/01/2018 quantity: '7.0' unit_price: '2.0' subtotal_amount: '14.0' discount_amount: '1.4' tax_amount: '0.8505' total_amount: '13.4505' tiered_unit_price: false period_range_start: '2018-08-01' period_range_end: '2018-09-01' transaction_id: 123 product_id: 84 product_version: 1 component_id: 79 price_point_id: 163 hide: false component_cost_data: rates: - component_code_id: null price_point_id: 163 product_id: 84 quantity: '7.0' amount: '14.0' pricing_scheme: per_unit tiers: - starting_quantity: 1 ending_quantity: null quantity: '7.0' unit_price: '2.0' amount: '14.0' subtotal_amount: '175.5' discount_amount: '17.55' discounts: - uid: dli_8gk5bwkct3gqq title: Multi-service discount (10%) description: null code: MULTI3 source_type: Coupon source_id: 40 discount_type: percentage percentage: '10.0' eligible_amount: '175.5' discount_amount: '17.55' transaction_id: 124 line_item_breakouts: - uid: li_8gk5bwkct3gqk eligible_amount: '99.0' discount_amount: '9.9' - uid: li_8gk5bwkct3gqm eligible_amount: '15.5' discount_amount: '1.55' - uid: li_8gk5bwkct3gqn eligible_amount: '47.0' discount_amount: '4.7' - uid: li_8gk5bwkct3gqp eligible_amount: '14.0' discount_amount: '1.4' tax_amount: '10.66' taxes: - uid: tli_8gk5bwkct3gqr title: NC Sales Tax description: null source_type: Tax source_id: 1 percentage: '6.75' taxable_amount: '157.95' tax_amount: '10.66' transaction_id: 125 line_item_breakouts: - uid: li_8gk5bwkct3gqk taxable_amount: '89.1' tax_amount: '6.01425' - uid: li_8gk5bwkct3gqm taxable_amount: '13.95' tax_amount: '0.941625' - uid: li_8gk5bwkct3gqn taxable_amount: '42.3' tax_amount: '2.85525' - uid: li_8gk5bwkct3gqp taxable_amount: '12.6' tax_amount: '0.8505' tax_component_breakouts: - tax_rule_id: 1 percentage: '6.75' country_code: US subdivision_code: NC credit_amount: '0.0' refund_amount: '0.0' total_amount: '168.61' paid_amount: '168.61' due_amount: '0.0' credits: [] refunds: [] payments: - memo: 'Non-Resumable Canceled On Purpose - Standard Plan: Renewal payment' original_amount: '168.61' applied_amount: '168.61' transaction_time: '2018-08-01T16:00:00Z' payment_method: card_brand: visa card_expiration: 12/2022 last_four: null masked_card_number: XXXX-XXXX-XXXX-1111 type: credit_card transaction_id: 126 prepayment: false custom_fields: [] display_settings: hide_zero_subtotal_lines: false include_discounts_on_lines: false page: 48 per_page: 1 total_pages: 102 x-stoplight: id: read-invoice-events-response name: Read Invoice Events Response public: true read-all-invoices: title: Read All Invoices type: object properties: uid: type: string description: Unique identifier for the invoice. It is generated automatically by Chargify and has the prefix "inv_" followed by alphanumeric characters. site_id: type: integer description: ID of the site to which the invoice belongs. customer_id: type: integer description: ID of the customer to which the invoice belongs. subscription_id: type: integer description: ID of the subscription that generated the invoice. number: type: string description: |- A unique, identifying string that appears on the invoice and in places the invoice is referenced. While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike. sequence_number: type: integer description: A monotonically increasing number assigned to invoices as they are created. This number is unique within a site and can be used to sort and order invoices. issue_date: type: string description: |- Date the invoice was issued to the customer. This is the date that the invoice was made available for payment. The format is `"YYYY-MM-DD"`. due_date: type: string description: |- Date the invoice is due. The format is `"YYYY-MM-DD"`. paid_date: type: string description: |- Date the invoice became fully paid. If partial payments are applied to the invoice, this date will not be present until payment has been made in full. The format is `"YYYY-MM-DD"`. status: type: string description: |- Current status of the invoice. One of: * "draft" * "pending" * "open" * "paid" * "voided" * "canceled" See [Invoice Statuses](https://help.chargify.com/invoices/index.html#invoice-statuses) for more. collection_method: type: string description: 'The collection method of the invoice, which is either "automatic" (tried and retried on an existing payment method by Chargify) or "remittance" (payment must be remitted by the customer or keyed in by the merchant).' payment_instructions: type: string description: 'A message that is printed on the invoice when it is marked for remittance collection. It is intended to describe to the customer how they may make payment, and is configured by the merchant.' currency: type: string description: The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. consolidation_level: type: string description: |- Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: * "none": A normal invoice with no consolidation. * "child": An invoice segment which has been combined into a consolidated invoice. * "parent": A consolidated invoice, whose contents are composed of invoice segments. "Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments. See also the [invoice consolidation documentation](https://help.chargify.com/invoices/consolidation.html). parent_invoice_uid: type: 'null' description: 'For invoices with `consolidation_level` of `child`, this specifies the UID of the parent (consolidated) invoice.' parent_invoice_number: type: 'null' description: 'For invoices with `consolidation_level` of `child`, this specifies the number of the parent (consolidated) invoice.' group_primary_subscription_id: type: 'null' description: 'For invoices with `consolidation_level` of `parent`, this specifies the ID of the subscription which was the primary subscription of the subscription group that generated the invoice.' product_name: type: string description: The name of the product subscribed when the invoice was generated. product_family_name: type: string description: The name of the product family subscribed when the invoice was generated. seller: type: object description: Information about the seller (merchant) listed on the masthead of the invoice. properties: name: type: string address: type: object properties: street: type: 'null' line2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: string '': type: string customer: type: object description: Information about the customer who is owner or recipient the invoiced subscription. properties: chargify_id: type: integer first_name: type: string last_name: type: string organization: type: 'null' email: type: string memo: type: string description: The memo printed on invoices of any collection type. This message is in control of the merchant. billing_address: type: object description: The invoice billing address. properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string shipping_address: type: object description: The invoice shipping address. properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string subtotal_amount: type: string description: 'Subtotal of the invoice, which is the sum of all line items before discounts or taxes.' discount_amount: type: string description: Total discount applied to the invoice. tax_amount: type: string description: Total tax on the invoice. total_amount: type: string description: 'The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.''' credit_amount: type: string description: |- The amount of credit (from credit notes) applied to this invoice. Credits offset the amount due from the customer. refund_amount: type: string paid_amount: type: string description: The amount paid on the invoice by the customer. due_amount: type: string description: 'Amount due on the invoice, which is `total_amount - credit_amount - paid_amount`.' line_items: type: array description: Line items on the invoice. items: type: object properties: uid: type: string description: Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. title: type: string description: A short descriptor for the charge or item represented by this line. description: type: string description: |- Detailed description for the charge or item represented by this line. May include proration details in plain text. Note: this string may contain line breaks that are hints for the best display format on the invoice. quantity: type: string description: |- The quantity or count of units billed by the line item. This is a decimal number represented as a string. (See "About Decimal Numbers".) unit_price: type: string description: |- The price per unit for the line item. When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. subtotal_amount: type: string description: 'The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount).' discount_amount: type: string description: |- The approximate discount applied to just this line. The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. tax_amount: type: string description: |- The approximate tax applied to just this line. The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. total_amount: type: string description: |- The non-canonical total amount for the line. `subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. tiered_unit_price: type: boolean description: 'When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units.' period_range_start: type: string description: |- Start date for the period covered by this line. The format is `"YYYY-MM-DD"`. * For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future. * For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the previous billing, and the end date will be the current billing date. * For non-periodic charges, this date and the end date will match. period_range_end: type: string description: |- End date for the period covered by this line. The format is `"YYYY-MM-DD"`. * For periodic charges paid in advance, this date will match the next (future) billing date. * For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the current billing date. * For non-periodic charges, this date and the start date will match. product_id: type: integer description: |- The ID of the product subscribed when the charge was made. This may be set even for component charges, so true product-only (non-component) charges will also have a nil `component_id`. product_version: type: integer description: The version of the product subscribed when the charge was made. component_id: type: - integer - 'null' description: The ID of the component being billed. Will be `nil` for non-component charges. price_point_id: type: - integer - 'null' description: The price point ID of the component being billed. Will be `nil` for non-component charges. product_price_point_id: type: - 'null' - integer description: The price point ID of the line item's product. discounts: type: array items: type: object properties: uid: type: string title: type: string code: type: string source_type: type: string source_id: type: integer discount_type: type: string percentage: type: string eligible_amount: type: string discount_amount: type: string line_item_breakouts: type: array items: type: object properties: uid: type: string eligible_amount: type: string discount_amount: type: string taxes: type: array items: type: object properties: uid: type: string title: type: string source_type: type: string source_id: type: integer percentage: type: string taxable_amount: type: string tax_amount: type: string line_item_breakouts: type: array items: type: object properties: uid: type: string taxable_amount: type: string tax_amount: type: string credits: type: array items: type: object properties: uid: type: string credit_note_number: type: string credit_note_uid: type: string transaction_time: type: string memo: type: string original_amount: type: string applied_amount: type: string refunds: type: array items: type: object properties: transaction_id: type: integer payment_id: type: integer memo: type: string original_amount: type: string applied_amount: type: string gateway_transaction_id: type: - string - 'null' description: The transaction ID for the refund as returned from the payment gateway payments: type: array items: type: object properties: transaction_time: type: string memo: type: string original_amount: type: string applied_amount: type: string payment_method: type: object properties: details: type: string kind: type: string memo: type: string type: type: string card_brand: type: string card_expiration: type: string last_four: type: string masked_card_number: type: string transaction_id: type: integer prepayment: type: boolean gateway_transaction_id: type: - string - 'null' description: The transaction ID for the payment as returned from the payment gateway custom_fields: type: array items: type: object properties: name: type: string value: type: string owner_id: type: number owner_type: type: string public_url: type: string description: The public URL of the invoice. previous_balance_data: type: object properties: capture_date: type: string invoices: type: array items: type: object properties: uid: type: string number: type: string outstanding_amount: type: string example: uid: inv_8cvtwz27ptgp3 site_id: 20 customer_id: 3 subscription_id: 2 number: '17' sequence_number: 17 issue_date: '2018-05-24' due_date: '2018-05-24' paid_date: '2018-05-24' status: paid collection_method: automatic payment_instructions: 'Please make checks payable to \"Acme, Inc.\"' currency: USD consolidation_level: none parent_invoice_uid: null parent_invoice_number: null group_primary_subscription_id: null product_name: Professional Plan product_family_name: Cloud Compute Servers seller: name: 'Acme, Inc.' address: street: null line2: null city: null state: null zip: null country: null phone: 555-555-1234 x137 customer: chargify_id: 3 first_name: Marty last_name: McFly organization: null email: timetraveller1985@example.com memo: 'Thanks for your business! If you have any questions, please contact your account manager.' billing_address: street: 200 Billing Rd. line2: Suite 100 city: Needham state: MA zip: 02494 country: US shipping_address: street: 100 Shipping St. line2: Apt 200 city: Pleasantville state: NC zip: '12345' country: US subtotal_amount: '473.75' discount_amount: '47.38' tax_amount: '28.78' total_amount: '455.15' credit_amount: '4.8' paid_amount: '450.35' due_amount: '0.0' line_items: - uid: li_8cvtwyyncxtdv title: Professional Plan description: 05/24/2018 - 06/24/2018 quantity: '1.0' unit_price: '99.0' subtotal_amount: '99.0' discount_amount: '9.9' tax_amount: '6.01425' total_amount: '95.11425' tiered_unit_price: false period_range_start: '2018-05-24' period_range_end: '2018-06-24' product_id: 84 product_version: 1 component_id: null price_point_id: null - uid: li_8cvtwyyxc6x4q title: Small Instance (Hourly) description: '' quantity: '201.0' unit_price: '0.25' subtotal_amount: '50.25' discount_amount: '5.03' tax_amount: '3.05235' total_amount: '48.27235' tiered_unit_price: false period_range_start: '2018-04-24' period_range_end: '2018-05-24' product_id: 84 product_version: 1 component_id: 76 price_point_id: null - uid: li_8cvtwyyybg5r3 title: Large Instance (Hourly) description: '' quantity: '629.0' unit_price: '0.5' subtotal_amount: '314.5' discount_amount: '31.45' tax_amount: '19.105875' total_amount: '302.155875' tiered_unit_price: false period_range_start: '2018-04-24' period_range_end: '2018-05-24' product_id: 84 product_version: 1 component_id: 77 price_point_id: null - uid: li_8cvtwyyzcz3j8 title: IP Addresses description: '' quantity: '5.0' unit_price: '2.0' subtotal_amount: '10.0' discount_amount: '1.0' tax_amount: '0.6075' total_amount: '9.6075' tiered_unit_price: false period_range_start: '2018-05-24' period_range_end: '2018-06-24' product_id: 84 product_version: 1 component_id: 78 price_point_id: 87 discounts: - uid: dli_8cvtwyzctqwz5 title: Multi-service discount (10%) code: MULTI3 source_type: Coupon source_id: 40 discount_type: percentage percentage: '10.0' eligible_amount: '473.75' discount_amount: '47.38' line_item_breakouts: - uid: li_8cvtwyyncxtdv eligible_amount: '99.0' discount_amount: '9.9' - uid: li_8cvtwyyxc6x4q eligible_amount: '50.25' discount_amount: '5.03' - uid: li_8cvtwyyybg5r3 eligible_amount: '314.5' discount_amount: '31.45' - uid: li_8cvtwyyzcz3j8 eligible_amount: '10.0' discount_amount: '1.0' taxes: - uid: tli_8cvtwyztnz268 title: NC Sales Tax source_type: Tax source_id: 1 percentage: '6.75' taxable_amount: '426.37' tax_amount: '28.78' line_item_breakouts: - uid: li_8cvtwyyncxtdv taxable_amount: '89.1' tax_amount: '6.01425' - uid: li_8cvtwyyxc6x4q taxable_amount: '45.22' tax_amount: '3.05235' - uid: li_8cvtwyyybg5r3 taxable_amount: '283.05' tax_amount: '19.105875' - uid: li_8cvtwyyzcz3j8 taxable_amount: '9.0' tax_amount: '0.6075' credits: - uid: cdt_8cvtwz7h2yg7g credit_note_number: '16' credit_note_uid: cn_8ch6kd5y4dd9d transaction_time: '2018-05-24T14:23:18Z' memo: Credit balance applied original_amount: '4.8' applied_amount: '4.8' payments: - transaction_time: '2018-05-24T14:23:18Z' memo: 'Prepayment applied to invoice #17.' original_amount: '50.0' applied_amount: '50.0' payment_method: details: 'Check #45678' kind: Check memo: Check received via mail type: external transaction_id: 71 prepayment: true - transaction_time: '2018-05-24T14:23:20Z' memo: 'Marty McFly - Professional Plan: Renewal payment' original_amount: '400.35' applied_amount: '400.35' payment_method: card_brand: visa card_expiration: 12/2022 last_four: '1111' masked_card_number: XXXX-XXXX-XXXX-1111 type: credit_card transaction_id: 113 prepayment: false custom_fields: - name: Account Manager value: Gerald Strickland - name: Account Manager Phone value: 555-555-9999 x807 public_url: 'https://www.chargifypay.com/invoice/inv_8jzrw74xq8kxr?token=fb6kpjz5rcr2vttyjs4rcv6y' x-stoplight: id: read-all-invoices name: Read All Invoices public: true coupons-create-coupon-input-flat-amount: title: Flat Amount Coupon type: object properties: coupon: type: object properties: name: type: string code: type: string description: type: string amount_in_cents: type: integer allow_negative_balance: type: string recurring: type: string end_date: type: string product_family_id: type: string stackable: type: string compounding_strategy: type: string exclude_mid_period_allocations: type: boolean restricted_products: type: object properties: '1': type: boolean restricted_components: type: object properties: '1': type: boolean '2': type: boolean example: coupon: name: $15 OFF code: 15OFF description: $15 off for life amount_in_cents: 1500 allow_negative_balance: 'false' recurring: 'false' end_date: '2012-08-29T12:00:00-04:00' product_family_id: '2' stackable: 'true' compounding_strategy: compound exclude_mid_period_allocations: true restricted_products: '1': true restricted_components: '1': true '2': false x-stoplight: id: coupons-create-coupon-input-flat-amount name: Flat Amount Coupon public: true coupons-create-coupon-output-flat-amount: title: Create Coupon Output Flat Amount type: object properties: coupon: type: object properties: id: type: integer description: | The ID of the coupon name: type: string description: The internal coupon name. This information is never displayed to customers. code: type: string description: 'The coupon code. This is used by you or your customers to apply the coupon to a subscription. The code may contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): `%`, `@`, `+`, `-`, `_`, and `.`' description: type: string description: The coupon description. This will be displayed to the customers after the coupon validation. amount_in_cents: type: - integer - 'null' description: The amount in cents of the discount of the coupon. product_family_id: type: integer description: 'The ID of the product family to which the coupon belongs. The coupon can be added only to products in this product family. ' created_at: type: string description: The timestamp when the coupon was created. format: date-time updated_at: type: string description: The timestamp when the coupon was updated format: date-time start_date: type: string description: The start date of the coupon format: date-time end_date: type: - 'null' - string description: The expiration date of the coupon format: date-time percentage: type: - 'null' - string description: 'The discount percentage. Should be an integer between 1 and 100. You should set the percentage or the amount, but not both.' minimum: 1 maximum: 100 recurring: type: boolean description: 'If true, the discount will be applied at signup and every renewal (for the number of renewals given by duration_period_count). Otherwise, discount will be applied only at signup.' duration_period_count: type: - number - integer - 'null' description: Number of renewals the coupon is good for. Recurring should be set to true. Setting recurring to true and leaving this blank indicates that the coupon applies indefinitely. duration_interval: type: - 'null' - integer description: Integer used to measure the interval unit. duration_interval_unit: type: - 'null' - string description: Description of the number of days/months the coupon should be applied. allow_negative_balance: type: boolean description: 'Boolean. If true, credits will carry forward to next billing. Otherwise discount may not exceed total of the charges.' archived_at: type: - 'null' - string description: Timestamp indicating when this coupon was archived format: date-time conversion_limit: type: 'null' description: Number of times this coupon (or any of its codes) may be added to a subscription stackable: type: boolean description: If true coupon can be combined with other stackable coupons to produce a larger discount. If false coupon cannot be combined with other coupons. compounding_strategy: type: string description: '' enum: - compound - full-price coupon_restrictions: type: array items: type: object use_site_exchange_rate: type: boolean default: true description: Whether to use the site level exchange rate or to define your own pricing for a given currency if you have defined multiple currencies for the site. exclude_mid_period_allocations: type: boolean example: coupon: id: 67 name: Foo Bar code: YEPPER99934 description: my cool coupon amount_in_cents: 1500 product_family_id: 4 created_at: '2017-11-08T10:01:15-05:00' updated_at: '2017-11-08T10:01:15-05:00' start_date: '2017-11-08T10:01:15-05:00' end_date: null percentage: null duration_period_count: null duration_interval: null duration_interval_unit: null allow_negative_balance: false archived_at: null conversion_limit: null stackable: true compounding_strategy: compound coupon_restrictions: [] exclude_mid_period_allocations: true x-stoplight: id: coupons-create-coupon-output-flat-amount name: Create Coupon Output Flat Amount public: true subscription-create-hierarchy-request: title: Subscription Create Hierarchy Request type: object properties: subscription: type: object properties: product_handle: type: string customer_id: type: integer payment_profile_id: type: integer group: type: object properties: target: type: object properties: type: type: string id: type: integer billing: type: object properties: align_date: type: boolean prorate: type: boolean accrue: type: boolean example: subscription: product_handle: product-xyz customer_id: 17346006 payment_profile_id: 11991557 group: target: type: customer id: 17346006 billing: align_date: true prorate: true accrue: true x-stoplight: id: subscription-create-hierarchy-request name: Subscription Create Hierarchy Request public: true subscription-issue-credit-request: title: Subscription Issue Credit Request type: object properties: service_credit: type: object properties: amount: type: string example: service_credit: amount: '1' x-stoplight: id: subscription-issue-credit-request name: Subscription Issue Credit Request public: true subscription-add-group-request: title: Subscription Add Group Request type: object properties: group: type: object properties: target: type: object properties: type: type: string id: type: string billing: type: object properties: accrue: type: boolean align_date: type: boolean prorate: type: boolean example: group: target: type: subscription id: '32987' billing: accrue: true align_date: true prorate: true x-stoplight: id: subscription-add-group-request name: Subscription Add Group Request public: true subscription-add-group: title: Subscription Add Group Response type: object properties: subscription_group: type: object properties: customer_id: type: integer payment_profile: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string subscription_ids: type: array items: type: integer created_at: type: string example: subscription_group: customer_id: 130690 payment_profile: id: 32055 first_name: Marty last_name: McFly masked_card_number: XXXX-XXXX-XXXX-1111 subscription_ids: - 32988 - 33060 - 32986 created_at: '2018-08-30T17:14:30-04:00' x-stoplight: id: subscription-add-group name: Subscription Add Group Response public: true product-price-point-output: title: Product Price Point Output type: object properties: price_point: type: object properties: id: type: integer name: type: string handle: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string trial_type: type: string introductory_offer: type: boolean description: reserved for future use initial_charge_in_cents: type: integer initial_charge_after_trial: type: boolean expiration_interval: type: integer expiration_interval_unit: type: string product_id: type: integer archived_at: type: string created_at: type: string updated_at: type: string use_site_exchange_rate: type: boolean description: Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined. example: price_point: id: 283 name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected introductory_offer: false initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month product_id: 901 archived_at: 'Tue, 30 Oct 2018 18:49:47 EDT -04:00' created_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' updated_at: 'Tue, 23 Oct 2018 18:49:47 EDT -04:00' x-stoplight: id: product-price-point-output name: Product Price Point Output public: true product-price-point-input: title: Product Price Point Input type: object properties: price_point: type: object properties: name: type: string handle: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string trial_type: type: string introductory_offer: type: boolean description: reserved for future use initial_charge_in_cents: type: integer initial_charge_after_trial: type: boolean expiration_interval: type: integer expiration_interval_unit: type: string use_site_exchange_rate: type: boolean description: Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined. example: price_point: name: Educational handle: educational price_in_cents: 1000 interval: 1 interval_unit: month trial_price_in_cents: 4900 trial_interval: 1 trial_interval_unit: month trial_type: payment_expected introductory_offer: false initial_charge_in_cents: 120000 initial_charge_after_trial: false expiration_interval: 12 expiration_interval_unit: month x-stoplight: id: product-price-point-input name: Product Price Point Input public: true read-subscriptions-site-output: title: Read Subscriptions Site Output type: array items: type: object properties: subscription: type: object properties: id: type: integer state: type: string balance_in_cents: type: integer total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer current_period_ends_at: type: string next_assessment_at: type: string trial_started_at: type: 'null' trial_ended_at: type: 'null' activated_at: type: string expires_at: type: 'null' created_at: type: string updated_at: type: string cancellation_message: type: - 'null' - string cancellation_method: type: - 'null' - string cancel_at_end_of_period: type: - boolean - 'null' canceled_at: type: - 'null' - string current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: - 'null' - string payment_collection_method: type: string snap_day: type: 'null' customer: type: object properties: first_name: type: string last_name: type: string email: type: string cc_emails: type: - 'null' - string organization: type: string reference: type: 'null' id: type: integer created_at: type: string updated_at: type: string address: type: string address_2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string verified: type: boolean portal_customer_created_at: type: string portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' tax_exempt: type: boolean vat_number: type: string parent_id: type: - integer - 'null' product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' expiration_interval: type: 'null' expiration_interval_unit: type: string trial_price_in_cents: type: 'null' trial_interval: type: 'null' trial_interval_unit: type: string initial_charge_after_trial: type: boolean return_params: type: string request_credit_card: type: boolean require_credit_card: type: boolean created_at: type: string updated_at: type: string archived_at: type: 'null' update_return_url: type: string update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string handle: type: string accounting_code: type: 'null' description: type: string public_signup_pages: type: array items: type: object properties: id: type: integer url: type: string taxable: type: boolean version_number: type: integer credit_card: type: object properties: id: type: integer payment_type: type: string first_name: type: string last_name: type: string masked_card_number: type: - 'null' - string card_type: type: - 'null' - string expiration_month: type: - integer - 'null' expiration_year: type: - integer - 'null' billing_address: type: string billing_address_2: type: string billing_city: type: string billing_state: type: - 'null' - string billing_country: type: string billing_zip: type: string current_vault: type: string vault_token: type: string customer_vault_token: type: 'null' customer_id: type: integer payment_type: type: string referral_code: type: string next_product_id: type: 'null' coupon_use_count: type: - integer - 'null' coupon_uses_allowed: type: - integer - 'null' payer_id: type: integer stored_credential_transaction_id: type: - integer - 'null' next_product_handle: type: - string - 'null' currency: type: string scheduled_cancellation_at: type: - string - 'null' prepaid_dunning: type: boolean example: - subscription: id: 15236915 state: active balance_in_cents: 0 total_revenue_in_cents: 14000 product_price_in_cents: 1000 product_version_number: 7 current_period_ends_at: '2016-11-15T14:48:10-05:00' next_assessment_at: '2016-11-15T14:48:10-05:00' trial_started_at: null trial_ended_at: null activated_at: '2016-11-14T14:48:12-05:00' expires_at: null created_at: '2016-11-14T14:48:10-05:00' updated_at: '2016-11-14T15:24:41-05:00' cancellation_message: null cancellation_method: null cancel_at_end_of_period: null canceled_at: null current_period_started_at: '2016-11-14T14:48:10-05:00' previous_state: active signup_payment_id: 162269766 signup_revenue: '260.00' delayed_cancel_at: null coupon_code: 5SNN6HFK3GBH payment_collection_method: automatic snap_day: null customer: first_name: Curtis last_name: Test email: curtis@example.com cc_emails: null organization: '' reference: null id: 14714298 created_at: '2016-11-14T14:48:10-05:00' updated_at: '2016-11-14T14:48:13-05:00' address: 123 Anywhere Street address_2: '' city: Boulder state: CO zip: '80302' country: US phone: '' verified: false portal_customer_created_at: '2016-11-14T14:48:13-05:00' portal_invite_last_sent_at: '2016-11-14T14:48:13-05:00' portal_invite_last_accepted_at: null tax_exempt: false vat_number: 012345678 product: id: 3792003 name: $10 Basic Plan handle: basic description: lorem ipsum accounting_code: basic price_in_cents: 1000 interval: 1 interval_unit: day initial_charge_in_cents: null expiration_interval: null expiration_interval_unit: never trial_price_in_cents: null trial_interval: null trial_interval_unit: month initial_charge_after_trial: false return_params: '' request_credit_card: false require_credit_card: false created_at: '2016-03-24T13:38:39-04:00' updated_at: '2016-11-03T13:03:05-04:00' archived_at: null update_return_url: '' update_return_params: '' product_family: id: 527890 name: Acme Projects handle: billing-plans accounting_code: null description: '' public_signup_pages: - id: 281054 url: 'https://general-goods.chargify.com/subscribe/kqvmfrbgd89q/basic' - id: 281240 url: 'https://general-goods.chargify.com/subscribe/dkffht5dxfd8/basic' - id: 282694 url: 'https://general-goods.chargify.com/subscribe/jwffwgdd95s8/basic' taxable: false version_number: 7 credit_card: id: 10191713 payment_type: credit_card first_name: Curtis last_name: Test masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 1 expiration_year: 2026 billing_address: 123 Anywhere Street billing_address_2: '' billing_city: Boulder billing_state: null billing_country: '' billing_zip: '80302' current_vault: bogus vault_token: '1' customer_vault_token: null customer_id: 14714298 payment_type: credit_card referral_code: w7kjc9 next_product_id: null coupon_use_count: 1 coupon_uses_allowed: 1 payer_id: 14714298 stored_credential_transaction_id: 123466229455588 next_product_handle: null scheduled_cancellation_at: '2016-11-14T14:48:13-05:00' - subscription: id: 15189649 state: canceled balance_in_cents: 15000 total_revenue_in_cents: 10000 product_price_in_cents: 10000 product_version_number: 1 current_period_ends_at: '2017-11-10T13:14:00-05:00' next_assessment_at: '2017-11-10T13:14:00-05:00' trial_started_at: null trial_ended_at: null activated_at: '2016-11-10T13:14:02-05:00' expires_at: null created_at: '2016-11-10T13:14:00-05:00' updated_at: '2016-11-14T11:14:01-05:00' cancellation_message: '' cancellation_method: merchant_ui cancel_at_end_of_period: false canceled_at: '2016-11-14T11:14:01-05:00' current_period_started_at: '2016-11-10T13:14:00-05:00' previous_state: canceled signup_payment_id: 161794022 signup_revenue: '100.00' delayed_cancel_at: null coupon_code: null payment_collection_method: invoice snap_day: null customer: first_name: Frankie last_name: Bravo email: testfrankietest.com cc_emails: '' organization: '' reference: null id: 14543712 created_at: '2016-11-02T10:16:17-04:00' updated_at: '2016-11-14T09:54:39-05:00' address: '' address_2: '' city: '' state: '' zip: '' country: '' phone: '5555551212' verified: true portal_customer_created_at: '2016-11-02T10:16:19-04:00' portal_invite_last_sent_at: '2016-11-10T13:14:03-05:00' portal_invite_last_accepted_at: null product: id: 4038269 name: Annual Product handle: annual-product description: '' accounting_code: '' price_in_cents: 10000 interval: 12 interval_unit: month initial_charge_in_cents: null expiration_interval: null expiration_interval_unit: never trial_price_in_cents: null trial_interval: null trial_interval_unit: month initial_charge_after_trial: false return_params: '' request_credit_card: true require_credit_card: true created_at: '2016-09-28T09:54:05-04:00' updated_at: '2016-09-28T09:54:05-04:00' archived_at: null update_return_url: '' update_return_params: '' product_family: id: 527890 name: Acme Projects handle: billing-plans accounting_code: null description: '' public_signup_pages: - id: 297032 url: 'https://general-goods.chargify.com/subscribe/b3hjynp5ss52/annual-product' taxable: false version_number: 1 credit_card: id: 10188522 payment_type: credit_card first_name: Frank last_name: Test masked_card_number: null card_type: null expiration_month: null expiration_year: null billing_address: 123 Montana Way billing_address_2: '' billing_city: Boulder billing_state: CO billing_country: US billing_zip: '80302' current_vault: bogus vault_token: '123456789' customer_vault_token: null customer_id: 14543712 payment_type: bank_account referral_code: hspss6 next_product_id: null coupon_use_count: null coupon_uses_allowed: null payer_id: 14543712 stored_credential_transaction_id: 166115589229988 next_product_handle: null scheduled_cancellation_at: '2016-11-14T14:48:13-05:00' x-stoplight: id: read-subscriptions-site-output name: Read Subscriptions Site Output public: true credit-note: title: Credit Note type: object properties: uid: type: string description: Unique identifier for the credit note. It is generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters. site_id: type: integer description: ID of the site to which the credit note belongs. customer_id: type: integer description: ID of the customer to which the credit note belongs. subscription_id: type: integer description: ID of the subscription that generated the credit note. number: type: string description: |- A unique, identifying string that appears on the credit note and in places it is referenced. While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike. sequence_number: type: integer description: A monotonically increasing number assigned to credit notes as they are created. This number is unique within a site and can be used to sort and order credit notes. issue_date: type: string description: |- Date the credit note was issued to the customer. This is the date that the credit was made available for application, and may come before it is fully applied. The format is `"YYYY-MM-DD"`. applied_date: type: string description: |- Credit notes are applied to invoices to offset invoiced amounts - they reduce the amount due. This field is the date the credit note became fully applied to invoices. If the credit note has been partially applied, this field will not have a value until it has been fully applied. The format is `"YYYY-MM-DD"`. status: type: string description: | Current status of the credit note. Valid values: * open * applied currency: type: string description: The ISO 4217 currency code (3 character string) representing the currency of the credit note amount fields. memo: type: string description: 'The memo printed on credit note, which is a description of the reason for the credit.' seller: type: object description: Information about the seller (merchant) listed on the masthead of the credit note. properties: name: type: string address: type: object properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string phone: type: string customer: type: object description: Information about the customer who is owner or recipient the credited subscription. properties: chargify_id: type: integer first_name: type: string last_name: type: string organization: type: string email: type: string reference: type: 'null' billing_address: type: object description: The billing address of the credit subscription. properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string shipping_address: type: object description: The shipping address of the credited subscription. properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string subtotal_amount: type: string description: 'Subtotal of the credit note, which is the sum of all line items before discounts or taxes. Note that this is a positive amount representing the credit back to the customer.' discount_amount: type: string description: 'Total discount applied to the credit note. Note that this is a positive amount representing the discount amount being credited back to the customer (i.e. a credit on an earlier discount). For example, if the original purchase was $1.00 and the original discount was $0.10, a credit of $0.50 of the original purchase (half) would have a discount credit of $0.05 (also half).' tax_amount: type: string description: 'Total tax of the credit note. Note that this is a positive amount representing a previously taxex amount being credited back to the customer (i.e. a credit of an earlier tax). For example, if the original purchase was $1.00 and the original tax was $0.10, a credit of $0.50 of the original purchase (half) would also have a tax credit of $0.05 (also half).' total_amount: type: string description: 'The credit note total, which is `subtotal_amount - discount_amount + tax_amount`.''' applied_amount: type: string description: The amount of the credit note that has already been applied to invoices. remaining_amount: type: string description: 'The amount of the credit note remaining to be applied to invoices, which is `total_amount - applied_amount`.' line_items: type: array description: Line items on the credit note. items: type: object properties: uid: type: string description: Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. title: type: string description: A short descriptor for the credit given by this line. description: type: string description: |- Detailed description for the credit given by this line. May include proration details in plain text. Note: this string may contain line breaks that are hints for the best display format on the credit note. quantity: type: string description: |- The quantity or count of units credited by the line item. This is a decimal number represented as a string. (See "About Decimal Numbers".) unit_price: type: string description: |- The price per unit for the line item. When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. subtotal_amount: type: string description: 'The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount).' discount_amount: type: string description: |- The approximate discount of just this line. The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. tax_amount: type: string description: |- The approximate tax of just this line. The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. total_amount: type: string description: |- The non-canonical total amount for the line. `subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. tiered_unit_price: type: boolean description: 'When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units.' period_range_start: type: string description: Start date for the period credited by this line. The format is `"YYYY-MM-DD"`. period_range_end: type: string description: End date for the period credited by this line. The format is `"YYYY-MM-DD"`. product_id: type: integer description: |- The ID of the product being credited. This may be set even for component credits, so true product-only (non-component) credits will also have a nil `component_id`. product_version: type: integer description: The version of the product being credited. component_id: type: - integer - 'null' description: The ID of the component being credited. Will be `nil` for non-component credits. price_point_id: type: - integer - 'null' description: The price point ID of the component being credited. Will be `nil` for non-component credits. discounts: type: array items: type: object properties: uid: type: string title: type: string code: type: string source_type: type: string source_id: type: integer discount_type: type: string percentage: type: string eligible_amount: type: string discount_amount: type: string line_item_breakouts: type: array items: type: object properties: uid: type: string eligible_amount: type: string discount_amount: type: string taxes: type: array items: type: object properties: uid: type: string title: type: string source_type: type: string source_id: type: integer percentage: type: string taxable_amount: type: string tax_amount: type: string line_item_breakouts: type: array items: type: object properties: uid: type: string taxable_amount: type: string tax_amount: type: string applications: type: array items: type: object properties: uid: type: string transaction_time: type: string invoice_uid: type: string memo: type: string applied_amount: type: string refunds: type: array items: type: object properties: transaction_id: type: integer payment_id: type: integer memo: type: string original_amount: type: string applied_amount: type: string origin_invoices: type: array description: 'An array of origin invoices for the credit note. Learn more about [Origin Invoice from our docs](https://help.chargify.com/invoices/credit-notes.html#origin-invoices)' items: type: object properties: uid: type: string description: The UID of the invoice serving as an origin invoice. number: type: string description: The number of the invoice serving as an origin invoice. example: uid: cn_8m9vbd5kkv7kr site_id: 20 customer_id: 3 subscription_id: 2 number: '77' sequence_number: 78 issue_date: '2018-12-31' applied_date: '2018-12-31' status: applied currency: USD memo: Refund for overpayment seller: name: 'Acme, Inc.' address: street: 122 E Houston St line2: Suite 105 city: San Antonio state: TX zip: '78205' country: US phone: 555-555-1234 x137 customer: chargify_id: 3 first_name: Marty last_name: McFly organization: 'Time Travellers, Inc.' email: timetraveller1985@example.com reference: null billing_address: street: 200 Billing Rd. line2: Suite 100 city: Needham state: MA zip: 02494 country: US shipping_address: street: 100 Shipping St. line2: Apt 200 city: Pleasantville state: NC zip: '12345' country: US subtotal_amount: '208.69341779' discount_amount: '20.87125167' tax_amount: '12.67783387' total_amount: '200.5' applied_amount: '200.5' remaining_amount: '0.0' line_items: - uid: cnli_8k5jvdzct4h9x title: 'IP Addresses: 5 to 10 addresses' description: 38.2% credit quantity: '0.9855' unit_price: '2.0' subtotal_amount: '1.971004' discount_amount: '0.19862831' tax_amount: '0.11963536' total_amount: '1.89201105' tiered_unit_price: false period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 81 price_point_id: 165 - uid: cnli_8kjttvjcjx8b4 title: Professional Plan description: 38.2% credit quantity: '0.382' unit_price: '299.0' subtotal_amount: '114.21127834' discount_amount: '11.42112783' tax_amount: '6.93833516' total_amount: '109.72848567' tiered_unit_price: false period_range_start: '2018-12-30' period_range_end: '2018-12-30' product_id: 85 product_version: 1 component_id: null price_point_id: null - uid: cnli_8kjttvjknzhx7 title: Small Instance (Hourly) description: 38.2% credit quantity: '74.8676' unit_price: '0.12244898' subtotal_amount: '9.16746047' discount_amount: '0.91674605' tax_amount: '0.55692322' total_amount: '8.80763764' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 78 price_point_id: null - uid: cnli_8kjttvjnmh25w title: Large Instance (Hourly) description: 38.2% credit quantity: '183.3492' unit_price: '0.39583333' subtotal_amount: '72.57572871' discount_amount: '7.25757287' tax_amount: '4.40897552' total_amount: '69.72713136' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 79 price_point_id: null - uid: cnli_8kjttvjqn86kc title: Email Messages description: 38.2% credit quantity: '10076.9489' unit_price: '0.00031045' subtotal_amount: '3.12839588' discount_amount: '0.31322157' tax_amount: '0.19002427' total_amount: '3.00519858' tiered_unit_price: true period_range_start: '2018-11-30' period_range_end: '2018-11-30' product_id: 85 product_version: 1 component_id: 80 price_point_id: null - uid: cnli_8kjttvjtxxbdd title: IP Addresses description: 38.2% credit quantity: '3.8198' unit_price: '2.0' subtotal_amount: '7.63955039' discount_amount: '0.76395504' tax_amount: '0.46410269' total_amount: '7.33969804' tiered_unit_price: false period_range_start: '2018-12-30' period_range_end: '2018-12-30' product_id: 85 product_version: 1 component_id: 81 price_point_id: 165 discounts: - uid: cndli_8k5jvdzct4h9y title: Multi-service discount (10%) code: MULTI3 source_type: Coupon source_id: 40 discount_type: percentage percentage: '10.0' eligible_amount: '208.69341779' discount_amount: '20.87125167' line_item_breakouts: - uid: cnli_8k5jvdzct4h9x eligible_amount: '1.971004' discount_amount: '0.19862831' - uid: cnli_8kjttvjcjx8b4 eligible_amount: '114.21127834' discount_amount: '11.42112783' - uid: cnli_8kjttvjknzhx7 eligible_amount: '9.16746047' discount_amount: '0.91674605' - uid: cnli_8kjttvjnmh25w eligible_amount: '72.57572871' discount_amount: '7.25757287' - uid: cnli_8kjttvjqn86kc eligible_amount: '3.12839588' discount_amount: '0.31322157' - uid: cnli_8kjttvjtxxbdd eligible_amount: '7.63955039' discount_amount: '0.76395504' taxes: - uid: cntli_8k5jvdzct4h9z title: NC Sales Tax source_type: Tax source_id: 1 percentage: '6.75' taxable_amount: '187.82216613' tax_amount: '12.67783387' line_item_breakouts: - uid: cnli_8k5jvdzct4h9x taxable_amount: '1.77237569' tax_amount: '0.11963536' - uid: cnli_8kjttvjcjx8b4 taxable_amount: '102.7901505' tax_amount: '6.93833516' - uid: cnli_8kjttvjknzhx7 taxable_amount: '8.25071442' tax_amount: '0.55692322' - uid: cnli_8kjttvjnmh25w taxable_amount: '65.31815584' tax_amount: '4.40897552' - uid: cnli_8kjttvjqn86kc taxable_amount: '2.81517432' tax_amount: '0.19002427' - uid: cnli_8kjttvjtxxbdd taxable_amount: '6.87559535' tax_amount: '0.46410269' applications: - uid: cdt_8m9vbdbdwd28n transaction_time: '2018-12-31T21:19:28Z' invoice_uid: inv_8k5jvdzct4hb2 memo: Refund for overpayment applied_amount: '200.5' refunds: - transaction_id: 329 payment_id: 39 memo: Refund for overpayment original_amount: '524.9' applied_amount: '200.5' x-stoplight: id: credit-note name: Credit Note public: true create-bulk-payment-response: title: Create Bulk Payment Response type: object properties: paid_invoices: type: array items: type: object properties: invoice_uid: type: string description: The uid of the paid invoice status: type: string description: 'The status of the invoice (open, paid)' due_amount: type: string description: The remaining due amount on the invoice paid_amount: type: string description: The total amount paid on this invoice (including any prior payments) prepayment: type: object properties: subscription_id: type: string description: The subscription id for the prepayment account amount_in_cents: type: string description: The amount in cents of the prepayment that was created as a result of this payment. ending_balance_in_cents: type: string description: The total balance of the prepayment account for this subscription including any prior prepayments example: paid_invoices: - invoice_uid: xyz_012345678 status: paid due_amount: '0.0' paid_amount: '50.0' - invoice_uid: xyz_012345678 status: paid due_amount: '0.0' paid_amount: '50.0' prepayment: subscription_id: '123456' amount_in_cents: '5000' ending_balance_in_cents: '5000' x-stoplight: id: create-bulk-payment-response name: Create Bulk Payment Response public: true create-bulk-payment-request: title: Create Bulk Payment Request type: object properties: payment: type: object required: - amount - memo - payment_details - payment_method properties: amount: type: string description: The amount of the external payment (eg. "50.00" for $50.00) memo: type: string description: A description to be attached to the payment. payment_details: type: string description: Details about the payment itself (eg. Check Number) payment_method: type: string description: | The type of payment method used. Allowed Values: credit_card, check, cash, money_order, ach, paypal_account, other default: other required: - payment example: payment: amount: '10.0' memo: to pay the bills payment_details: check number 8675309 payment_method: check x-stoplight: id: create-bulk-payment-request name: Create Bulk Payment Request public: true subscription-offer-handle-request: title: Subscription Offer Handle Request type: object properties: subscription: type: object properties: offer_id: type: string customer_attributes: type: object properties: first_name: type: string last_name: type: string email: type: string credit_card_attributes: type: object properties: full_number: type: string expiration_month: type: string expiration_year: type: string example: subscription: offer_id: 'handle:godfather' customer_attributes: first_name: Alysa last_name: Test email: alysa@example.com credit_card_attributes: full_number: '1' expiration_month: '10' expiration_year: '2020' x-stoplight: id: subscription-offer-handle-request name: Subscription Offer Handle Request public: true subscription-offer-handle-response: title: Subscription Offer Handle Response type: object properties: subscription: type: object properties: id: type: integer state: type: string trial_started_at: type: string trial_ended_at: type: string activated_at: type: 'null' created_at: type: string updated_at: type: string expires_at: type: 'null' balance_in_cents: type: integer current_period_ends_at: type: string next_assessment_at: type: string canceled_at: type: 'null' cancellation_message: type: 'null' next_product_id: type: 'null' cancel_at_end_of_period: type: boolean payment_collection_method: type: string snap_day: type: 'null' cancellation_method: type: 'null' receives_invoice_emails: type: 'null' current_period_started_at: type: string previous_state: type: string signup_payment_id: type: integer signup_revenue: type: string delayed_cancel_at: type: 'null' coupon_code: type: 'null' total_revenue_in_cents: type: integer product_price_in_cents: type: integer product_version_number: type: integer payment_type: type: string referral_code: type: 'null' coupon_use_count: type: 'null' coupon_uses_allowed: type: 'null' reason_code: type: 'null' automatically_resume_at: type: 'null' coupon_codes: type: array items: type: object offer_id: type: integer customer: type: object properties: id: type: integer first_name: type: string last_name: type: string organization: type: 'null' email: type: string created_at: type: string updated_at: type: string reference: type: 'null' address: type: 'null' address_2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: 'null' portal_invite_last_sent_at: type: string portal_invite_last_accepted_at: type: 'null' verified: type: boolean portal_customer_created_at: type: string vat_number: type: 'null' cc_emails: type: 'null' tax_exempt: type: boolean product: type: object properties: id: type: integer name: type: string handle: type: string description: type: string accounting_code: type: string request_credit_card: type: boolean expiration_interval: type: 'null' expiration_interval_unit: type: string created_at: type: string updated_at: type: string price_in_cents: type: integer interval: type: integer interval_unit: type: string initial_charge_in_cents: type: 'null' trial_price_in_cents: type: integer trial_interval: type: integer trial_interval_unit: type: string archived_at: type: 'null' require_credit_card: type: boolean return_params: type: string taxable: type: boolean update_return_url: type: string tax_code: type: string initial_charge_after_trial: type: boolean version_number: type: integer update_return_params: type: string product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' public_signup_pages: type: array items: type: object properties: id: type: integer return_url: type: 'null' return_params: type: string url: type: string credit_card: type: object properties: id: type: integer first_name: type: string last_name: type: string masked_card_number: type: string card_type: type: string expiration_month: type: integer expiration_year: type: integer customer_id: type: integer current_vault: type: string vault_token: type: string billing_address: type: 'null' billing_city: type: 'null' billing_state: type: 'null' billing_zip: type: 'null' billing_country: type: 'null' customer_vault_token: type: 'null' billing_address_2: type: 'null' payment_type: type: string disabled: type: boolean payer_id: type: integer example: subscription: id: 25374928 state: trialing trial_started_at: '2019-01-25T09:31:38-05:00' trial_ended_at: '2019-01-26T09:31:38-05:00' activated_at: null created_at: '2019-01-25T09:31:38-05:00' updated_at: '2019-01-25T09:31:38-05:00' expires_at: null balance_in_cents: 0 current_period_ends_at: '2019-01-26T09:31:38-05:00' next_assessment_at: '2019-01-26T09:31:38-05:00' canceled_at: null cancellation_message: null next_product_id: null cancel_at_end_of_period: false payment_collection_method: automatic snap_day: null cancellation_method: null receives_invoice_emails: null current_period_started_at: '2019-01-25T09:31:38-05:00' previous_state: trialing signup_payment_id: 284261141 signup_revenue: '0.00' delayed_cancel_at: null coupon_code: null total_revenue_in_cents: 0 product_price_in_cents: 0 product_version_number: 1 payment_type: credit_card referral_code: null coupon_use_count: null coupon_uses_allowed: null reason_code: null automatically_resume_at: null coupon_codes: [] offer_id: 1086 customer: id: 25158862 first_name: Alysa last_name: Test organization: null email: alysa@example.com created_at: '2019-01-25T09:31:38-05:00' updated_at: '2019-01-25T09:31:39-05:00' reference: null address: null address_2: null city: null state: null zip: null country: null phone: null portal_invite_last_sent_at: '2019-01-25T09:31:39-05:00' portal_invite_last_accepted_at: null verified: false portal_customer_created_at: '2019-01-25T09:31:39-05:00' vat_number: null cc_emails: null tax_exempt: false product: id: 4468706 name: No Obligation Trial handle: testmonthly description: '' accounting_code: '' request_credit_card: true expiration_interval: null expiration_interval_unit: never created_at: '2017-03-17T12:59:24-04:00' updated_at: '2018-05-17T09:19:27-04:00' price_in_cents: 0 interval: 1 interval_unit: day initial_charge_in_cents: null trial_price_in_cents: 0 trial_interval: 1 trial_interval_unit: day archived_at: null require_credit_card: false return_params: '' taxable: false update_return_url: '' tax_code: '' initial_charge_after_trial: false version_number: 1 update_return_params: '' product_family: id: 994344 name: FREE TRIAL description: '' handle: general-goods-billing-plans accounting_code: null public_signup_pages: - id: 315945 return_url: null return_params: '' url: 'https://trial-period.chargifypay.com/subscribe/x532dvt3vjrx/testmonthly' credit_card: id: 17778534 first_name: Alysa last_name: Test masked_card_number: XXXX-XXXX-XXXX-1 card_type: bogus expiration_month: 10 expiration_year: 2020 customer_id: 25158862 current_vault: bogus vault_token: '1' billing_address: null billing_city: null billing_state: null billing_zip: null billing_country: null customer_vault_token: null billing_address_2: null payment_type: credit_card disabled: false payer_id: 25158862 x-stoplight: id: subscription-offer-handle-response name: Subscription Offer Handle Response public: true product-families-read-product-families-for-a-site: title: Read Product Families For a Site type: object properties: product_family: type: object properties: id: type: integer name: type: string description: type: string handle: type: string accounting_code: type: 'null' example: product_family: id: 527890 name: Acme Projects description: '' handle: billing-plans accounting_code: null x-stoplight: id: product-families-read-product-families-for-a-site name: Read Product Families For a Site public: true endpoint-create-update-an-endpoint: title: Endpoint Create/Update Request POST type: object properties: endpoint: type: object properties: url: type: string format: uri webook_subscriptions: type: array uniqueItems: true items: type: string required: - url x-stoplight: id: endpoint-create-update-an-endpoint name: Endpoint Create/Update Request POST public: true product-price-point-currency-price: title: Product Price Point Currency Price type: object properties: id: type: integer currency: type: string price: type: integer formatted_price: type: string product_price_point_id: type: integer role: type: string enum: - baseline - trial - initial required: - id - currency - price - formatted_price - product_price_point_id - role example: id: 200 currency: EUR price: 99 formatted_price: '€99,00' product_price_point_id: 100 role: baseline x-stoplight: id: product-price-point-currency-price name: Product Price Point Currency Price public: true price-point-currency-price: title: Price Point Currency Price type: object properties: id: type: integer currency: type: string price: type: integer formatted_price: type: string price_id: type: integer price_point_id: type: integer required: - id - currency - price - formatted_price - price_id - price_point_id example: id: 100 currency: EUR price: 10 formatted_price: '€10,00' price_id: 50 price_point_id: 20 x-stoplight: id: price-point-currency-price name: Price Point Currency Price public: true coupon-currency-price: title: Coupon Currency Price type: object properties: id: type: integer currency: type: string price: type: integer coupon_id: type: integer required: - id - currency - price - coupon_id example: id: 101 currency: EUR price: 10 coupon_id: 51 x-stoplight: id: coupon-currency-price name: Coupon Currency Price public: true service-credit: title: Service Credit type: object properties: id: type: integer amount_in_cents: type: integer description: The amount in cents of the entry ending_balance_in_cents: type: integer description: The new balance for the credit account entry_type: type: string description: 'The type of entry: "Credit" or "Debit"' enum: - Credit - Debit memo: type: string description: The memo attached to the entry x-stoplight: id: service-credit name: Service Credit public: true service-credit-post: title: Service Credit (POST) type: object properties: amount: type: number minimum: 0 memo: type: string required: - amount - memo x-stoplight: id: service-credit-post name: Service Credit (POST) public: true subscription-group: title: Subscription Group type: object properties: uid: type: string scheme: type: integer customer_id: type: integer payment_profile_id: type: integer subscription_ids: type: array items: type: integer primary_subscription_id: type: integer next_assessment_at: type: string state: type: string cancel_at_end_of_period: type: boolean example: uid: grp_952mvqcnk53wq scheme: 1 customer_id: 88498000 payment_profile_id: 93063018 subscription_ids: - 42768907 - 82370782 primary_subscription_id: 69844395 next_assessment_at: 'Sun, 09 Aug 2020 15:59:06 EDT -04:00' state: active cancel_at_end_of_period: true x-stoplight: id: subscription-group name: Subscription Group public: true invoice-account-entry: title: Invoice Account Entry type: object properties: id: type: integer amount_in_cents: type: integer description: The amount in cents of the entry. ending_balance_in_cents: type: integer description: The ending balance in cents of the account. entry_type: type: string enum: - Credit - Debit description: 'The type of account entry, either "Credit" or "Debit".' memo: type: string description: A memo attached to the entry. x-stoplight: id: invoice-account-entry name: Invoice Account Entry public: true subscription-group-prepayment: title: Subscription Group Prepayment type: object properties: prepayment: type: object required: - amount - details - memo - method properties: amount: type: integer minimum: 1 details: type: string memo: type: string method: type: string enum: - check - cash - money_order - ach - paypal_account - other required: - prepayment x-stoplight: id: subscription-group-prepayment name: Subscription Group Prepayment public: true subscription-create-prepaid-request: title: Subscription Create Prepaid Request type: object properties: subscription: type: object properties: product_handle: type: string customer_id: type: integer payment_profile_id: type: integer payment_collection_method: type: string prepaid_subscription_configuration: $ref: '#/definitions/prepaid-subscription-configuration' example: subscription: product_handle: server-professional customer_id: 17 payment_profile_id: 12 payment_collection_method: prepaid prepaid_subscription_configuration: initial_funding_amount_in_cents: 50000 replenish_to_amount_in_cents: 50000 auto_replenish: true replenish_threshold_amount_in_cents: 10000 x-stoplight: id: subscription-create-prepaid-request name: Subscription Create Prepaid Request public: true prepaid-subscription-configuration: title: Prepaid Subscription Configuration type: object properties: initial_funding_amount_in_cents: type: integer replenish_to_amount_in_cents: type: integer auto_replenish: type: boolean replenish_threshold_amount_in_cents: type: integer example: initial_funding_amount_in_cents: 50000 replenish_to_amount_in_cents: 50000 auto_replenish: false replenish_threshold_amount_in_cents: 10000 x-stoplight: id: prepaid-subscription-configuration name: Prepaid Subscription Configuration public: true preview-migration-input: title: Preview Migration Input type: object properties: migration: type: object properties: product_id: type: integer product_price_point_id: type: integer include_trial: type: boolean description: 'Whether to include the trial period configured for the product price point when starting a new billing period. Note that if preserve_period is set, then include_trial will be ignored.' include_initial_charge: type: boolean include_coupons: type: boolean preserve_period: type: boolean proration_date: type: string description: The data that the proration is calculated from for the preview. format: date-time example: migration: product_id: 3801242 product_price_point_id: 56012 include_trial: false include_initial_charge: false include_coupons: true preserve_period: true x-stoplight: id: preview-migration-input name: Preview Migration Input public: true proforma-invoice-response: title: Proforma invoice response type: object properties: uid: type: string site_id: type: integer customer_id: type: integer subscription_id: type: integer number: type: integer sequence_number: type: integer created_at: type: string delivery_date: type: string status: type: string collection_method: type: string payment_instructions: type: string currency: type: string consolidation_level: type: string product_name: type: string product_family_name: type: string role: type: string seller: type: object properties: name: type: string address: type: object properties: street: type: 'null' line2: type: 'null' city: type: 'null' state: type: 'null' zip: type: 'null' country: type: 'null' phone: type: string customer: type: object properties: chargify_id: type: integer first_name: type: string last_name: type: string organization: type: string email: type: string vat_number: type: 'null' reference: type: 'null' memo: type: string billing_address: type: object properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string shipping_address: type: object properties: street: type: string line2: type: string city: type: string state: type: string zip: type: string country: type: string subtotal_amount: type: string discount_amount: type: string tax_amount: type: string total_amount: type: string credit_amount: type: string paid_amount: type: string refund_amount: type: string due_amount: type: string line_items: type: array items: type: object properties: uid: type: string title: type: string description: type: string quantity: type: string unit_price: type: string subtotal_amount: type: string discount_amount: type: string tax_amount: type: string total_amount: type: string tiered_unit_price: type: boolean period_range_start: type: string period_range_end: type: string product_id: type: integer product_version: type: integer product_price_point_id: type: integer component_id: type: 'null' price_point_id: type: 'null' discounts: type: array items: type: object taxes: type: array items: type: object credits: type: array items: type: object payments: type: array items: type: object custom_fields: type: array items: type: object public_url: type: string example: uid: pro_9c736grnp3c8k site_id: 24 customer_id: 17 subscription_id: 22 number: 18 sequence_number: 18 created_at: '2021-03-16T15:43:56-04:00' delivery_date: '2021-04-16' status: draft collection_method: automatic payment_instructions: 'Please make checks payable to "Acme, Inc."' currency: USD consolidation_level: none product_name: Professional Plan product_family_name: Cloud Compute Servers role: proforma seller: name: 'Acme, Inc.' address: street: null line2: null city: null state: null zip: null country: null phone: 555-555-1234 x137 customer: chargify_id: 17 first_name: Elda last_name: Boehm organization: Roob Inc email: Anais79@example.net vat_number: null reference: null memo: 'Thanks for your business! If you have any questions, please contact your account manager.' billing_address: street: 7855 Predovic Common line2: Suite 905 city: Lake Velvaburgh state: DE zip: '90126' country: US shipping_address: street: 625 Helena Forks line2: Apt. 135 city: Lake Oscar state: UT zip: 86758-4117 country: US subtotal_amount: '299.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '299.0' credit_amount: '0.0' paid_amount: '0.0' refund_amount: '0.0' due_amount: '299.0' line_items: - uid: li_9c736grk94k8p title: Professional Plan description: 04/16/2021 - 05/16/2021 quantity: '1.0' unit_price: '299.0' subtotal_amount: '299.0' discount_amount: '0.0' tax_amount: '0.0' total_amount: '0.0' tiered_unit_price: false period_range_start: '2021-04-16' period_range_end: '2021-05-16' product_id: 135 product_version: 1 product_price_point_id: 135 component_id: null price_point_id: null discounts: [] taxes: [] credits: [] payments: [] custom_fields: [] public_url: 'https://www.chargifypay.com/proforma/pro_9c736grnp3c8k?token=9bg6bfz84ss4gqjbphjtzjxv' x-stoplight: id: proforma-invoice-response name: Proforma invoice response public: true customer: title: Customer type: object properties: first_name: type: string description: The first name of the customer last_name: type: string description: The last name of the customer email: type: string description: The email address of the customer cc_emails: type: - string - 'null' description: '(Optional) A comma-separated list of emails that should be cc’d on all customer communications (i.e. “joe@example.com, sue@example.com”)' organization: type: - string - 'null' description: The organization of the customer reference: type: - string - 'null' description: The unique identifier used within your own application for this customer id: type: integer description: The customer ID in Chargify created_at: type: string description: The timestamp in which the customer object was created in Chargify updated_at: type: string description: The timestamp in which the customer object was last edited address: type: - string - 'null' description: The customer’s shipping street address (i.e. “123 Main St.”) address_2: type: - string - 'null' description: Second line of the customer’s shipping address i.e. “Apt. 100” city: type: - string - 'null' description: The customer’s shipping address city (i.e. “Boston”) state: type: - string - 'null' description: The customer’s shipping address state (i.e. “MA”) state_name: type: - string - 'null' description: The customer's full name of state zip: type: - string - 'null' description: The customer’s shipping address zip code (i.e. “12345”) country: type: - string - 'null' description: "\tThe customer shipping address country" country_name: type: - string - 'null' description: The customer's full name of country phone: type: - string - 'null' description: The phone number of the customer verified: type: boolean description: Is the customer verified to use ACH as a payment method. Available only on Authorize.Net gateway portal_customer_created_at: type: - string - 'null' description: The timestamp of when the Billing Portal entry was created at for the customer portal_invite_last_sent_at: type: - string - 'null' description: The timestamp of when the Billing Portal invite was last sent at portal_invite_last_accepted_at: description: The timestamp of when the Billing Portal invite was last accepted type: - string - 'null' tax_exempt: type: boolean description: (Optional) The tax exempt status for the customer. Acceptable values are true or 1 for true and false or 0 for false. vat_number: type: - string - 'null' description: '(Optional) The VAT business identification number for the customer. This number is used to determine VAT tax opt out rules. It is not validated when added or updated on a customer record. Instead, it is validated via VIES before calculating taxes. Only valid business identification numbers will allow for VAT opt out.' parent_id: description: (Optional) The parent ID in Chargify if applicable. Parent is another Customer object. type: - integer - 'null' locale: type: string description: The locale for the customer to identify language-region metafields: type: object description: pairs of metafield names and values example: customer: first_name: Cathryn last_name: Parisian email: Stella.McLaughlin6@example.net cc_emails: null organization: Greenholt - Oberbrunner reference: null id: 76 created_at: '2021-03-29T07:47:00-04:00' updated_at: '2021-03-29T07:47:00-04:00' address: 739 Stephon Bypass address_2: Apt. 386 city: Sedrickchester state: KY state_name: Kentucky zip: 46979-7719 country: US country_name: United States phone: 230-934-3685 verified: false portal_customer_created_at: null portal_invite_last_sent_at: null portal_invite_last_accepted_at: null tax_exempt: false vat_number: null parent_id: null locale: en-US x-stoplight: id: customer name: Customer public: true component: title: Component type: object properties: component: type: object properties: id: type: integer description: The unique ID assigned to the component by Chargify. This ID can be used to fetch the component from the API. name: type: string description: 'The name of the Component, suitable for display on statements. i.e. Text Messages.' pricing_scheme: type: string description: 'The handle for the pricing scheme. Available options: per_unit, volume, tiered, stairstep. See [Price Bracket Rules](https://help.chargify.com/products/product-components.html#price-bracket-rules) for an overview of pricing schemes.' unit_name: type: string description: The name of the unit that the component’s usage is measured in. i.e. message unit_price: type: string description: 'The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null.' product_family_id: type: integer description: The id of the Product Family to which the Component belongs price_per_unit_in_cents: type: 'null' description: deprecated - use unit_price instead kind: type: string description: A handle for the component type enum: - metered_component - quantity_based_component - on_off_component - prepaid_usage_component archived: type: boolean description: Boolean flag describing whether a component is archived or not. taxable: type: boolean description: Boolean flag describing whether a component is taxable or not. description: type: string description: The description of the component. default_price_point_id: type: integer price_point_count: type: integer description: Count for the number of of amount of price points associated with the the component price_points_url: type: string description: URL that points to the location to read the existing price points via GET request tax_code: type: string description: A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. recurring: type: boolean upgrade_charge: type: - 'null' - string downgrade_credit: type: - 'null' - string created_at: type: string prices: type: - 'null' - array description: 'An array of price brackets. If the component uses the ‘per_unit’ pricing scheme, this array will be empty.' items: type: object properties: id: type: integer component_id: type: integer starting_quantity: type: integer ending_quantity: type: 'null' unit_price: type: string price_point_id: type: integer formatted_unit_price: type: string default_price_point_name: type: string product_family_name: type: string hide_date_range_on_invoice: type: boolean description: (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. x-stoplight: id: component name: Component public: true overage-pricing: title: Overage Pricing type: object description: only for prepaid usage components properties: pricing_scheme: type: string prices: type: array items: type: object properties: starting_quantity: type: integer ending_quantity: type: integer unit_price: type: number x-stoplight: id: overage-pricing name: Overage Pricing public: true metadata: title: Metadata type: object properties: value: type: string resource_id: type: integer name: type: string id: type: integer x-stoplight: id: metadata name: Metadata public: true metafield: title: Metafield type: object properties: name: type: string scope: type: object properties: hosted: type: array items: type: object csv: type: string statements: type: string invoices: type: string portal: type: string data_count: type: integer description: |+ the amount of subscriptions this metafield has been applied to in Chargify input_type: type: string enum: type: 'null' x-stoplight: id: metafield name: Metafield public: true legacy-invoice: title: Legacy Invoice type: object properties: id: type: integer description: The invoice unique id within Chargify subscription_id: type: integer description: The subscription unique id within Chargify statement_id: type: integer description: The statement unique id within Chargify site_id: type: integer description: The site unique id within Chargify state: type: string description: "\tThe current state of the invoice." enum: - paid - unpaid - partial - archived total_amount_in_cents: type: integer description: Gives the current invoice amount in the number of cents (ie. the sum of charges) paid_at: type: - string - 'null' description: The date/time when the invoice was paid in full created_at: type: string description: "\tThe creation date/time for this invoice" updated_at: type: string description: The date/time of last update for this invoice amount_due_in_cents: type: integer description: Gives the current outstanding invoice balance in the number of cents number: type: string description: The unique (to this site) identifier for this invoice charges: type: array description: A list of charges applied to this invoice items: type: object properties: created_at: type: string subscription_id: type: integer type: type: string memo: type: string kind: type: string amount_in_cents: type: integer ending_balance_in_cents: type: integer success: type: boolean id: type: integer payment_id: type: - integer - 'null' product_id: type: integer transaction_type: type: string gateway_transaction_id: type: 'null' gateway_order_id: type: 'null' starting_balance_in_cents: type: integer component_id: type: 'null' tax_id: type: 'null' customer_id: type: integer payments_and_credits: type: array description: A list of the financial transactions that modify the amount due items: type: object properties: created_at: type: string subscription_id: type: integer type: type: string memo: type: string kind: type: string amount_in_cents: type: integer ending_balance_in_cents: type: integer success: type: boolean id: type: integer payment_id: type: - 'null' - integer product_id: type: integer transaction_type: type: string gateway_transaction_id: type: string gateway_order_id: type: 'null' starting_balance_in_cents: type: integer component_id: type: 'null' tax_id: type: 'null' customer_id: type: integer card_number: type: - string - 'null' card_expiration: type: - string - 'null' card_type: type: - string - 'null' line_items: type: array items: type: object properties: created_at: type: string subscription_id: type: integer type: type: string memo: type: string kind: type: string amount_in_cents: type: integer ending_balance_in_cents: type: integer success: type: boolean id: type: integer payment_id: type: - 'null' - integer product_id: type: integer transaction_type: type: string gateway_transaction_id: type: - integer - 'null' gateway_order_id: type: - number - 'null' starting_balance_in_cents: type: integer component_id: type: integer tax_id: type: - 'null' - integer customer_id: type: integer x-stoplight: id: legacy-invoice name: Legacy Invoice public: true chargify-js-key: title: Chargify Js Key type: object properties: public_key: type: string requires_security_token: type: boolean created_at: type: string example: public_key: chjs_ftrxt7c4fv6f74wchjs_5zyn7gnwv requires_security_token: false created_at: '2021-01-01T05:00:00-04:00' x-stoplight: id: chargify-js-key name: Chargify Js Key public: true basePath: '%3C%3Csubdomain%3E%3E.chargify.com/' x-stoplight: beforeScript: '' afterScript: '' version: groups: docs: - divider: false items: - _id: legacy-invoice type: schemas - _id: event-count type: schemas - _id: event type: schemas - _id: customer-subscriptions type: schemas - _id: metadata type: schemas - _id: paginated-metadata type: schemas - _id: create-metadata type: schemas - _id: update-metadata type: schemas - _id: update-metafields type: schemas - _id: metafield type: schemas - _id: paginated-metafields type: schemas - _id: create-metafields type: schemas - _id: coupon-currency-price type: schemas - _id: coupons-create-coupon-output-percentage type: schemas - _id: coupons-list-coupons-for-a-site-output type: schemas - _id: coupons-create-coupon-output-flat-amount type: schemas - _id: coupon-subcodes-create-a-coupon-subcode type: schemas - _id: coupons-subcodes-create-a-coupon-subcode-output type: schemas - _id: coupons-coupon-usage-output type: schemas - _id: coupons-create-coupon-input-flat-amount type: schemas - _id: coupons-subcodes-retrieve-coupon-subcodes-output type: schemas - _id: coupons-create-coupon-input-percentage type: schemas - _id: components-onoff-create-subscription-with-onoff-component type: schemas - _id: components-price-points-bulk-update-a-subscriptions-components-price-points type: schemas - _id: create-usage type: schemas - _id: usage type: schemas - _id: components-price-points-bulk-reset-a-subscriptions-components-price-points type: schemas - _id: components-metered-create-usage-when-creating-a-new-subscription-input type: schemas - _id: components-price-points-update-price-point-request type: schemas - _id: components-price-points-create-price-point-response type: schemas - _id: components-price-points-list-price-points-response type: schemas - _id: components-price-points-bulk-create-price-points-request type: schemas - _id: price-point-currency-price type: schemas - _id: overage-pricing type: schemas - _id: list-subscriptions-components type: schemas - _id: subscriptions-component type: schemas - _id: create-component type: schemas - _id: component type: schemas - _id: enable-billing-portal-response type: schemas - _id: create-allocations-request type: schemas - _id: allocation-response type: schemas - _id: create-allocation-request type: schemas - _id: adjustment-response type: schemas - _id: create-adjustment-request type: schemas - _id: customer type: schemas - _id: chargify-js-key type: schemas name: Models - divider: false items: - _id: eventsQueryString type: traits - _id: legacyFilters type: traits - _id: filterByEventName type: traits - _id: sinceId type: traits - _id: eventsBasicFilters type: traits - _id: customerQueryString type: traits - _id: searchString type: traits - _id: direction type: traits - _id: metadataValue type: traits - _id: metadataQueryString type: traits - _id: metafieldsNameRequired type: traits - _id: metafieldsNameRequiredCurrentNameOptional type: traits - _id: metafieldsNameOptional type: traits - _id: metafieldResource type: traits - _id: couponQueryString type: traits - _id: componentParameters type: traits - _id: pathParameters type: traits - _id: pagination10 type: traits - _id: pagination20 type: traits - _id: pagination30 type: traits - _id: pagination50 type: traits - _id: componentQueryString type: traits - _id: includesArchive type: traits - _id: autoInvite type: traits - _id: productFamilyQueryString type: traits name: Traits - items: - _id: introduction type: docTextSections - _id: overview type: docTextSections - _id: api-access-limitations type: docTextSections - _id: secure-applications type: docTextSections - type: docTextSections _id: guidelines - _id: authentication type: docTextSections - _id: duplicate-prevention type: docTextSections - _id: api-code-samples-and-libraries-1 type: docTextSections name: Basics - name: Adjustments items: - _id: POST_subscriptions-subscriptionid-adjustmentsjson type: endpoints - name: Billing Portal items: - _id: POST_portal-customers-customerid-enablejson type: endpoints - _id: GET_portal-customers-customer_id-management_link-format type: endpoints - _id: POST_portal-customers-customerid-invitations-invitejson type: endpoints - _id: DELETE_portal-customers-customerid-invitations-revokejson type: endpoints divider: false - name: Components items: - _id: POST_productfamilies-productfamilyid-pluralkindjson type: endpoints - _id: GET_components-lookupjson type: endpoints - _id: GET_productfamilies-productfamilyid-components-componentidjson type: endpoints - _id: components-price-points-create-price-point-request type: schemas - _id: GET_productfamilies-productfamilyid-components-handlecomponenthandlejson type: endpoints - _id: GET_componentsjson type: endpoints - _id: GET_productfamilies-productfamilyid-componentsjson type: endpoints - _id: DELETE_productfamilies-productfamilyid-components-componentidjson type: endpoints - _id: POST_components-componentid-pricepointsjson type: endpoints - _id: PUT_components-componentid-pricepoints-pricepointid-defaultjson type: endpoints - _id: POST_components-componentid-pricepoints-bulkjson type: endpoints - _id: GET_components-componentid-pricepointsjson type: endpoints - _id: PUT_components-componentid-pricepoints-pricepointidjson type: endpoints - _id: DELETE_components-componentid-pricepoints-pricepointidformat type: endpoints - _id: PUT_components-componentid-pricepoints-pricepointid-unarchivejson type: endpoints - _id: PUT_pricepoints-pricepointid-currencypricesjson type: endpoints - _id: POST_pricepoints-pricepointid-currencypricesjson type: endpoints - _id: jBKHPRAxhMnkwo9op type: schemas - _id: LgCX5xn4mJDKzZuYH type: schemas - _id: PuPuYQeg7oWX4XPxC type: schemas - _id: Fo9jc3GFgdCvLN9Aw type: schemas - divider: false items: - _id: GET_subscriptions-subscriptionid-components-componentidjson type: endpoints - _id: GET_subscriptions-subscription_id-components-format type: endpoints - _id: POST_subscriptions-subscriptionid-pricepointsjson type: endpoints - _id: POST_subscriptions-subscriptionid-pricepoints-resetjson type: endpoints - _id: POST_subscriptions-sub_id-components-comp_id-allocations-format type: endpoints - _id: POST_subscriptions-subscriptionid-allocationsjson type: endpoints - _id: POST-preview-allocation type: endpoints - _id: GET_subscriptions-sub_id-components-comp_id-allocations-format type: endpoints - _id: PUT_subscriptions-subscriptionid-components-componentid-allocations-allocationidjson type: endpoints - _id: DELETE_subscriptions-subscriptionid-components-componentid-allocations-allocationidjson type: endpoints - _id: POST_subscriptions-subscriptionid-components-componentid-usagesjson type: endpoints - _id: GET_subscriptions-subscriptionid-components-componentid-usagesjson type: endpoints - _id: POST_eventbasedbilling-subscriptions-subscriptionid-components-componentid-activatejson type: endpoints - _id: POST_eventbasedbilling-subscriptions-subscriptionid-components-componentid-deactivatejson type: endpoints - _id: POST_subscriptionsjson type: endpoints - _id: POST_subscriptionsjson type: endpoints name: Subscriptions Components - divider: false items: - _id: GET_chargifyjskeysjson type: endpoints name: Chargify Js - divider: false items: - _id: POST_coupons-format type: endpoints - _id: GET_coupons-findjson type: endpoints - _id: GET_coupons-coupon_id-format type: endpoints - _id: GET_coupons-format type: endpoints - _id: GET_productfamilies-productfamilyid-couponsjson type: endpoints - _id: GET_productfamilies-productfamilyid-coupons-couponid-usagejson type: endpoints - _id: PUT_coupons-coupon_id-format type: endpoints - _id: GET_coupons-validate-format type: endpoints - _id: PUT_coupon-couponid-currencypricesjson type: endpoints - _id: DELETE_coupons-coupon_id-format type: endpoints - _id: POST_coupons-couponid-codesjson type: endpoints - _id: GET_coupons-couponid-codesjson type: endpoints - _id: PUT_coupons-coupon_id-codes-format type: endpoints - _id: DELETE_coupons-coupon_id-codes-subcode-format type: endpoints name: Coupons - items: - _id: POST_resourcetype-metafieldsjson type: endpoints - _id: GET_resourcetype-metafieldsjson type: endpoints - _id: PUT_resourcetype-metafieldsjson type: endpoints - _id: DELETE_resourcetype-metafieldsjson type: endpoints - _id: fRwCSab7Gcsav2eJ7 type: endpoints - _id: L9579TJipLNhyLkNE type: endpoints - _id: z8c7tmcr4pFykonLS type: endpoints - _id: Cq9C7Ty8EeDDyJLY3 type: endpoints - _id: 83HL2i6L5knstcdoM type: endpoints - _id: y8iW4wHKhe3wRZEQc type: schemas - _id: POST_resourcetype-resourceid-metadatajson type: endpoints - _id: GET_resourcetype-metadatajson type: endpoints - _id: GET_resourcetype-resourceid-metadatajson type: endpoints - _id: iiKwbwofXKscujz3r type: schemas - _id: yedAoRMah82wSpFpm type: schemas - _id: PUT_resourcetype-resourceid-metadatajson type: endpoints - _id: DELETE_resourcetype-resourceid-metadatajson type: endpoints - _id: QnAGrv9N5DEqEcoMK type: schemas - _id: BpAC96qBPBbuKar7A type: schemas name: Custom Fields divider: false - name: Customers items: - _id: POST_customers-format type: endpoints - _id: GET_customers-id-format type: endpoints - _id: GET_customers-lookupjson type: endpoints - _id: GET_customersjson type: endpoints - _id: GET_customersjson type: endpoints - _id: PUT_customers-id-format type: endpoints - _id: DELETE_customers-id-format type: endpoints - _id: GET_customers-customer_id-subscriptions-format type: endpoints - _id: 3axzGNKhbnnkfYbLH type: schemas - name: Events items: - _id: list-events type: endpoints - _id: list-events type: endpoints - _id: GET_events_count-format type: endpoints divider: false - divider: false items: - _id: FZnASRA8xKRLFPstz type: docTextSections - _id: POST_subdomain-events-apihandlejson type: endpoints - _id: POST_subdomain-events-apihandle-bulkjson type: endpoints name: Events-Based Billing - name: Invoices (Legacy) items: - _id: JYyHXetBrWb9vjMJF type: docTextSections - _id: GET_list-invoices-by-subscription type: endpoints - _id: 5oZMvPPTKZdpPSo5L type: schemas - _id: GET_invoices-invoice_id-format type: endpoints - _id: J5WrcjLoegaadHQuJ type: schemas - _id: L9m2hddc268DLZcjX type: endpoints - _id: ihiubtrRQAft9YGNE type: endpoints - _id: ra4jbabWnyLtMnEoA type: schemas - type: traits _id: startdateEnddateQuery - type: traits _id: invoiceStatusQuery - _id: stateStatusQuery type: traits - _id: subscriptionIdQuery type: traits - _id: POST_invoices-invoiceid-paymentsjson type: endpoints - _id: create-external-payment type: schemas - _id: payment type: schemas - _id: POST_invoices-invoiceid-chargesjson type: endpoints - _id: create-charge-for-legacy-invoice type: schemas - _id: charge type: schemas - _id: POST_invoices-invoiceid-adjustmentsjson type: endpoints - _id: create-credit-for-legacy-invoice type: schemas - _id: credit type: schemas divider: false - divider: false items: - _id: relationship-invoicing-intro type: docTextSections - _id: GET_invoicesjson type: endpoints - _id: read-all-invoices type: schemas - _id: GET_invoices-uidjson type: endpoints - _id: invoice-new type: schemas - _id: POST_invoices-uid-refundsjson type: endpoints - _id: POST_invoices-uid-refundsjson type: endpoints - _id: GET_invoices-eventsjson type: endpoints - _id: read-invoice-events-response type: schemas - _id: relationshipInvoicingTraits type: traits - _id: POST_invoices-uid-paymentsjson type: endpoints - _id: GET_creditnotesjson type: endpoints - _id: credit-note type: schemas - _id: GET_creditnotes-uidjson type: endpoints - _id: POST_subscriptions-subscriptionid-paymentsjson type: endpoints - _id: create-bulk-payment-request type: schemas - _id: create-bulk-payment-response type: schemas - _id: POST_invoices-uid-reopenjson type: endpoints - _id: POST_invoices-uid-voidjson type: endpoints - _id: GET_subscriptions-subscriptionid-accountbalancesjson type: endpoints - _id: GET_invoices-invoiceuid-segmentsjson type: endpoints - _id: POST_invoices-uid-deliveriesjson type: endpoints - _id: POST_invoices-uid-customerinformation-previewjson type: endpoints - _id: PUT_invoices-uid-customerinformationjson type: endpoints name: Relationship Invoicing - divider: false items: - _id: mrr-overview type: docTextSections - _id: GET_mrrjson type: endpoints - _id: GET_mrrmovementsjson type: endpoints name: MRR - name: Notes items: - _id: introduction-to-notes type: docTextSections - _id: POST_subscriptions-subscription_id-notes-format type: endpoints - _id: notes-create-note-input type: schemas - _id: notes-create-note-output type: schemas - _id: GET_subscriptions-subscriptionid-notes-noteidjson type: endpoints - _id: notes-read-show-specific-note-output type: schemas - _id: GET_subscriptions-subscription_id-notes-format type: endpoints - _id: notes-list-notes-output type: schemas - type: endpoints _id: PUT_subscriptions-subscription_id-notes-note_id-format - _id: notes-update-note-input type: schemas - _id: notes-update-note-output type: schemas - _id: DELETE_subscriptions-subscription_id-notes-note_id-format type: endpoints - _id: notes-delete-output type: schemas divider: false description: |- Notes allow you to record information about a particular Subscription in a free text format. If you have structured data such as birth date, color, etc., consider using Metadata instead. - divider: false items: - _id: offers-introduction type: docTextSections - _id: GET_offersjson type: endpoints - _id: list-offer-output type: schemas - _id: POST_offersjson type: endpoints - _id: create-offer-input type: schemas - _id: create-offer-output type: schemas - _id: GET_offers-offeridjson type: endpoints - _id: show-offer-output type: schemas - _id: PUT_offers-offerid-archivejson type: endpoints - _id: PUT_offers-offerid-unarchivejson type: endpoints name: Offers - name: Payment Profiles items: - type: docTextSections _id: intro-to-payment-profiles - _id: POST_payment_profiles-format type: endpoints - _id: payment-profiles-create-payment-profile-input type: schemas - _id: payment-profile-create-payment-profile-output type: schemas - _id: POST_paymentprofilesjson type: endpoints - _id: POST_paymentprofilesjson type: endpoints - _id: POST_paymentprofilesjson type: endpoints - _id: subscriptions-change-default-payment-profile-response type: schemas - _id: GET_payment_profiles-payment_profile_cc_id-format type: endpoints - _id: payment-profiles-read-payment-output-cc type: schemas - _id: GET_paymentprofiles-paymentprofileidjson type: endpoints - _id: payment-profile-read-payment-output-bank-account type: schemas - _id: PUT_payment_profiles-payment_profile_id-format type: endpoints - _id: payments-update-payment-profile type: schemas - _id: GET_payment_profiles-format type: endpoints - _id: payment-profiles-list-payment-profiles-for-a-site-outuput type: schemas - _id: DELETE_subscriptions-subscriptionid-paymentprofiles-paymentprofileidjson type: endpoints - _id: PUT_bank_accounts-verification type: endpoints - _id: DELETE_paymentprofiles-paymentprofileidjson type: endpoints divider: false - name: Products items: - _id: products-intro type: docTextSections - _id: POST_productfamilies-productfamilyid-productsjson type: endpoints - _id: products-create-a-product-input type: schemas - _id: products-create-a-product-output type: schemas - _id: GET_products-productidjson type: endpoints - _id: read-a-product-output type: schemas - _id: GET_products-format type: endpoints - _id: products-list-products-output type: schemas - _id: GET_products-handle-handle-format type: endpoints - _id: GET_products-id-format type: endpoints - _id: products-read-the-product-via-chargify-id type: schemas - _id: PUT_products-productidjson type: endpoints - _id: products-update-product-input type: schemas - _id: products-update-product-output type: schemas - _id: DELETE_products-productidjson type: endpoints - _id: archive-a-product-output type: schemas - _id: productQueryString type: traits - divider: false items: - _id: product-price-point-intro type: docTextSections - _id: product-price-point-output type: schemas - _id: product-price-point-input type: schemas - _id: product-price-point-currency-price type: schemas - _id: POST_products-productid-pricepointsjson type: endpoints - _id: PUT_products-productid-pricepoints-pricepointidjson type: endpoints - _id: GET_products-productid-pricepoints-pricepointidjson type: endpoints - _id: GET_products-productid-pricepointsjson type: endpoints - _id: PATCH_products-productid-pricepoints-pricepointid-unarchivejson type: endpoints - _id: DELETE_products-productid-pricepoints-pricepointidjson type: endpoints - _id: PATCH_products-productid-pricepoints-pricepointid-defaultjson type: endpoints - _id: POST_products-productid-pricepoints-bulkjson type: endpoints - _id: POST_productpricepoints-productpricepointid-currencypricesjson type: endpoints - _id: PUT_productpricepoints-productpricepointid-currencypricesjson type: endpoints name: 'Products: Price Points' - name: Product Families items: - _id: product-family-intro type: docTextSections - _id: POST_product_families-product_family_id-products-format type: endpoints - _id: product-families-create-product-family-input type: schemas - _id: product-families-create-product-family-output type: schemas - _id: POST_product_families-id-format type: endpoints - _id: POST_product_families-site type: endpoints - _id: product-families-list-product-family-by-id type: schemas - _id: product-families-read-product-families-for-a-site type: schemas divider: false - divider: false items: - _id: POST_subscriptions-subscriptionid-proformainvoicesjson type: endpoints - _id: POST_subscriptiongroups-subscriptiongroupuid-proformainvoicesjson type: endpoints - _id: GET_proformainvoices-proformainvoiceuidjson type: endpoints - _id: GET_subscriptions-subscriptionid-proformainvoicesjson type: endpoints - _id: GET_subscriptiongroups-subscriptiongroupuid-proformainvoicesjson type: endpoints - _id: POST_proformainvoices-proformainvoiceuid-voidjson type: endpoints - _id: proforma-invoice-response type: schemas name: Proforma Invoices - divider: false items: - _id: reason-code-intro type: docTextSections - _id: POST_reasoncodesjson type: endpoints - _id: GET_reasoncodesjson type: endpoints - _id: GET_reasoncodes-reasoncodeidjson type: endpoints - _id: PUT_reasoncodes-reasoncodeidjson type: endpoints - _id: reason_codes-create_code_request type: schemas - _id: reason_codes-create_code_response type: schemas - _id: DELETE_reasoncodes-reasoncodeidjson type: endpoints - _id: reason_code-list_response type: schemas - _id: reason_code-show_response type: schemas - _id: reason_code-update_response type: schemas - _id: reason_codes-delete_response type: schemas name: Reason Codes description: Reason Codes are the items that are presented when a user cancels their Chargify Subscription. It allows you too get a granular view as to why a user is discontinuing your service or product. - name: Referral Codes items: - _id: referrals-intro type: docTextSections - _id: GET_referralcodes-validatejson type: endpoints - _id: referral-validate-response type: schemas - _id: referralCode type: traits divider: false - divider: false items: - _id: DxXypzEsyp5Tabdfo type: endpoints - _id: fFW895477P3evLgbC type: schemas - _id: K6HPayjemN6baGEAd type: endpoints - _id: JCkQTf5uMPkdGQFGs type: schemas name: Sales - divider: false items: - _id: sales-commission-intro type: docTextSections - _id: GET_sellers-sellerid-salescommissionsettingsjson type: endpoints - _id: GET_sellers-sellerid-salesrepsjson type: endpoints - _id: GET_sellers-sellerid-salesreps-salesrepidjson type: endpoints name: Sales Commission description: '' - name: Sales Receipts items: - _id: kexqX2T8oWJQqeSRm type: docTextSections - _id: wpLDKheD4Dnpst2Sr type: endpoints - _id: ZwcJnieJPmDC2HZBh type: schemas - type: endpoints _id: 7FqRQa8LSR23Pbiyy - _id: FGFmRHiEStii5bqWE type: schemas divider: false - name: Sites items: - _id: sites-intro type: docTextSections - _id: POST_sites-cleardatajson type: endpoints - _id: POST_sites-cleardatajson type: endpoints - _id: POST_sites-cleardatajson type: endpoints - _id: GET_sitejson type: endpoints - name: Statements items: - _id: statements-intro type: docTextSections - _id: GET_subscriptions-subscription_id-statements-ids-format type: endpoints - _id: statements-list-statement-ids-for-a-subscription-response type: schemas - _id: GET_statements-ids-format type: endpoints - _id: statements-list-statement-ids-for-a-site-response type: schemas - _id: GET_subscriptions-subscriptionid-statementsjson type: endpoints - _id: statements-list-statements-for-a-subscription-response type: schemas - _id: GET_statementsjson type: endpoints - _id: statements-list-statements-for-a-site type: schemas - _id: GET_statements-statement_id-format type: endpoints - _id: statements-read-show-by-chargify-id type: schemas - _id: GET_statements_count-format type: endpoints - _id: statements-count-statements-response type: schemas - _id: perPage10000 type: traits - _id: sort type: traits - _id: statementsList type: traits - _id: settledSinceUnix type: traits - name: Stats items: - _id: stats-intro type: docTextSections - _id: GET_stats-json type: endpoints - _id: stats-read-stats-output type: schemas divider: false - divider: false items: - _id: POST_subscriptiongroupsjson type: endpoints - _id: GET_subscriptiongroupsjson type: endpoints - _id: GET_subscriptiongroups-uidjson type: endpoints - _id: GET_subscriptiongroups-lookupjson type: endpoints - _id: DELETE_subscriptiongroups-uidjson type: endpoints - _id: PUT_subscriptiongroups-uidjson type: endpoints - _id: POST_subscriptions-subscriptiongroupuid-paymentprofiles-paymentprofileid-changepaymentprofilejson type: endpoints - _id: subscription-group type: schemas - _id: invoice-account-entry type: schemas name: Subscription Groups - divider: false items: - _id: POST_subscriptiongroups-uid-canceljson type: endpoints - _id: POST_subscriptiongroups-uid-delayedcanceljson type: endpoints - _id: DELETE_subscriptiongroups-uid-delayedcanceljson type: endpoints name: 'Subscription Groups: Cancellations' - divider: false items: - _id: POST_subscriptiongroups-subscriptiongroupuid-reactivatejson type: endpoints name: 'Subscription Groups: Reactivation and Resumption' - divider: false items: - _id: DELETE_subscriptiongroups-subscriptiongroupuid-paymentprofiles-paymentprofileidjson type: endpoints name: 'Subscription Groups: Payment Methods' - divider: false items: - _id: POST_subscriptiongroups-uid-prepaymentsjson type: endpoints - _id: subscription-group-prepayment type: schemas name: 'Subscription Groups: Prepayments' - divider: false items: - _id: POST_subscriptiongroups-uid-servicecreditsjson type: endpoints - _id: POST_subscriptiongroups-uid-servicecreditdeductionsjson type: endpoints - _id: service-credit type: schemas - _id: service-credit-post type: schemas name: 'Subscription Groups: Service Credits' - name: Subscriptions items: - _id: subscriptions-intro type: docTextSections - _id: subscription-output-attributes type: docTextSections - _id: subscription-request-examples type: docTextSections - _id: subscription-threedsecure-stripe type: docTextSections - _id: POST_subscriptionsjson type: endpoints - _id: GET_subscriptions-subscription_id-format type: endpoints - _id: GET_subscriptionsjson type: endpoints - _id: GET_customers-customerid-subscriptionsjson type: endpoints - _id: PUT_subscriptions-subscriptionidjson type: endpoints - _id: GET_subscriptions-lookup-reference-format type: endpoints - _id: POST_subscriptions-subscriptionid-paymentprofiles-paymentprofileid-changepaymentprofilejson type: endpoints - _id: POST_subscriptions-subscriptionid-purgejson type: endpoints - _id: components-quantity-create-subscription-with-quantity-based-component type: schemas - _id: 2upcg5tJkXB6xQabb type: endpoints - _id: subscriptions-create-subscription-request type: schemas - _id: subscription-read-subscription type: schemas - _id: read-subscriptions-site-output type: schemas - _id: 57LwHdN5jxjEFf3HH type: schemas - _id: update-subscription-request type: schemas - _id: subscriptionQueryString type: traits - _id: Qijzy25gdrNxpdc8X type: endpoints - _id: TskoMiCqu9fbjWLWx type: schemas - _id: 3GimKZpKHXBsvfTdx type: schemas - _id: 6uc29YJhRFimXJ5qE type: schemas - divider: false items: - _id: PUT_subscriptions-subscription_id-format type: endpoints - _id: subscriptions-update-subscription-billing-day-change-request type: schemas name: 'Subscriptions: Date Changes / Calendar Billing' - divider: false items: - _id: POST_subscriptions-subscriptionid-delayedcanceljson type: endpoints - _id: DELETE_subscriptions-subscription_id-format type: endpoints - _id: subscriptions-cancel-subscription-request type: schemas - _id: DELETE_subscriptions-subscriptionid-delayedcanceljson type: endpoints name: 'Subscriptions: Cancellations' - divider: false items: - _id: POST_subscriptions-subscriptionid-canceldunningjson type: endpoints name: 'Subscriptions: Cancel Dunning' - name: 'Subscriptions: Charges' items: - _id: charges-intro type: docTextSections - _id: POST_subscriptions-subscriptionid-chargesjson type: endpoints - _id: charges-create-a-charge-request-post type: schemas - _id: charges-create-a-charge-response-post type: schemas divider: false - items: - _id: coupon-intro type: docTextSections - _id: POST_subscriptionsjson type: endpoints - _id: coupon-create-subscription-with-coupon-input type: schemas - _id: coupon-create-subscription-with-coupon-output type: schemas - _id: POST_subscriptionsjson type: endpoints - _id: create-subscription-with-multiple-coupon-input type: schemas - _id: create-subscription-with-multiple-coupon-output type: schemas - _id: POST_subscriptions-subscription_id-add_coupon-format?code=coupon_code type: endpoints - _id: coupon-add-coupon-to-subscription-output type: schemas - _id: DELETE_subscriptions-subscription_id-remove_coupon-format type: endpoints - _id: POST_subscriptions-subscription_id-add_coupon-format?code=coupon_code type: endpoints - _id: add-multiple-coupons-to-existing-subscription-input type: schemas - _id: add-multiple-coupons-to-existing-subscription-output type: schemas name: 'Subscriptions: Coupons' divider: false - divider: false items: - _id: subscriptions-hierarchies-and-whopays-intro type: docTextSections - _id: POST_subscriptionsjson type: endpoints - _id: subscription-create-hierarchy-request type: schemas - _id: POST_subscriptionsjson type: endpoints - _id: create-subscription-group-request type: schemas - _id: POST_subscriptions-subscriptionid-groupjson type: endpoints - _id: subscription-add-group-request type: schemas - _id: subscription-add-group type: schemas - _id: DELETE_subscriptions-subscriptionid-groupjson type: endpoints name: 'Subscriptions: Hierarchies / WhoPays' - divider: false items: - _id: POST_subscriptions-subscriptionid-resumejson type: endpoints - _id: POST_subscriptions-subscriptionid-holdjson type: endpoints - _id: subscriptions-hold-subscription-request type: schemas - _id: PUT_subscriptions-subscriptionid-holdjson type: endpoints - _id: update-on-hold-subscriptions-input type: schemas - _id: update-on-hold-subscriptions-output type: schemas - _id: calendarBillingTrait type: traits name: 'Subscriptions: Hold / Resume' - divider: false items: - _id: POST_subscriptions-subscriptionid-invoicesjson type: endpoints name: 'Subscriptions: Invoices' - divider: false items: - _id: importing-subscriptions type: docTextSections - _id: POST_subscriptionsjson type: endpoints - _id: subscriptions-subscription-import-request type: schemas - _id: subscriptions-subscription-import-response type: schemas name: 'Subscriptions: Import' - name: 'Subscriptions: Payments (Legacy)' items: - _id: intro-to-payments type: docTextSections - _id: POST_subscriptions-subscriptionid-paymentsjson type: endpoints - _id: payments-create-payment-input type: schemas - _id: payments-create-payment-output type: schemas divider: false - divider: false items: - _id: PUT_subscriptions-subscription_id-retry-format type: endpoints - _id: PUT_subscriptions-subscription_id-format type: endpoints - _id: subscriptions-update-subscription-payment-method-request type: schemas - _id: PUT_subscriptions-subscription_id-reset_balance-xml type: endpoints - _id: DELETE_subscriptions-subscription_id-payment_profiles-payment_profile_id-format type: endpoints name: 'Subscriptions: Payment Methods / Retries / Balance Reset' - divider: false items: - _id: POST_subscriptionsjson type: endpoints - _id: subscription-create-prepaid-request type: schemas - _id: prepaid-subscription-configuration type: schemas - _id: POST_subscriptions-subscriptionid-prepaidconfigurationsjson type: endpoints name: 'Subscriptions: Prepaid Subscriptions' - name: 'Subscriptions: Preview' items: - _id: subscriptions-preview-intro type: docTextSections - _id: POST_subscriptions-preview-format type: endpoints - _id: subscriptions-subscription-preview-request type: schemas - _id: subscription-preview-response type: schemas - _id: POST_subscriptions-previewjson type: endpoints - _id: subscription-preview-price-point-id-request type: schemas - _id: subscription-preview-price-points-response type: schemas - _id: POST_subscriptions-preview-format type: endpoints - _id: subscription-preview-with-custom-taxes type: schemas - _id: subscription-preview-with-custom-taxes-response type: schemas - _id: subscription-preview-avalara-request type: schemas - _id: POST_subscriptions-preview-format type: endpoints - _id: subscription-preview-avalara-response type: schemas divider: false - name: 'Subscriptions: Product Changes / Migrations / Upgrades / Downgrades' items: - _id: migrations-intro type: docTextSections - _id: migration-3d-secure-stripe type: docTextSections - _id: POST_subscriptions-subscriptionid-migrationsjson type: endpoints - _id: POST_subscriptions-subscriptionid-migrations-previewjson type: endpoints - _id: PUT_subscriptions-subscription_id-format type: endpoints - _id: PUT_subscriptions-subscription_id-format type: endpoints - _id: PUT_subscriptions-subscription_id-format type: endpoints - _id: migrations-create-migration-input type: schemas - _id: migrations-create-migration-input-trial-output type: schemas - _id: migrations-preview-migration-output type: schemas - _id: subscriptions-update-subscription-product-change-request type: schemas - _id: update-subscription-product-change-request-id type: schemas - _id: update-subscription-delayed-product-change-request type: schemas - _id: update-subscription-cancel-delayed-product-change-request type: schemas - _id: preview-migration-input type: schemas divider: false - divider: false items: - _id: POST_subscriptionsjson type: endpoints - _id: POST_subscriptionsjson type: endpoints - _id: create-subscription-with-offer-request type: schemas - _id: subscription-offer-handle-request type: schemas - _id: create-subscription-with-offer-response type: schemas - _id: subscription-offer-handle-response type: schemas name: 'Subscriptions: Offers' - name: 'Subscriptions: Override' items: - _id: subscriptions-override-intro type: docTextSections - _id: PUT_subscriptions-subscription_id-override-format type: endpoints - _id: subscriptions-subscription-override-request type: schemas divider: false - divider: false items: - _id: POST_subscriptions-subscriptionid-prepaymentsjson type: endpoints name: 'Subscriptions: Prepayments' - divider: false items: - _id: subscription-reactivation-intro type: docTextSections - _id: PUT_subscriptions-subscription_id-reactivate-format type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints - _id: PUT_subscriptions-subscriptionid-reactivatejson type: endpoints name: 'Subscriptions: Reactivations' - name: 'Subscriptions: Refunds (Legacy)' items: - _id: refunds-intro type: docTextSections - _id: POST_subscriptions-subscriptionid-refundsjson type: endpoints - _id: external-refunds-intro type: docTextSections - _id: POST_subscriptions-subscriptionid-refundsjson type: endpoints - _id: refunds-external-create-an-external-refund-request type: schemas - _id: refunds-create-a-refund-response type: schemas - _id: refunds-create-a-refund-request type: schemas - _id: refunds-external-create-an-external-refund-response type: schemas divider: false - name: 'Subscriptions: Renewal Preview' items: - _id: renewal-preview-intro type: docTextSections - type: endpoints _id: POST_subscriptions-subscriptionid-renewals-previewjson - _id: renewal-preview-output type: schemas divider: false - divider: false items: - _id: POST_subscriptions-subscriptionid-servicecreditsjson type: endpoints - _id: POST_subscriptions-subscriptionid-servicecreditdeductionsjson type: endpoints - _id: subscription-issue-credit-request type: schemas name: 'Subscriptions: Service Credits' - name: Transactions items: - _id: transactions-api type: docTextSections - _id: transaction-output-attributes type: docTextSections - _id: GET_transactions-format type: endpoints - _id: GET_transaction_id-format type: endpoints - _id: transactions-transaction-response type: schemas - _id: GET_subscriptions-subscription_id-transactions-format type: endpoints - _id: GET_transactions_count-format type: endpoints - _id: count-transactions type: schemas - _id: txnKinds type: traits - _id: txnSinceId type: traits - _id: txnMaxId type: traits - _id: txnSinceDate type: traits - _id: txnUntilDate type: traits - _id: txnDirection type: traits - _id: txnOrderBy type: traits - name: Webhooks items: - _id: webhooks-intro type: docTextSections - _id: GET_webhooks-format type: endpoints - _id: webhooks-list-webhook-output type: schemas - _id: POST_webhooks-replay-format type: endpoints - _id: webhooks-replay-webhooks-site type: schemas - _id: POST_endpointsjson type: endpoints - _id: GET_endpoints-endpointidjson type: endpoints - _id: endpoint-create-update-an-endpoint type: schemas - _id: GET_endpointsjson type: endpoints - _id: PUT_webhooks-settingsjson type: endpoints functions: {} textSections: guidelines: id: guidelines name: Guidelines content: |- ## API Guidelines Our many merchants all use our API for different purposes. API access is included on all plans at no charge because we believe that you are the owner of your data and you should never feel like your data is ‘locked up’. However, because the API means there is little or no user-interaction, it can be very easy to create a program or routine that causes an unnecessarily high burden on our system. Even small accounts can generate huge numbers of expensive API requests by accident. In order to maintain a high quality of service for everyone, we ask that you be cautious when implementing your API integration to avoid run-away usage that is disproportionate to the size of your account. ## Best Practices Here are some tips and best-practices to help keep both your site and ours running smoothly. ## Getting Subscription States You likely want to check if your customer has an active account, has cancelled, or is behind on his/her payments. The best approach is to keep a local cached copy of the subscription’s state in your own database. You can use [Webhooks](#docTextSection:JYqoZ6JmsZn6gcdYk) to keep up-to-date in near real-time on any changes that occur. This keeps your website up, reduces your coupling to Chargify, and ensures both sites remain as fast as possible. Avoid querying Chargify in-line as part of a customer’s request to your site. Doing so could result in: + Slowing down your own site while the customer waits for a check to Chargify on every request. + If there is a network connectivity issue or in the unlikely event that Chargify is down, your site will also break. + As you grow and your customers are more active, you will use up huge numbers of API requests that could result in being blocked because of our automatic abuse prevention. ## Synchronizing Your Database Normally you should keep your local customer database in sync by using [Webhooks](#docTextSection:JYqoZ6JmsZn6gcdYk). But if you think your database has become out of sync with Chargify, then using the API to check the state of all subscriptions may be the only way to ensure consistency. It’s perfectly okay to do this as needed. But it should generally only be relied upon in exceptional circumstances or for periodic reconciliation (usually no more than once a month). ## Reporting Usage When reporting component usage, avoid sending lots of tiny usage amounts. If you charge by the minute for phone calls, for instance: + **Don’t** send in a usage for every minute or every phone call individually. + **Don’t** send all usage for all customers all at once. Spread it out or wait a short period of time between each request Instead: + **Do** send a usage report once a day with how much a customer used for the whole day. ## Downloading Bulk Data Periodically exporting transaction, subscription, or customer data is a common use case. When possible, we recommend using the built-in [Export](https://help.chargify.com/reports/exporting-data.html) functions inside Chargify to generate reports and download the data. This can often be much faster and can significantly lower your API usage. ## About Limits & Blocks When doing a large synchronization or retrieving a large amount of data, you may trigger a security failsafe used to prevent abuse and protect our site from attacks. We don’t want to block small bursts in usage. So instead of immediately rejecting your requests, we will slow and throttle them. If you see your responses coming in slower, do not parallelize your requests or try to make more concurrent requests to speed things up. You’ll only have to wait longer for your requests to get through. If you have too many slowed requests, or your individual account queue gets too full with too many concurrent requests, you’ll likely receive an HTTP “429 Too Many Requests” response code with a message: `Your request was denied due to a usage violation. You can track this request with support by referencing …` with a reference code. Please feel free to [contact support](https://chargify.zendesk.com/hc/en-us/requests/new) so we can help describe what happened and why the request was blocked. If you receive a “429 Too Many Requests” response, your code should be prepared to handle it by pausing its queries, waiting a few minutes, and then proceeding slower (or with less concurrency). public: false introduction: id: introduction name: Introduction content: |- Chargify API Basics - Introduction ## API Integration Chargify can be integrated with many environments and programming languages via our REST API. Some of our users have contributed their API wrappers in various programming languages. Check out the [API Code Overview](https://developer.chargify.com/content/ecosystem/api-code-samples.html) doc for an introduction to the wrappers and available code samples. ## Developer Portal We've created a developer focused portal to give your organization a clear and quick overview of how to integrate with Chargify. The developer portal focuses on scenarios for integration and flow of events. We recommend familiarizing yourself with all of the content in the developer portal, as it's a great compliment to our API documentation. Here is a sampling of what is available in the developer portal: + [Getting Started Guide for Integrators:](https://developer.chargify.com/content/getting-started/authentication.html) Authentication, Guidelines, Sites/Subdomains + [API Basics:](https://developer.chargify.com/content/basics/signups.html) Signups, Components, Syncing + [Chargify Ecosystem:](https://developer.chargify.com/content/ecosystem/ecosystem.html) Code samples, Signup methods ## Chargify.js Our [Chargify.js documentation](https://developer.chargify.com/content/chargify-js/chargify-js.html) can be found under the developer portal. Here you'll find an introduction to how Chargify.js allows you to tokenize sensitive information such as card numbers. Additionally, we cover some example implementations, as well as troubleshooting. ## Testing Guide Chargify has compiled a [testing guide](https://help.chargify.com/testing/testing-intro.html) that covers a list of important factors to consider while in the testing phase. Here's a high-level overiew of what's covered in our testing guide: + Test credit card basics + Test site limits + Live mode versus test mode We strongly suggest reading over the testing guide, as well as the entire set of application-based documentation to aid in your discovery of the product. ## Engage Support We always enjoy (and appreciate) hearing about larger integrations ahead of time. If you’re planning on importing a large amount of data into Chargify via our API, we suggest sending a “heads up” to “support@chargify.com” so we can coordinate with you to ensure your import process goes smoothly. Our API, while considered stable, is continually being improved and polished. Please feel free to contact support if you experience issues when integrating with the Chargify API. ## Support Access Access to our Technical Specialist team for API support is currently limited to purchasers of our larger Chargify support plans. But don’t worry! There are quite a few options to help you get the answers you need: [Read through our helpful API documentation](http://developer.chargify.com) [Watch our videos and tutorials](https://chargify.com/tutorials) [Check out the Chargify tag on Stack Overflow](http://stackoverflow.com/questions/tagged/chargify) ## Available Consultants Check out the list of [Chargify Consultants](http://chargify.com/consultants) if you require deeper technical expertise for your integration. ## OpenAPI An export of this API reference documentation is available in OpenAPI (Swagger) YAML format on [Github](https://github.com/chargify/api-reference-export). Please note that this export is provided mainly as a backup of the hosted documentation and we are unable to support code generation from it. public: true authentication: id: authentication name: Authentication content: |- The API Authentication is implemented as HTTP Basic Authentication over TLS (HTTPS). Your API login credentials are not the same as the credentials you use to log in to the web interface. You must obtain your API credentials separately. **Notice**: As of January 2016, you must use TLS >= 1.2 in order to connect to the API. See the TLS [Upgrade Notice](http://help.chargify.com/announcements/tls-upgrade-notice.html) for more information. ### Obtaining Your API Credentials Your API key can be generated from the “Integrations” tab of your seller dashboard. Please see [here](http://help.chargify.com/integrations/api-keys-chargify-direct.html) for more information on obtaining API keys, ### Authenticating with your API Credentials You will use HTTP Basic Authentication to verify your identity via the API. All requests must come over TLS`/`HTTPS, and be to the subdomain of the Site you wish to access. **For example, if your Site’s subdomain is "acme", then you would access the Customer resource at:** `https://acme.chargify.com/customers.json` **An example using authentication via cURL:** `curl -u api-key:x https://subdomain.chargify.com/customers.xml` **or** `curl -i https://:x@subdomain.chargify.com/customers.xml` ### Troubleshooting: Unable to Connect If you are unable to connect, the problem is often that you are using an old/unsupported version of SSL or TLS. In this case, Chargify will simply drop the connection, and the error message you receive may be cryptic. Here are some common error messages that have been reported: + The underlying connection was closed: An unexpected error occurred on a send. + `Authentication failed because the remote party has closed the transport stream.` Please, review the information on the [Upgrade Notice](http://help.chargify.com/announcements/tls-upgrade-notice.html) in order to correct the problem. public: false transactions-api: id: transactions-api name: Transactions Intro content: |- ## Transactions Intro The Transactions API allows you to view a list of all transactions both for a site and for an individual subscription. ## Transaction Array Request Requests for `kinds`can be for a singular attribute or an array. Multiple values can be passed in the url, for example: ``` http://example.com?kinds[]=charge&kinds[]=payment&kinds[]=credit ``` ## Transactions Documentation Documentation in relation to transactions is broken up into two major sections within Chargify: + [Recorded Transactions](http://help.chargify.com/subscriptions/subscription-summary.html#transactions) + [Transactions Export](http://help.chargify.com/reports/exporting-data.html#transactions-line-item-export) ## Transaction Types | Type / Transaction Type | Description | Effect on Subscriber Balance Due | Effect on “Revenue” (money collected) | |-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|---------------------------------------| | charge | A positive amount assessed to a subscription for an item (i.e. a Product or Component) sale. Usually assessed at signup or renewal time. | Increases balance due | No effect on revenue | | credit | A negative amount assessed to a subscription that indicates a “return” or “credit” for an item (i.e. a Product or Component). Usually offsets an earlier charge, i.e. in the case of a prorated downgrade. | Decreases balance due | No effect on revenue | | adjustment | A postive or negative amount that adjusts the subscription balance but cannot usually be directly attributed to a single item (Product or Component) | Increases or decreases balance due | No effect on revenue | | payment | A postive amount that denotes amount paid to you by the subscriber, usually on their credit card or bank account via your payment gateway. Payments may also be recorded “manually” in the case of checks received, or money received outside of Chargify. | Decreases balance due | Increases revenue | | refund | A positive amount that denotes “cash” given back to a subscriber (i.e. put back on their card) via a refund or credit at the gateway. | No effect on balance due | Decreases revenue | | InfoTransaction / info | An informational transaction whose description provides context for transactions nearby in time, or serves as a placeholder for another transaction that could not be attempted (i.e. when payment cannot be attempted because no card is on file) | N/A | N/A | | payment_authorization | Deprecated. No longer appears in transactions listing | N/A | N/A | ## Transaction Kinds (Subtypes) #### Kinds for the ```charge``` transaction type | Type / Transaction Type | Kind | Description | |-------------------------|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | charge | trial | A charge for a subscription’s trial period. Usually applied at the time of signup, but sometimes after a migration where a trial is allowed. | | charge | initial | A charge for the initial/setup fee assessed according to the product setup settings. Usually applied at the time of signup, but sometimes after a migration where the setup fee is included. | | charge | baseline | A charge for the normal, recurring fee. | | charge | one_time | A one-time fee applied to a subscription, usually between normal renewals. Can be added in the Chargify UI or the API, and is captured (via credit card payment) immediately. | | charge | delay_capture | Like a one_time charge, but not captured (i.e. not paid) until the next normal renewal. Sometimes called an “accrued charge”. | | charge | quantity_based_component | A charge for the currently allocated quantity of a quantity-based component (i.e. seat licenses). Applied at renewal based on the quantity allocated at that time. | | charge | on_off_component | A charge for the current status (on or off) of an on/off component. Applied at renewal. | | charge | metered_component | A charge for the usage of a metered component (i.e. minutes). Applied at renewal based on the usage during the last period. | | charge | metered | Deprecated. May exist for very old transactions. Can be considered an alias for “metered_component”. | | charge | tax | A charge for the taxes computed on taxable line items for the billing event (signup or renewal). | | charge | | A generic charge that is not otherwise classified by any of the above values for `kind`. | ### Kinds for the ```credit``` transaction type | Type / Transaction Type | Kind | Description | |-------------------------|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------| | credit | quantity_based_component | A credit against a quantity-based component charge. Usually generated during a prorated downgrade for an amount previously charged. | | credit | on_off_component | A credit against an on/off component charge. Usually generated during a prorated downgrade for an amount previously charged. | | credit | tax | A credit against tax charges. Usually generated during a prorated downgrade to offset a tax amount already assessed. | | credit | | A generic credit that is not otherwise classified by any of the above values for `kind`. | ### Kinds for the ```adjustment``` transaction type | Type / Transaction Type | Kind | Description | |-------------------------|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | adjustment | coupon | An adjustment that reflects the discount provided by a coupon. Is almost always a negative amount. | | adjustment | prorated | An adjustment applied during a migration proration that offsets overpayments resulting from the shortened period on the old product. Followed by the assessment of new charges for the new product. | | adjustment | reactivation | An adjustment as a result of a reactivation of a canceled subscription. A balance is cleared before the subscription reactivates. | | adjustment | quantity_based_component | Deprecated. Like a quantity_based_component credit in function but no longer used (since credits can be taxable but adjustments cannot). | | adjustment | on_off_component | Deprecated. Like an on_off_component credit in function but no longer used (since credits can be taxable but adjustments cannot). | | adjustment | tax | Deprecated. Like a tax credit in function but no longer used. | | adjustment | referral | An adjustment that acts like a coupon but is the discount applied to the referring subscriber in a Refer-A-Friend scenario. | | adjustment | | A generic adjustment that is not otherwise classified by any of the above values for `kind`. This is the kind of ad-hoc adjustment that can be created via the API. | | adjustment | voided_invoice | (Relationship Invoicing only) An adjustment as a result of a voided invoice. | | adjustment | cancelation | (Relationship Invoicing only) An adjustment as a result of a canceled subscription. | ### Kinds for the ```payment``` transaction type | Type / Transaction Type | Kind | Description | |-------------------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| | payment | one_time | A payment received for a mid-period one-time charge (i.e. for a charge with kind one_time). | | payment | component_proration | A payment received for a mid-period component proration (allocation change). | | payment | manual | A payment recorded “manually” via the Admin UI or API. This kind of payment was not one automatically processed by Chargify, but instead entered manually. | | payment | | A generic payment received in any sitation not described above. Usually an automatically captured payment for a normal signup or renewal. | ### Kinds for the ```refund``` transaction type | Type / Transaction Type | Kind | Description | |-------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | refund | manual | A refund recorded “manually” via the Admin UI or API to reflect a refund already given outside of Chargify. Chargify does not actually submit this kind of refund to the payment gateway. | | refund | | A generic refund resulting from any sitation not described above. This kind of refund is submitted by Chargify to the payment gateway to return money to the subscriber. | public: true duplicate-prevention: id: duplicate-prevention name: Duplicate Prevention content: |- When making API requests, it is possible to receive an error even though your request actually completed successfully. For example, if you submit an API request and it times out, you can’t be sure whether your request was received by Chargify, or not. If you simply re-try the request, you _might_ end up with a duplicate transaction. ## Uniqueness Token In order to prevent these duplicates, Chargify allows you to supply a `uniqueness_token` parameter in any POST or PUT request. The value you supply for the `uniqueness_token` should be long and random, like a UUID. The exact format of the value is up to you. If a subsequent request with the same uniqueness_token is received within 60 minutes, it will be rejected with a `409 Conflict` response code and a duplicate error message. ## Example For example, suppose you are making an adjustment on a subscription. Using curl, you send the following POST request, including a `uniqueness_token`. ```json curl --verbose -u $CHARGIFY_API_KEY:x -H Accept:application/json -H Content-Type:application/json -X POST \ -d @adjustment.json https://$CHARGIFY_SUBDOMAIN.chargify.com/subscriptions/$SUBSCRIPTION_ID/adjustments.json adjustment.json: {"adjustment": { "amount": "-12.43", "memo": "Credit for outage on 1/31" }, "uniqueness_token": "2731FB23-98AD-4489-BAF6-7D5CE916F766" } ``` After you send your request, there is some problem, and the request times out without a valid response instead of the `201 Created` you were hoping for. Since you have supplied a `uniqueness_token`, you can safely re-try the request. If you receive the expected `201 Created` (or `422 Unprocessable Entity`) response, you can continue as usual knowing that Chargify never received your first request. If you receive a `409 Conflict` and a duplicate error message for the re-try, then you know that the first request was received and processed. Example 409 Conflict response: ``` < Status: 409 Conflict {"errors":["DuplicatePrevention::DuplicateSubmissionError"]} ``` Unfortunately, it is not possible to know what the outcome of the first request was, so you cannot automatically assume it was successful. Depending on what type of request you were making, it might be possible to gracefully recover by recording some information about the original request, listening for webhooks, and matching up the webhook payload to find out whether the request succeeded or not. In other cases, human intervention will be necessary. ## Summary We hope this feature will help you prevent duplicate transactions during error handling. That said, if you are experiencing repeated timeouts, please [open a support ticket](mailto:support@chargify.com) so we can investigate. public: false stats-intro: id: stats-intro name: Stats Intro content: |- ## Stats Intro The Stats API is a very basic view of some Site-level stats. This API call only answers with JSON responses. An XML version is not provided. ## Stats Documentation There currently is not a complimentary matching set of documentation that compliments this endpoint. However, each Site's dashboard will reflect the summary of information provided in the Stats reposnse. ``` https://subdomain.chargify.com/dashboard ``` public: true api-code-samples-and-libraries-1: id: api-code-samples-and-libraries-1 name: API Code Samples & Libraries content: |- The following sample code has been contributed by our community of developers to help you get started with Chargify faster. The code they’ve given back to everyone represents a lot of time & work that you can benefit from as you implement Chargify with your app! If you have usage examples or code libraries in other languages, please let us know. Please note that these samples were graciously given to us by our users, so we don’t offer official support for them. Of course, we help where we can, but our internal knowledge is Ruby. Most of the people who made the code are happy to help, and some of them can easily be reached on Twitter. ## PHP + : Sample PHP app based on Zend Framework, from the makers of Chargely + : A PHP API wrapper, from the makers of Chargely + : Sample PHP app by Abraham Williams. :, [@abraham](https://twitter.com/abraham) + : A PHP API wrapper from Jason at RigBooks + : A PHP API wrapper by one of our active beta testers. + : CodeIgniter PHP code by Kyle Anderson + : API v1 and v2 integration for Symfony/Laravel apps by Jake Litwicki, [@jakelitwicki](https://twitter.com/jakelitwicki) ## Ruby/Rails + : This is the “official” gem by the Chargify team. It uses ActiveResource, which is built into Rails, and is a good option for easy integration. + : This is a Chargify gem that uses HTTParty. It was created by @pengwynn, who is one of our active beta testers. It has tests by using a Chargify “mock”. + : This is a Chargify gem by @jsmestad, another of our active users. ## Python / Django + : A Django wrapper for Chargify by [@gdoermann](https://twitter.com/gdoermann) + : A Python API wrapper by one of our active beta testers. + : A simple Python API wrapper. ## .Net + : A .Net API wrapper and complete sample app by one of our active beta testers (Kori Francis, [@djbyter](https://twitter.com/djbyter)) ## ColdFusion + : A simple ColdFusion cfc by Jordan Sitkin ([@specifyApp](https://twitter.com/specifyApp)). He says (as of Aug 23, 2010): “At the moment it only includes the basic functionality of the Customers and Subscriptions parts of the API, but can easily be extended to handle the rest.” ## Java / Scala + : A Scala API wrapper by one of our active beta testers. ## JavaScript + : A simple node.js wrapper for the Chargify REST API, by (Nathan Vander Wilt, [@natevw](https://twitter.com/natevw)) public: false sites-intro: id: sites-intro name: Sites Intro content: |- ## Sites Intro The “Clear Sites” API is method of allowing merchants to clear customers and subscriptions or all data from a site in TEST mode only. ## Sites Documentation Full documentation on Sites in the Chargify UI can be located [here](http://help.chargify.com/sites/sites-intro.html). Specifically, the [Clearing Site Data](http://help.chargify.com/sites/clearing-site-data.html) section is extremely relevant to this endpoint documentation. ## Test Mode Limitations **This functionality will only work on sites in TEST mode. Attempts to perform this on sites in “live” mode will result in a response of 403 FORBIDDEN.** ## Query String Attributes The Chargify API allows you initiate an upgrade/downgrade by posting to either as JSON or XML that potentially includes: + `cleanup_scope`: Optional, all or customers, the scope of cleanup of the site to be performed. Default is all. ## Cleanup Scope Values | Cleanup Scope value | Description | |---------------------|-------------------------------------------------------------------------------------------------------------------------------------| | ```all``` | Will clear all products, customers, and related subscriptions from the site. | | ```customers``` | Will clear only customers and related subscriptions (leaving the,products untouched) for the site. Revenue will also be reset to 0. | ## 403 Response Example Method: POST In this example, attempting to specify a cleanup_scope that isn’t all or customers will result in a “403 FORBIDDEN”. ``` https://.chargify.com/sites/clear_data.json?cleanup_scope=bogus ``` Required Parameter: cleanup_scope `Response: 403 FORBIDDEN` Result: No change will have been made to the site. public: true renewal-preview-intro: id: renewal-preview-intro name: Renewal Preview Intro content: |- ## Renewal Preview Intro Renewal Preview is an object representing a subscription’s next assessment. You can retrieve it to see a snapshot of how much your customer will be charged on their next renewal. ## Inclusion of Components This endpoint is particularly useful due to the fact that it will return the computed billing amount for the base product and the components which are in use by a subscriber. By default, the preview will include billing details for all components _at their **current** quantities_. This means: * Current `allocated_quantity` for quantity-based components * Current enabled/disabled status for on/off components * Current metered usage `unit_balance` for metered components * Current metric quantity value for events recorded thus far for events-based components In the above statements, "current" means the quantity or value as of the call to the renewal preview endpoint. We do not predict end-of-period values for components, so metered or events-based usage may be less than it will eventually be at the end of the period. Optionally, **you may provide your own custom quantities** for any component to see a billing preview for non-current quantities. This is accomplished by sending a request body with data under the `components` key. See the request body documentation below. ## Subscription Side Effects You can request a `POST` to obtain this data from the endpoint without any side effects. Plain and simple, this will preview data, not log any changes against a subscription. ## Renewal Preview Documentation The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. For more information, please see our documentation [here](http://help.chargify.com/subscriptions/subscription-summary.html#next-billing). public: true introduction-to-notes: id: introduction-to-notes name: Notes Intro content: |- ## Notes Intro Notes allow you to record information about a particular Subscription in a free text format. If you have structured data such as birth date, color, etc., consider using [Metadata instead.](#docTextSection:qYKmxZmb5oEKsvCLk) ## Notes Documentation Full documentation on how to use Notes in the Chargify UI can be located [here](http://help.chargify.com/subscriptions/subscription-summary.html#notes). ## Notes Output Attributes The following fields are returned from GET (read) operations: | id | The note’s unique id | |-----------------|-----------------------------------------------------------------------| | body | The main text content of the note | | subscription_id | The id of the related subscription | | sticky | (boolean) Whether or not it is pinned to the top of the list of notes | | created_at | Date and time the note was created | | updated_at | Last update timestamp | public: true coupon-intro: id: coupon-intro name: Subscriptions & Coupons Intro content: |- ## Subscriptions - Coupons In addition to the normal CRUD actions on coupons, you can also create Subscriptions using a Coupon, add a Coupon to an existing Subscription, and validate a Coupon via the API. public: true charges-intro: id: charges-intro name: Charges Intro content: |- ## Charges Intro This method of recording a charge against a subscription is referred to as a **"One Time Charge"** in the Chargify Help Documentation. For “live” subscriptions (i.e. subscriptions that are not canceled or expired), you have the ability to attach a **one-time-charge** of an arbitrary amount. In general, the subscription must have a payment method in order to support adding a charge. Exceptions to this are if the charge is accrued to the next renewal, or if the subscription is on invoice billing. ## Charges Documentation Full documentation on how to record a one-time-charge in the Chargify UI can be located [here](https://help.chargify.com/subscriptions/one-time-charges.html). ## Charge Input Attributes In order to create a charge, you must pass an amount and a memo. The amount can be specified by either the amount parameter or the amount_in_cents parameter. | amount | (either ‘amount’ or ‘amount_in_cents’ is required) If you use this parameter, you should pass a dollar amount represented as a string. For example, $10.00 would be represented as `10.00`. | |---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | amount_in_cents | (either ‘amount’ or ‘amount_in_cents’ is required) If you use this parameter, you should pass the amount represented as a number of cents, either as a string or integer. For example, $10.00 would be represented as `1000`. If you pass a value for both ‘amount’ and ‘amount_in_cents’, the value in ‘amount_in_cents’ will be used and ‘amount’ will be discarded. | | memo | (required) A helpful explanation for the charge. This amount will remind you and your customer for the reason for the assessment of the charge. | | use_negative_balance | (optional) This option specifies whether or not a negative current balance should be used when creating the new charge. If true, use the negative balance on the subscription to calculate the charge. If false, do not use the negative balance. Acceptable values are `true` or `1` for `true` and `false` or `0 `for `false`. | | delay_capture | (optional) If true, don’t attempt to immediately capture a payment for this charge (instead, wait until the next assessment date). Acceptable values are `true` or `1` for `true` and `false` or `0` for `false`. Note if this option is used use_negative_balance is assumed as false. | | accrue_on_failure | (optional) If true, the charge will be added to the subscription whether or not the payment succeeds. If false, only the failed payment will be recorded, and the balance will not be increased. This attribute is ignored if `delay_capture` is true. Acceptable values are `true` or `1` for `true` and `false` or `0` for `false`. Defaults to `false`. | | taxable | (optional, default `false`) If true, taxes will be assessed on the charge. Acceptable values are `true` or `1` for `true` and `false` or `0` for `false`. This setting is ignored if the customer tax_exempt flag is true. | | payment_collection_method | (optional, default,`automatic`) For subscriptions on invoice billing, when `delay_capture`: is set to `false`, and `payment_collection_method` is set to `invoice`, a mid-period invoice will be created from this charge. The charge will not appear on the invoice created at the next renewal. For subscriptions on statement billing, this option is ignored. | | period_range_start | (optional) A date range represents a service period. If a start is provided, an end must be supplied as well. These dates are optional and do not impact the billing of the charge. If provided, the date range will be used for revenue placement on the Finance Report and Revenue Recognition report. | | period_range_end | (optional) A date range represents a service period. If an end is provided, a start must be supplied as well. These dates are optional and do not impact the billing of the charge. If provided, the date range will be used for revenue placement on the Finance Report and Revenue Recognition report. | ## Charge Output Attributes When a charge is successfully created, a representation of the newly created charge will be returned to you as JSON or XML in the message body, with the following attributes: | success | Either `true` or `false`, depending on the success of the charge. (Note: At this time, all charges that are returned will return `true` here. `false` may be returned in the future when more options are added to the charge creation API) | |-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | amount_in_cents | The amount of the charge and captured payment, represented in cents. | | memo | The memo for the created charge. | | period_range_start | A date range represents a service period. | | period_range_end | A date range represents a service period. | ## Response Codes A response code is returned in the standard HTTP response to your API request. | 201 Created | Returned for successfully created charges. | |--------------------------|-----------------------------------------------------------------------------| | 422 Unprocessable Entity | Returned when the charge could not be created (see below section on errors) | | 404 Not Found | Returned if the referenced subscription could not be found. | ## Errors Errors are returned either as an array of error explanation strings and formatted as either an XML or JSON array, depending on your Accept headers. The listing of currently possible error messages is listed below: + Memo: cannot be blank. + Amount: is not a number. + Amount: must be greater than or equal to 0. + This subscription is not eligible to accept charges. + [Gateway response if a gateway fail] ([Your original memo]) public: true intro-to-payment-profiles: id: intro-to-payment-profiles name: Payment Profile Intro content: |- ## Payment Profile Intro Payment Profiles house the credit card, ACH (Authorize.Net or Stripe only,) or PayPal (Braintree only,) data for a customer. The payment information is attached to the customer within Chargify, as opposed to the Subscription itself. ## Taxable Subscriptions If your subscriber pays taxes on their purchased product, and you are attempting to create or update the `payment_profile`, complete address information is required. For information on required address formatting to allow your subscriber to be taxed, please see our documentation [here](https://developer.chargify.com/content/basics/signups.html#taxes) ## Payment Profile Documentation Full documentation on how Payment Profiles operate within Chargify can be located under the following links: + [Subscriber Payment Details](http://help.chargify.com/subscriptions/subscription-summary.html#payment-details) + [Self Service Pages](http://help.chargify.com/public-pages/self-service-pages.html) (Allows credit card updates by Subscriber) + [Public Signup Pages payment settings](http://help.chargify.com/public-pages/public-signup-page-settings.html#credit-card-settings) ## Payment Profile Input Attributes The following information describes the input attributes that can be used for creating Payment Profiles. | payment_type | (Optional) Default is `credit_card`. May be `bank_account` or `credit_card` or `paypal_account`. | |--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | customer_id | (Required when creating a new payment profile) The Chargify customer id. | | first_name | First name on card or bank account | | last_name | Last name on card or bank account | | full_number | (Required when payment_type is `credit_card` unless you provide the `vault_token`) The full credit card number (string representation, i.e. `5424000000000015`) | | expiration_month | (Required when `payment_type` is `credit_card` unless you provide the `vault_token`) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. `5` | | expiration_year | (Required when payment_type is `credit_card` unless you provide the `vault_token`) The 4-digit credit card expiration year, as an integer or string, i.e. `2012` | | cvv | (Optional, may be required by your gateway settings) The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | | billing_address | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing street address (i.e. `123 Main St.`). This value is merely passed through to the payment gateway. | | billing_address_2 | (Optional) Second line of the customer’s billing address i.e. `Apt. 100` | | billing_city | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (i.e. `Boston`). This value is merely passed through to the payment gateway. | | billing_state | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (i.e. `MA`). This value is merely passed through to the payment gateway. | | billing_zip | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (i.e. “12345”). This value is merely passed through to the payment gateway. | | billing_country | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, preferably in [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “`US`”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Please check your gateway’s documentation. If creating an ACH subscription, only `US` is supported at this time. | | bank_name | (Required when creating a subscription with ACH) The name of the bank where the customer’s account resides | | bank_routing_number | (Required when creating a subscription with ACH) The routing number of the bank | | bank_account_number | Required when creating a subscription with ACH) The customer’s bank account number | | bank_account_type | When payment_type is `bank_account`, this defaults to `checking` and cannot be changed | | bank_account_holder_type | When payment_type is `bank_account`, may be `personal` (default) or `business` | | verified | When payment type is `bank_account` and `current_vault` is `stripe_connect`, may be set to `true` to indicate that the bank account has already been verified. | | paypal_email | DEPRECATED - used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | | payment_method_nonce | DEPRECATED - used by merchants that implemented BraintreeBlue javaScript libraries on their own. We recommend using Chargify.js instead. | | vault_token | (Only allowed during the creation of a new payment profile.) If you have an existing `vault_token` from your gateway, you may associate it with this new payment profile. | | customer_vault_token | (Only allowed during the creation of a new payment profile.) For some gateways, used in conjuction with vault_token. | | chargify_token | (Optional) Token received after sending billing informations using [chargify.js](). This token must be passed along with `customer_id` attribute (i.e. `tok_9g6hw85pnpt6knmskpwp4ttt`) | | current_vault | (Required when you pass in a `vault_token`.) Will be one of the following: `bogus` (for testing), `authorizenet`, `authorizenet_cim`, `beanstream`, `bpoint`, `braintree_blue`, `chargify`, `cybersource`, `elavon`, `eway`, `eway_rapid_std` , `firstdata`, `fusebox`, `litle`, `moneris`, `moneris_us`, `orbital`, `payment_express`, `paymill`, `pin`, `quickpay`, `square`, `stripe_connect`, `trust_commerce`, `wirecard`, `blue_snap`. Provides a hint about where the credit card details represented by `vault_token` are stored, however transactions will always be sent to the gateway configured in the Site's settings. | | card_type | Can be any of the following `visa`, `master`, `discover`, `american_express`, `diners_club`, `jcb`, `switch`, `solo`, `dankort`, `maestro`, `forbrugsforeningen`, `laser` | | gateway_handle | (Optional) This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. `gateway_handle` is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [MultiGateway description](https://help.chargify.com/payment-gateways/gateway-configuration.html#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed. | public: true intro-to-payments: id: intro-to-payments name: Intro to Payments (Legacy) content: |- ## Payments Intro If you are using the modern Relationship Invoicing feature, see the [corresponding invoicing docs](#endpoint:fS5WvuG5ByqjTzG6C). Relationship Invoicing requires you to create a prepayment rather than an external payment against the subscription. The prepayment endpoint is [defined here](#endpoint:aD6oLHshxgsTvmGCg). Chargify allows you to record payments that occur **outside** of the normal flow of payment processing. These payments are considered **external payments**. A common case to apply such a payment is when a customer pays by check or some other means for their subscription. ## Payment Documentation Full documentation on how to record external payments in the Chargify UI can be located [here](http://help.chargify.com/subscriptions/subscription-actions.html#record-external-payment). ## Payment Input Attributes | amount | The amount represented as a string of the payment. E.g. if the payment was for $14.50, you would pass `14.50` | |-----------------|-----------------------------------------------------------------------------------------------------------------------| | amount_in_cents | The amount represented as a string of the payment in cents. E.g. if the payment was for $14.50, you would pass `1450` | | memo | Typically the description of why the payment occured | public: true migrations-intro: id: migrations-intro name: Migrations Intro content: |- ## Migrations Intro Chargify offers the ability to upgrade or downgrade a Customer’s subscription in the middle of a billing period, which is called a “Migration”. ## Migrations Documentation Full documentation on how to record Migrations in the Chargify UI can be located [here](http://help.chargify.com/subscriptions/upgrades-downgrades.html). ## Migration vs. Product Change If you want a migration with proration, then you want to continue with the methods listed below. However, if you just want to change the product the customer is subscribed to (with no proration) then you’ll just want to update the [subscription product.](#endpoint:4D8tKPkKC3So5X6qs) ## Input Attributes The Chargify API allows you initiate an upgrade/downgrade by posting JSON or XML that includes: | product_id or product_handle | The ID or handle of the `target` Product. A Subscription can be migrated to another product for both the current Product Family and another Product Family. **Note: Going to another Product Family, components will not be migrated as well.** | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | product_price_point_id or product_price_point_handle | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | | include_trial | Boolean, default `0`. If `1` is sent the customer will migrate to the new product with a trial if one is available. If `0` is sent, the trial period will be ignored. | | include_initial_charge | Boolean, default 0. If 1 is sent initial charges will be assessed. If 0 is sent initial charges will be ignored. | | include_coupons | Boolean, default `1`. If `1` (or nothing) is sent, any coupons associated with the subscription will be applied to the migration. If `0` is sent, coupons will not be applied. | | preserve_period | Boolean, default `0`. If `0` (or nothing) is sent, the subscription's billing period will be reset to today and the full price of the new product will be charged. If `1` is sent, the billing period will not change and a prorated charge will be issued for the new product. ## Alternate Request Body Options When using the migration endpoint, there are two alternative options you can use for your requests. ### Use Handle You may elect to use `product_handle` instead of `product_id`, and `product_price_point_handle` instead of `product_price_point_id`: ``` { "migration": { "product_handle": "silver-plan", "product_price_point_handle": "199" "include_trial": false, "include_initial_charge": false, "include_coupons": true, "preserve_period": true } } ``` ### Nested Preserve Period There's an alternative method to send the `preserve_period` key/value pair. Please note both published ways will work with the API: ``` { "migration": { "product_handle": "diversity_production_500k", "include_trial": false, "include_initial_charge": false, "include_coupons": true, "proration": { "preserve_period": true } } } ``` ## Failed Migrations One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to it's current product. Please be aware of this issue! public: true product-family-intro: id: product-family-intro name: Product Family Intro content: |- ## Product Family Intro Product Families house your products, components and coupons. They can be used to categorize products, product levels or service offerings to your Subscribers. ## Product Family Documentation Full documentation on how Product Families operate within the Chargify UI can be located [here](http://help.chargify.com/products/product-families.html). ## Product Family Attributes | name | The product family name | |-------------|--------------------------------| | handle | The product family API handle | | description | The product family description | ## Input Attributes (Create) | name | The product family name | |-------------|--------------------------------| | handle | The product family API handle | | description | The product family description | public: true subscriptions-preview-intro: id: subscriptions-preview-intro name: Subscriptions Preview Intro content: |- ## Subscription Preview The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation. ## Subscription Preview Documentation The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary. For more information, please see our documentation [here](http://help.chargify.com/subscriptions/subscription-summary.html#next-billing). ## Input Attributes A Subscription Preview is an object representing a proposed subscription’s initial assessment and first renewal, including discounts and taxes. You can retrieve it to see a snapshot of how much your customer will be charged if they complete their signup. For full information, please see our API documentation on how to [Create a Subscription](#endpoint:uw4BjXCFjTzSYYSaA). A `subscription_preview` object with a `current_billing_manifest` and a `next_billing_manifest` containing the following fields: | start_date | The timestamp for the beginning of the period covered by the manifest | |---------------------------|-----------------------------------------------------------------------------------------------------------------------------------| | end_date | The timestamp for the end of the period covered by the manifest | | period_type | The type of billing period: recurring for previews | | existing_balance_in_cents | An integer representing the amount of the subscription’s current balance. Will be zero since the subscription does not yet exist. | | subtotal_in_cents | An integer representing the amount of the total pre-tax, pre-discount charges that would be assessed | | total_discount_in_cents | An integer representing the amount of the coupon discounts that would be applied | | total_tax_in_cents | An integer representing the total tax charges that would be assessed | | total_in_cents | An integer representing the total amount owed, less any discounts, that would be assessed | | line_items | An array of objects representing the individual transactions that would be created for this subscription | ## Side effects A subscription will not be created by sending a POST to this endpoint. It is meant to serve as a prediction. ## Taxable Subscriptions This endpoint will preview taxes applicable to a purchase. In order for taxes to be previewed, the following conditions must be met: + Taxes must be configured on the subscription + The preview must be for the purchase of a taxable product or component, or combination of the two. + The subscription payload must contain a full billing or shipping address in order to calculate tax For more information about creating taxable previews, please see our documentation guide on how to create [taxable subscriptions.](https://help.chargify.com/taxes/avalara-managed-sales-tax.html#creating-taxable-subscriptions) ## Non-taxable Subscriptions If you'd like to calculate subscriptions that do not include tax, please feel free to leave off the billing information. public: true subscriptions-intro: id: subscriptions-intro name: Subscriptions Intro content: |- ## Subscriptions Intro Full documentation on how subscriptions operate within Chargify can be located under the following topics: + [Subscriptions Reference](https://help.chargify.com/subscriptions/subscription-intro.html) + [Subscriptions Actions](https://help.chargify.com/subscriptions/subscription-actions.html) + [Subscription Cancellation](https://help.chargify.com/subscriptions/cancellation.html) + [Subscription Reactivation](https://help.chargify.com/subscriptions/reactivation.html) + [Subscription Import](https://help.chargify.com/subscriptions/subscriptions-import.html) ## Subscription Input Attributes When creating a subscription, you must specify a product and a customer. Credit card details may be required, depending on the options for the Product being subscribed ([see Product Options](https://help.chargify.com/products/product-options.html)). The product may be specified by `product_id` or by `product_handle` (API Handle). An existing customer may be specified by a `customer_id` (ID within Chargify) or a `customer_reference` (unique value within your app that you have shared with Chargify via the reference attribute on a customer). A new customer may be created by providing `customer_attributes`. | product_handle | The API Handle of the product for which you are creating a subscription. Required, unless a `product_id` is given instead. | |--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------| | product_id | The Product ID of the product for which you are creating a subscription. The product ID is not currently published, so we recommend using the API Handle instead. | | product_price_point_id | The ID of the particular price point on the product. | | product_price_point_handle | The user-friendly API handle of a product's particular price point. | | customer_id | The ID of an existing customer within Chargify. Required, unless a `customer_reference` or a set of `customer_attributes` is given. | | customer_reference | The reference value (provided by your app) of an existing customer within Chargify. Required, unless a `customer_id` or a set of `customer_attributes` is given. | | reference | The reference value (provided by your app) for the subscription itelf. | | group | Group attributes including the target subscription with which to group the new subscription and optional billing attributes. | ### Customer Attributes | first_name | The first name of the customer. Required when creating a customer via attributes. | |--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | last_name | The last name of the customer. Required when creating a customer via attributes. | | email | The email address of the customer. Required when creating a customer via attributes. | | cc_emails | A list of emails that should be cc’d on all customer communications. Optional. | | organization | The organization/company of the customer. Optional. | | reference | A customer “reference”, or unique identifier from your app, stored in Chargify. Can be used so that you may reference your customer’s within Chargify using the same unique value you use in your application. Optional. | | vat_number | (Optional) Supplying the VAT number allows EU customer’s to opt-out of the Value Added Tax assuming the merchant address and customer billing address are not within the same EU country. It’s important to omit the country code from the VAT number upon entry. Otherwise, taxes will be assessed upon the purchase. | | address | (Optional) The customer’s shipping street address (i.e. “123 Main St.”). | | address_2 | (Optional) Second line of the customer’s shipping address i.e. “Apt. 100” | | city | (Optional) The customer’s shipping address city (i.e. “Boston”). | | state | (Optional) The customer’s shipping address state (i.e. “MA”). This must conform to the [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | | zip | (Optional) The customer’s shipping address zip code (i.e. “12345”). | | country | (Optional) The customer shipping address country, required in [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). | | phone | (Optional) The phone number of the customer. | | tax_exempt | (Optional) The tax_exempt status of the customer. Acceptable values are true or 1 for true and false or 0 for false. | ------------------ ## Payment Profile Attributes These attributes can be updated by sending a PUT request to the [payment profile](https://reference.chargify.com/v1/payment-profiles/update-the-payment-profile) endpoint. If you are creating a subscription with a payment profile, the attribute to send will be `credit_card_attributes` or `bank_account_attributes` for ACH and Direct Debit. That said, when you read the subscription after creation, we return the profile details under `credit_card` or `bank_account`. | payment_profile_id | The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id) | |----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | payment_profile_attributes | (this may also be referred to as `credit_card_attributes` or `bank_account_attributes`) | | first_name | (Optional) First name on card or bank account. If omitted, the first_name from customer attributes will be used. | | last_name | (Optional) Last name on card or bank account. If omitted, the last_name from customer attributes will be used. | | full_number | The full credit card number (string representation, i.e. `5424000000000015`) | | expiration_month | (Optional when performing a Subscription Import via `vault_token`, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. `5` | | expiration_year | (Optional when performing a Subscription Import via `vault_token`, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. `2012` | | cvv | (Optional, may be required by your gateway settings) The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | | billing_address | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing street address (i.e. `123 Main St.`). This value is merely passed through to the payment gateway. | | billing_address_2 | (Optional) Second line of the customer’s billing address i.e. `Apt. 100` | | billing_city | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. | | billing_state | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (i.e. `MA`). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | | billing_zip | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (i.e. `12345`). This value is merely passed through to the payment gateway. | | billing_country | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Please check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | | vault_token | (Optional, used only for Subscription Import) The “token” provided by your vault storage for an already stored payment profile | | customer_vault_token | (Optional, used only for Subscription Import) (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | | chargify_token | (Optional) Token received after sending billing informations using [chargify.js](). This token must be passed as a sole attribute of `payment_profile_attributes` (i.e. `tok_9g6hw85pnpt6knmskpwp4ttt`) | | current_vault | (Optional, used only for Subscription Import) The vault that stores the payment profile with the provided `vault_token`. May be `authorizenet`, `trust_commerce`, `payment_express`, `beanstream`, `braintree_blue`, `paypal`, `quickpay`, `eway`, `eway_rapid_std`, `stripe_connect`, 'square', `pin`, `wirecard`, `bpoint`, `firstdata`, `elavon`, `cybersource`, `paymill`, `litle` or `moneris`. | | last_four | (Optional, used only for Subscription Import) If you have the last 4 digits of the credit card number, you may supply them here so that we may create a masked card number (i.e. `XXXX-XXXX-XXXX-1234`) for display in the UI. **Last 4 digits are required for refunds in Auth.Net.** | | card_type | (Optional, used only for Subscription Import) If you know the card type (i.e. Visa, MC, etc) you may supply it here so that we may display the card type in the UI. May be `visa`, `master`, `discover`, `american_express`, `diners_club`, `jcb`, `switch`, `solo`, `dankort`, `maestro`, `forbrugsforeningen`, or `laser` | | bank_name | (Required when creating a subscription with ACH) The name of the bank where the customer’s account resides | | bank_routing_number | (Required when creating a subscription with ACH) The routing number of the bank | | bank_account_number | (Required when creating a subscription with ACH) The customer’s bank account number | | payment_method_nonce | (Required for Square unless importing with vault_token and customer_vault_token) The nonce generated by the Square Javascript library (SqPaymentForm) | | gateway_handle | (Optional) This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. `gateway_handle` is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [MultiGateway description](https://help.chargify.com/payment-gateways/gateway-configuration.html#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed. | ## Payment Profile Attributes: GoCardless | bank_name | (Required when creating a subscription with ACH or GoCardless). The name of the bank where the customerʼs account resides | |---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | bank_iban | (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided | | bank_routing_number | (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API | | bank_account_number | (Required when creating a subscription with ACH. Required when creating a subscription with GoCardless and bank_iban is blank) The customerʼs bank account number | | bank_branch_code | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided | -------- ## Subscription Attributes | cancellation_message | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to make a note about the reason for cancellation. | |---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | cancellation_method | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to make a note about how the subscription was canceled. | | reason_code | (Optional) Can be used when canceling a subscription (via the HTTP DELETE method) to indicate why a subscription was canceled. | currency | (Optional) If Multi-Currency is enabled and the currency is configured in Chargify, pass it at signup to create a subscription on a non-default currency. Note that you cannot update the currency of an existing subscription. | next_billing_at | (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscriptions import documentation](https://help.chargify.com/subscriptions/subscriptions-import.html). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by `next_billing_at`. If you do not provide a value for `next_billing_at`, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions. | | expires_at | Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period. | | expiration_tracks_next_billing_change | (Optional, default false) When set to `true`, and when next_billing_at is present, if the subscription expires, the expires_at will be shifted by the same amount of time as the difference between the old and new “next billing” dates. | | coupon_code | (Optional) The coupon code of the coupon to apply ([See the coupon docs](#endpoint:YFHw4XRYxaqLwGNvk)) | | payment_collection_method | (Optional) The type of payment collection to be used in the subscription. May be automatic, invoice, remittance, or prepaid. | | agreement_terms | (Optional) The ACH authorization agreement terms. If enabled, an email will be sent to the customer with a copy of the terms. | | authorizer_first_name | (Optional) The first name of the person authorizing the ACH agreement. | | authorizer_last_name | (Optional) The last name of the person authorizing the ACH agreement. | | product_change_delayed | (Optional, used only for [Delayed Product Change](#endpoint:4D8tKPkKC3So5X6qs) When set to true, indicates that a changed value for product_handle should schedule the product change to the next subscription renewal. | | calendar_billing | (Optional, see [Calendar Billing](#https://help.chargify.com/subscriptions/billing-dates.html#calendar-billing) for more details). Cannot be used when also specifying `next_billing_at` | | snap_day | A value between `1` and `28`, or `end` | | calendar_billing_first_charge | (Optional) One of “prorated” (the default – the prorated product price will be charged immediately), “immediate” (the full product price will be charged immediately), or “delayed” (the full product price will be charged with the first scheduled renewal). | | receives_invoice_emails | (Optional) Default: True - Whether or not this subscription is set to receive emails related to this subscription. | | net_terms | (Optional) Default: null The number of days after renewal (on invoice billing) that a subscription is due. A value between 0 (due immediately) and 180. | | stored_credential_transaction_id | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | ------------------ | metafields | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | |--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ref | A valid referral code. (optional, [see Referrals](https://help.chargify.com/referrals/introduction.html) for more details). If supplied, must be valid, or else subscription creation will fail. | | components | (Optional) An array of component ids and quantities to be added to the subscription. See examples below and [Product Components](https://help.chargify.com/products/product-components.html) for more information. | | component_id | | | allocated_quantity | or `unit_balance` or enabled | public: true external-refunds-intro: id: external-refunds-intro name: Refunds - External Intro (Legacy) content: |- ## Refunds - External Intro If you are using the modern Relationship Invoicing feature, see the [corresponding invoicing docs](#endpoint:fS5WvuG5ByqjTzG6C). Attempting to use this endpoint on a Relationship Invoicing site will return a 403. Use this endpoint to record refunds done outside of Chargify, such as directly at the gateway or by sending a check to the subscriber. | amount | The amount represented as a string with two decimal places, for example 14.50. | |-----------------|--------------------------------------------------------------------------------------------------------------| | amount_in_cents | The amount represented as a string in cents. For example if the refund was for $14.50, you would pass `1450` | | memo | A description of why the refund occured | Note that external refunds will reduce revenue, but they do not affect the balance due for the subscription. ## Refunds Documentation Full documentation on how to apply a refund in the Chargify UI can be located [here](http://help.chargify.com/subscriptions/refunds.html). ## External Refunds versus Refunds It's important to note that 2 types of refunds can be created via the API. + [Refunds](#docTextSection:PdfZnp5bXtPjCr7Qg) interact with the Merchant's gateway and return funds directly to the Subscriber's bank. + External refunds log a refund against the Subscriber's entry in Chargify. No funds are returned to the subscriber's bank account. ## External Refund Use Case The use case for this type of refund is as follows: + You have a gateway that does not do **direct** refunds back to a Subscribers's bank account + To process a refund, you process the refund **through** your gateway account. + Afterwards, record the refund within Chargify public: true products-intro: id: products-intro name: Products Intro content: |- ## Products Intro Use the products endpoint to manage your products inventory within your Chargify Site. ## Product Documentation Full documentation on how to use Notes in the Chargify UI can be located [here](http://help.chargify.com/subscriptions/subscription-summary.html#notes). + [Products Documentation](http://help.chargify.com/products/products-intro.html) + [Changing a Subscription's Product](http://help.chargify.com/subscriptions/subscription-summary.html#product) ## Product Attributes All of the product attribute fields are returned from GET (read) operations. | price_in_cents | The product price, in integer cents | |--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | name | The product name | | handle | The product API handle | | description | The product description | | product_family | Nested attributes pertaining to the product family to which this product belongs | | name | The product family name | | handle | The product family API handle | | accounting_code | The product family accounting code (has no bearing in Chargify, may be used within your app) | | description | The product family description | | interval_unit | A string representing the interval unit for this product, either `month` or `day` | | interval | The numerical interval. i.e. an interval of ‘30’ coupled with an `interval_unit` of `day` would mean this product would renew every 30 days | | initial_charge_in_cents | The up front charge you have specified. | | trial_price_in_cents | The price of the trial period for a subscription to this product, in integer cents. | | trial_interval | A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | | trial_interval_unit | A string representing the trial interval unit for this product, either month or day | | expiration_interval | A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | | expiration_interval_unit | A string representing the trial interval unit for this product, either month or day | | version_number | The version of the product | | update_return_url | The url to which a customer will be returned after a successful account update | | update_return_params | The parameters will append to the url after a successful account update. See [Return URLs and Parameters](https://help.chargify.com/products/product-options.html#return-url-and-parameters) | | require_credit_card | Boolean that controls whether a payment profile is required to be entered for customers wishing to sign up on this product. | | request_credit_card | Deprecated boolean that is only relevant for those with legacy hosted pages. For Public Signup Page users, please read this attribute from under the signup page. | | created_at | Timestamp indicating when this product was created | | updated_at | Timestamp indicating when this product was last updated | | archived_at | Timestamp indicating when this product was archived | | public_signup_pages | An array of signup pages containing the following 4 attributes: | | id | The id of the signup page (`public_signup_pages` only) | | url | The url where the signup page can be viewed (`public_signup_pages` only) | | return_url | The url to which a customer will be returned after a successful signup (`public_signup_pages` only) | | return_params | The params to be appended to the return_url (`public_signup_pages` only) | | request_billing_address | A boolean indicating whether to request a billing address on any Self-Service Pages that are used by subscribers of this product. | | require_billing_address | A boolean indicating whether a billing address is required to add a payment profile, especially at signup. | | require_shipping_address | A boolean indicating whether a shipping address is required for the customer, especially at signup. | | tax_code | A string representing the tax code related to the product type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters. | public: true statements-intro: id: statements-intro name: Statements Intro content: |- ## Statements Intro Chargify Statements give you and your customers a breakdown of Subscription charges, payments, credits, and activity on a period-by-period basis. A Statement is similar to an “Invoice” because it is marked as currently paid or unpaid. Statements display all account activity for a specific usage period. ## Statements Documentation Documentation for Statements in the Chargify UI can be accessed via the following links / topics: + [Statements Reference](http://help.chargify.com/statements/statements-intro.html) + [Viewing Statements](http://help.chargify.com/subscriptions/subscription-summary.html#statements) + [Statement Settings](http://help.chargify.com/settings/statements.html) ## Statement Presentation The Statements API offers three ways to easily render a statement on your site. You can include a text representation of the statement or one of two HTML views that can be styled to your liking. | text_view | A text representation of the statement | |-----------------|----------------------------------------------------| | basic_html_view | A simple HTML representation of the statement | | html_view | A more robust HTML representation of the statement | Rendering individual statements can also be done as PDF by using the Accept/Content-Type header application/pdf or appending .pdf as the `` portion of the URL. ## Statement Output Attributes All of the statement attribute fields are returned from GET (read) operations. Note, all of these attributes are read only. | id | The unique identifier for this statement within Chargify | |-----------------------------|------------------------------------------------------------------------------------| | subscription_id | The unique identifier of the subscription associated with the statement | | opened_at | The date that the statement was opened | | closed_at | The date that the statement was closed | | settled_at | The date that the statement was settled | | text_view | A text representation of the statement | | basic_html_view | A simple HTML representation of the statement | | html_view | A more robust HTML representation of the statement | | future_payments | A collection of payments from future statements that pay charges on this statement | | starting_balance_in_cents | The subscription’s balance at the time the statement was opened | | ending_balance_in_cents | The subscription’s balance at the time the statement was closed | | total_in_cents | The total amount billed | | customer_first_name | The customer’s first name | | customer_last_name | The customer’s last name | | customer_organization | The customer’s organization | | customer_shipping_address | The customer’s shipping address | | customer_shipping_address_2 | The customer’s shipping address, line 2 | | customer_shipping_city | The customer’s shipping city | | customer_shipping_state | The customer’s shipping state | | customer_shipping_country | The customer’s shipping country | | customer_shipping_zip | The customer’s shipping zip | | customer_billing_address | The customer’s billing address | | customer_billing_address_2 | The customer’s billing address, line 2 | | customer_billing_city | The customer’s billing city | | customer_billing_state | The customer’s billing state | | customer_billing_country | The customer’s billing country | | customer_billing_zip | The customer’s billing zip | | customer_tax_exempt | The customer's tax exempt status | | transactions | A collection of the transaction objects associated with the statement | | events | A collection of the event objects associated with the statement | | created_at | The creation date for this statement | | updated_at | The date of last update for this statement | public: true refunds-intro: id: refunds-intro name: Refunds Intro (Legacy) content: |- ## Refunds Intro If you are using the modern Relationship Invoicing feature, see the [corresponding invoicing docs](#endpoint:fS5WvuG5ByqjTzG6C). Attempting to use this endpoint on a Relationship Invoicing site will return a 403. With Chargify you have the ability to apply a refund to a payment that has been processed at the gateway. Refunds made through the methods depicted below will interact with the Gateway. For more information on creating refunds in general, please see [Refunds](https://help.chargify.com/subscriptions/refunds.html). ## Refunds Documentation Full documentation on how to apply a refund in the Chargify UI can be located [here](http://help.chargify.com/subscriptions/refunds.html). ## Supported Gateways Refunds are only supported for the following gateways: + Authorize.Net + Braintree Blue + CyberSource + Elavon + eWay Rapid + Litle + Moneris + Orbital + Payeezy (First Data) + Pin Payments + Payment Express + Paymill + QuickPay + Stripe + Trust Commerce ## Refund Input Attributes In order to create a refund, you must pass an a payment id, amount and a memo. The amount can be specified by either the amount parameter or the amount_in_cents parameter. | payment_id | (required) The id of the Payment that the credit will be applied to | |-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | amount | (either ‘amount’ or ‘amount_in_cents’ is required) If you use this parameter, you should pass a dollar amount represented as a string. For example, $10.00 would be represented as `10.00`. | | amount_in_cents | (either ‘amount’ or ‘amount_in_cents’ is required) If you use this parameter, you should pass the amount represented as a number of cents, either as a string or integer. For example, $10.00 would be represented as `1000`. If you pass a value for both ‘amount’ and ‘amount_in_cents’, the value in ‘amount_in_cents’ will be used and ‘amount’ will be discarded. | | memo | (required) A helpful explanation for the refund. This amount will remind you and your customer for the reason for the refund. | ## Refund Output Attributes When a refund is successfully created, a representation of the newly created refund will be returned to you as JSON or XML in the message body, with the following attributes: | id | The id of the created refund | |-----------------|----------------------------------------------------------------------| | success | Either `true` or `false`, depending on the success of the refund. | | amount_in_cents | The amount of the refund and captured payment, represented in cents. | | memo | The memo for the created refund. | ## Response Codes A response code is returned in the standard HTTP response to your API request. | 201 Created | Returned for successfully created refunds. | |--------------------------|-----------------------------------------------------------------------------| | 422 Unprocessable Entity | Returned when the refund could not be created (see below section on errors) | | 404 Not Found | Returned if the referenced subscription or payment could not be found. | ## Errors Errors are returned either as an array of error explanation strings and formatted as either an XML or JSON array, depending on your Accept headers. The listing of currently possible error messages is listed below: + Memo: cannot be blank. + Amount: is not a number. + Amount: must be greater than or equal to 0. + Gateway response if a gateway fail featuring "[Your original memo]" public: true subscriptions-override-intro: id: subscriptions-override-intro name: Subscriptions Override Intro content: |- ## Subscription Override Intro This API endpoint allows you to set certain subscription fields that are usually managed for you automatically. Some of the fields can be set via the normal Subscriptions Update API, but others can only be set using this endpoint. This endpoint is provided for cases where you need to “align” Chargify data with data that happened in your system, perhaps before you started using Chargify. For example, you may choose to import your historical subscription data, and would like the activation and cancellation dates in Chargify to match your existing historical dates. Chargify does not backfill historical events (i.e. from the Events API), but some static data can be changed via this API. Why are some fields only settable from this endpoint, and not the normal subscription create and update endpoints? Because we want users of this endpoint to be aware that these fields are usually managed by Chargify, and using this API means **you are stepping out on your own.** ## Subscriptions Override Documentation There is no current complimentary documentation for this endpoint. ## Fields That Can Be Manipulated | activated_at | Can be used to record an external signup date. Chargify uses this field to record when a subscription first goes active (either at signup or at trial end) | |----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | canceled_at | Can be used to record an external cancellation date. Chargify sets this field automatically when a subscription is canceled, whether by request or via dunning. | | cancellation_message | Can be used to record a reason for the original cancellation. | | expires_at | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. | | current_period_starts_at | Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed must be before the current date and time. Allows you to set when the period started so mid period component allocations have the correct proration. No other fields are currently available. Attempting to set any other fields will cause a `400 Bad Request` response. You only need to send the fields you would like to change. Note that changing these fields will not affect any other attributes. For example, adding an expiration date will not affect the next assessment date on the subscription. Note that if you regularly need to override the current_period_starts at for new subscriptions, this can also be accomplished by setting both `previous_billing_at` and `next_billing_at` at subscription creation. See the documentation on [Importing Subscriptions](https://reference.chargify.com/v1/subscriptions-import/importing-subscriptions) for more information. The fields should be nested beneath a `subscription` key – see the examples below for more information. ## Headers + `Accept`: set to either `application/json` or `application/xml` depending on the top of response you desire + `Content-Type`: set to either `application/json` or `application/xml` depending on the top of request body you send public: true referrals-intro: id: referrals-intro name: Referrals Intro content: |- ## Referrals Intro You can verify if a referral code is valid using the `validate` method. This method is useful for validating referral codes that are entered by a customer. ## Referrals Documentation Full documentation on how to use the referrals feature in the Chargify UI can be located [here](http://help.chargify.com/referrals/introduction.html). ## Server Response If the referral code is valid the status code will be `200` and the referral code will be returned. If the referral code is invalid, a `404` response will be returned. public: false overview: id: overview name: Overview content: |- ## API Overview The Chargify API allows you to interact with our system programmatically from your own application. Using the API you interact with Resources such as: - Products - Subscriptions - Customers - etc. The API attempts to conform to the [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) design principles. You interact with the resources exposed via the API by accessing resource collection and element URIs using the HTTP verbs (GET, POST, PUT, and DELETE). Chargify accepts and returns both JSON and XML data via the API. You’ll likely need access to a web developer or programmer (if you’re not one) to get the most use out of the API. ## Available Formats: JSON and XML JSON is the primary and recommended format for use with the Chargify API. XML is also provided as a backwards compatible option for Merchants who require it. ## Authentication Authentication is implemented as HTTP Basic Authentication over TLS >= 1.2 (HTTPS), as described in [API Authentication](https://developer.chargify.com/content/getting-started/authentication.html) ## URL The URL for API requests includes the subdomain of the Site you are working with: `https://.chargify.com/` ## Response Data Response data is sent as either XML or JSON, depending on the type of data requested (`HTTP Content-Type` header) or the type specified as being accepted (HTTP `Accept` header). GETs for individual statements & invoices may also be requested as PDF using `application/pdf` or appending `.pdf` to the resource URI. Response codes are sent via the normal HTTP Response Code, and are documented separately for each resource. For boolean fields, please note that a value of `null` may be considered as false. However, this is not true across all cases. Please excercise good judgement here, or contact support with any questions. For example: + `null` can define that there's no data available for that attribute ## Pagination When an endpoint returns a list of items, it will be paginated. Usually, 20 items will be returned by default, and you may request up to a maximum of 200 at a time. Pagination is done with query string parameters, for example: `?page=5&per_page=200` ## Response Time Zones API responses from Chargify are sent with the timezone of current Chargify site. Alternately, webhooks sent from Chargify globally utilize EST as the timezone for all content in the body of the payload. ## Request Data POST and PUT request data may be formatted as either XML (`application/xml`) or JSON (`application/json`). For best results, you should set your HTTP `Content-Type` request header accordingly, although you may also specify your format by appending `.xml` or `.json` extensions on to the resource URI. Note that Chargify does not accept PUT or POST data sent as query params or form encoded data – data must be sent as either XML or JSON. If you fail to set your `Content-Type` to either `application/xml` or `application/json`, your request may fail due to triggering of forgery protection mechanisms. ## Debugging If you’re having difficulty executing a request via our API, try the simplest thing and attempt your request via the curl command-line tool, as shown in the below example. Add the `--verbose` flag to your request to receive even more debugging information. Another handy tool is [Beeceptor](https://beeceptor.com/). You can use this to intercept your request to see exactly what is being sent. If you are unable to connect at all, check that you are using TLS 1.2 or better. If you see a "Could not resolve host" error, double check that the url is correct, including your subdomain. For example: `mysite.chargify.com`. This error means your DNS server could not find an IP address for the domain you are trying to connect to. ## Backwards Compatibility We consider the following changes to be backwards compatible and may make them without advance notice: + Adding new API endpoints, or adding new attributes in the responses of existing endpoints + Adding new optional parameters to be sent to existing API endpoints + Adding new fields to exported data + Changing the type or length of any of the ID attributes + For example, most IDs are currently integers, but you should not assume that this will always be the case. In addition, you should not depend on the order of attributes within the API response as this may change. Chargify does not provide notifications for additions that are clearly defined as backwards compatible. ## Examples The following examples use the curl command-line tool to execute API requests. ### Subscription Listing **Request** curl -u :x -H Accept:application/json -H Content-Type:application/json https://acme.chargify.com/subscriptions.json **Response** #model:Tcuta2tXRrTZEthBL public: true importing-subscriptions: id: importing-subscriptions name: Subscriptions Import content: "## Subscriptions Import Intro\n\nSubscriptions can be “imported” via the API to handle the following scenarios:\n\n+ You already have existing subscriptions with specific start and renewal dates that you would like to import to Chargify\n+ You already have credit cards stored in your provider’s vault and you would like to create subscriptions using those tokens\n\nBefore importing, you should have already set up your products to match your offerings. Then, you can create Subscriptions via the API just like you normally would, but using a few special attributes.\n\n## Subscriptions Import Documentation\n\nFull documentation on how import Subscriptions using the **import tool** in the Chargify UI can be located [here](https://help.chargify.com/subscriptions/subscriptions-import.html).\n\n## Adding components during import\n\nComponents may also be included in the import. See [Product Components](#docTextSection:EseRiQJY4GMtnkfyR) for more information.\n\n## Subscription Input Attributes\n\nThe following _additions_ to the subscription input attributes make imports possible.\n\n| next_billing_at \t| Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscriptions import documentation](https://help.chargify.com/subscriptions/subscriptions-import.html). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. \t|\n|---------------------\t|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\t|\n| previous_billing_at \t| Providing a previous_billing_at that is in the past will set the `current_period_starts_at` when the subscription is created. It will also set `activated_at` if not explicitly passed during the subscription import. Can only be used if `next_billing_at` is also passed. Using this option will allow you to set the period start for the subscription so mid period component allocations have the correct prorated amount. \t|\n| import_mrr \t| Optional. Setting this attribute to `true` will cause the subscription's MRR to be added to your MRR analytics immediately. For this value to be honored, a `next_billing_at` must be present and set to a future date. This key/value will not be returned in the subscription response body. \t|\n\n## Payment Profile Attributes\n\n+ `payment_profile_attributes`\n\n| vault_token | the “token” provided by your vault storage for an already stored payment profile |\n|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| customer_vault_token | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token |\n| current_vault | the vault that stores the payment profile with the provided vault_token. May be `authorizenet`, `trust_commerce`, `payment_express`, `beanstream`, `braintree_blue` (see additional notes on Braintree Blue, below), `quickpay`, `eway`, `eway_rapid_std`, `stripe_connect`, or `wirecard` |\n| last_four | (optional): If you have the last 4 digits of the credit card number, you may supply them here so that we may create a masked card number (i.e. ‘XXXX-XXXX-XXXX-1234’) for display in the UI. **Last 4 digits are required for refunds in Auth.Net.** |\n| card_type | (optional): If you know thecard type (i.e. Visa, MC, etc) you may supply it here so that we may display the card type in the UI. May be `visa`, `master`, `discover`, `american_express`, `diners_club`, `jcb`, `switch`, `solo`, `dankort`, `maestro`, `forbrugsforeningen`, or `laser` |\n\n## Payment Profile Attributes vs Credit Card Attributes\n\n`payment_profile_attributes` are the same thing as `credit_card_attributes` used elsewhere in the documentation. The two keys are interchangeable, pick one to use but not both. Most new documentation will refer to `payment_profile_attributes` \n\n## Current Vault\n\nIf you are using a Legacy gateway such as \"eWAY Rapid (Legacy)\" or \"Stripe (Legacy)\" then please contact Support for further instructions on subscription imports.\n\n## Braintree Blue (Braintree v2) Imports\n\nBraintree Blue is Braintree’s newer (version 2) API. For this gateway, please provide the `vault_token` parameter with the value from Braintree’s “Customer ID” rather than the “Payment Profile Token”. At this time we do not use `current_vault_token` with the Braintree Blue gateway, and we only support a single payment profile per Braintree Customer.\n\nWhen importing PayPal type payment profiles, please set `payment_type` to `paypal_account`.\n\n## Webhooks During Import\n\nIf no `next_billing_at` is provided, webhooks will be fired as normal. If you do set a future `next_billing_at`, only a subset of the webhooks are fired when the subscription is created. Keep reading for more information as to what webhooks will be fired under which scenarios.\n\n### Successful creation with Billing Date\n\nScenario: If `next_billing_at` provided\n\n+ `signup_success`\n+ `billing_date_change`\n\n### Successful creation without Billing Date\n\nScenario: If no `next_billing_at` provided\n\n+ `signup_success`\n+ `payment_success`\n\n### Unsuccessful creation\n\nScenario: If card can’t be charged, and no `next_billing_at` provided\n\n+ signup_failure\n\n### Webhooks fired when next_billing_at is reached:\n\n+ `renewal_success or renewal_failure`\n+ `payment_success or payment_failure`\n\n### Date and Time Formats\n\nWe will attempt to parse any string you send as the value of next_billing_at in to a date or time. For best results, use a known format like described in “Date and Time Specification” of RFC 2822 or ISO 8601 .\n\nThe following are all equivalent and will work as input to `next_billing_at`:\n\n```\nAug 06 2030 11:34:00 -0400\nAug 06 2030 11:34 -0400\n2030-08-06T11:34:00-04:00\n8/6/2030 11:34:00 EDT\n8/6/2030 8:34:00 PDT\n2030-08-06T15:34:00Z\n```\nYou may also pass just a date, in which case we will assume the time to be noon\n\n```\n2010-08-06\n```" public: true webhooks-intro: id: webhooks-intro name: Webhooks Intro content: |- ## Webhooks Intro The Webhooks API allows you to view a list of all webhooks and to selectively resend individual or groups of webhooks. Webhooks will be sent on endpoints specified by you. Endpoints can be added via API or Web UI. There is also an option to enable / disable webhooks via API request. ## Webhooks Documentation We recommend that you review Chargify's webhook documentation located in our help site. The following resources will help guide you on how to use webhooks in Chargify, in addition to these webhook endpoints: + [Adding/editing new webhooks](https://help.chargify.com/settings/webhooks.html) + [Webhooks introduction and delivery information](https://help.chargify.com/webhooks/introduction.html) + [Main webhook overview](https://help.chargify.com/webhooks/webhooks-reference.html) + [Available webhooks and payloads](https://help.chargify.com/webhooks/webhooks-reference.html#example-payloads) ## Webhook Attributes |
**Attribute**
| **Description** | |---------------|-----------------| |`id`| The unique identifier for the webhooks (unique across all of Chargify). This is not changed on a retry/replay of the same webhook, so it may be used to avoid duplicate action for the same event. |`successful`| A boolean flag describing whether the webhook was accepted by the webhook endpoint for the most recent attempt. (Acceptance is defined by receiving a “200 OK” HTTP response within a reasonable timeframe, i.e. 15 seconds) |`event` | A string describing which event type produced the given webhook |`body` | The data sent within the webhook post |`signature` | The calculated webhook signature |`signature_hmac_sha_256` | The calculated HMAC-SHA-256 webhook signature |`created_at` | Timestamp indicating when the webhook was created |`accepted_at` | Timestamp indicating when the webhook was accepted by the merchant endpoint. When a webhook is explicitly replayed by the merchant, this value will be cleared until it is accepted again. |`last_sent_at` | Timestamp indicating when the most recent attempt was made to send the webhook | `last_error_at` | Timestamp indicating when the last non-acceptance occurred. If a webhook is later resent and accepted, this field will be cleared. | `last_sent_url` | The url that the endpoint was last sent to. | `last_error` | Text describing the status code and/or error from the last failed attempt to send the Webhook. When a webhook is retried and accepted, this field will be cleared. ## Endpoint Attributes |**Attribute** | **Description** | |----------|-------------| | `id` | The unique identifier for resource. Use this id to update an endpoint. | | `url` | Your API url of the webhook integration. | | `site_id`| ID of your site in Chargify. | | `status` | A boolean flag describing wheter endpoint is disabled or enabled. | | `webhooks_subscriptions` | An array of subscribed events keys, each key is a string (e.g. `payment_success`). Visit [Webhook reference](https://help.chargify.com/webhooks/webhooks-reference.html) to learn more. public: true reason-code-intro: id: reason-code-intro name: Reason Code / Churn Code Intro content: |- ## ReasonCodes Intro ReasonCodes are a way to gain a high level view of why your customers are cancelling the subcription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Chargify Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. ## ReasonCode Documentation Full documentation on how Reason Codes operate within Chargify can be located under the following links. [Churn Reason Codes](http://help.chargify.com/subscriptions/cancellation.html#churn-reason-codes) public: true subscription-output-attributes: id: subscription-output-attributes name: Subscription Output Attributes content: |- ## Subscription Output Attributes The following attributes are returned on a subscription read/list operation. | id | The subscription unique id within Chargify. | |---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | state | The current state of the subscription. Please see the documentation for [Subscription States](https://help.chargify.com/subscriptions/subscription-states.html) | | trial_started_at | Timestamp for when the trial period (if any) began | | trial_ended_at | Timestamp for when the trial period (if any) ended | | activated_at | (Read Only) Timestamp for when the subscription began (i.e. when it came out of trial, or when it began in the case of no trial) | | created_at | The creation date for this subscription | | updated_at | The date of last update for this subscription | | expires_at | Timestamp giving the expiration date of this subscription (if any) | | balance_in_cents | Gives the current outstanding subscription balance in the number of cents. | | current_period_ends_at | Timestamp relating to the end of the current (recurring) period (i.e.,when the next regularly scheduled attempted charge will occur) | | next_assessment_at | Timestamp that indicates when capture of payment will be tried or,retried. This value will usually track the `current_period_ends_at`, but,will diverge if a renewal payment fails and must be retried. In that,case, the `current_period_ends_at` will advance to the end of the next,period (time doesn’t stop because a payment was missed) but the,`next_assessment_at` will be scheduled for the auto-retry time (i.e. 24,hours in the future, in some cases) | | canceled_at | The timestamp of the most recent cancellation | | cancellation_message | Seller-provided reason for, or note about, the cancellation. | | next_product_id | If a delayed product change is scheduled, the ID of the product that the subscription will be changed to at the next renewal. | | next_product_handle | If a delayed product change is scheduled, the handle of the product that the subscription will be changed to at the next renewal. | | cancel_at_end_of_period | Whether or not the subscription will (or has) canceled at the end of the period. | | payment_collection_method | The type of payment collection to be used in the subscription. May be automatic, or invoice. | | snap_day | The day of the month that the subscription will charge according to calendar billing rules, if used. | | cancellation_method | The process used to cancel the subscription, if the subscription has been canceled. Can be one of `nil`, `merchant_ui`, `merchant_api`, `dunning`, or `billing_portal`. It is `nil` if the subscription's state is not `canceled`. | | current_period_started_at | Timestamp relating to the start of the current (recurring) period | | previous_state | Only valid for webhook payloads The previous state for webhooks that have indicated a change in state. For normal API calls, this will always be the same as the state (current state) | | signup_payment_id | The ID of the transaction that applied at signup | | signup_revenue | The total amount of payment, formatted as a string of decimal separated dollars and,cents, from the subscription signup ($50.00 would be formatted as,`50.00`) | | delayed_cancel_at | Timestamp for when the subscription is currently set to cancel. | | coupon_code | (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon. | | total_revenue_in_cents | Gives the total payments from the subscription in the number of cents. This value is not strictly revenue. | | product_price_in_cents | (Added Nov 5 2013) The recurring amount of the product (and version),currently subscribed. NOTE: this may differ from the current price of,the product, if you’ve changed the price of the product but haven’t,moved this subscription to a newer version. | | product_version_number | The version of the product for the subscription. Note that this is a deprecated field kept for backwards-compatibility. | | payment_type | The payment profile type for the active profile on file. | | referral_code | The subscription's unique code that can be given to referrals. | | coupon_use_count | (deprecated) How many times the subscription's single coupon has been used. This field has no replacement for multiple coupons.| | coupon_uses_allowed | (deprecated) How many times the subscription's single coupon may be used. This field has no replacement for multiple coupons. | | reason_code | If the subscription is canceled, this is their churn code. | automatically_resume_at | The date the subscription is scheduled to automatically resume from the on_hold state. | | coupon_codes | An array for all the coupons attached to the subscription. | | offer_id | The ID of the offer associated with the subscription. | | payer_id | On Relationship Invoicing, the ID of the individual paying for the subscription. Defaults to the Customer ID unless the 'Customer Hierarchies & WhoPays' feature is enabled. | current_billing_amount_in_cents | The balance in cents plus the estimated renewal amount in cents. | | receives_invoice_emails | (Optional) Default: True - Whether or not this subscription is set to receive emails related to this subscription. | | product_price_point_id | The product price point currently subscribed to. | | next_product_price_point_id | If a delayed product change is scheduled, the ID of the product price point that the subscription will be changed to at the next renewal. | | net_terms | On Relationship Invoicing, the number of days before a renewal invoice is due. | | stored_credential_transaction_id | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | | reference | The reference value (provided by your app) for the subscription itelf. | | on_hold_at | The timestamp of the most recent on hold action. | | prepaid_dunning | Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled | ### Group Attributes `group` will only be returned on Relationship Invoicing sites. If the subscription is not in a group, `group` will explicitly return as null. Otherwise, it will return the following information: | uid | The UID for the group | |----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | scheme | Whether the group is configured to rely on a primary subscription for billing. At this time, it will always be 1. See [the hierarchies & WhoPays section](#docTextSection:TXgzpkexh7gg7tnn2) for more information. | | primary_subscription_id | The subscription ID of the primary within the group. Applicable to scheme 1. | | primary | A boolean indicating whether the subscription is the primary in the group. Applicable to scheme 1. | ### Credit Card Attributes + `credit_card` Nested credit card attributes, if payment profile is a credit_card | billing_address | The current billing street address for the card | |----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | billing_address_2 | The current billing street address, second line, for the card | | billing_city | The current billing address city for the card | | billing_state | The current billing address state for the card | | billing_zip | The current billing address zip code for the card | | billing_country | The current billing address country for the card | | card_type | The type of card used. Can be one of the following: `bogus`, `visa`, `master`, `discover`, `american_express`, `diners_club`, `jcb`, `switch`, `solo`, `dankort`, `maestro`, `forbrugsforeningen`, `laser` | | current_vault | The vault that stores the payment profile with the provided `vault_token`. May be one of the following: `authorizenet`, `trust_commerce`, `payment_express`, `beanstream`, `braintree_blue`, `paypal`, `quickpay`, `eway`, `stripe`, `wirecard` | | customer_id | The Chargify-assigned id for the customer record to which the card belongs | | customer_vault_token | (only for Authorize.Net CIM storage): the `customerProfileId` for the owner of the `customerPaymentProfileId` provided as the `vault_token` | | expiration_month | An integer representing the expiration month of the card(1 – 12) | | expiration_year | An integer representing the 4-digit expiration year of the card(i.e. ‘2012’) | | id | The Chargify-assigned ID of the stored card. This value can be used as an input to `payment_profile_id` when creating a subscription, in order to re-use a stored payment profile for the same customer | | first_name | The first name of the card holder | | last_name | The last name of the card holder | | masked_card_number | A string representation of the credit card number with all but the last 4 digits masked with X’s (i.e. ‘XXXX-XXXX-XXXX-1234’) | | vault_token | The “token” provided by your vault storage for an already stored payment profile | | chargify_token | Token received after sending billing informations using [chargify.js](). This token will only be received if passed as a sole attribute of `credit_card_attributes` (i.e. `tok_9g6hw85pnpt6knmskpwp4ttt`) | ### Bank Account Attributes + `bank_account` Nested bank account attributes, if payment profile is a `bank_account` | bank_account_holder_type | Defaults to personal | |----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | bank_account_type | Defaults to checking | | bank_name | The bank where the account resides | | billing_address | The current billing street address for the bank account | | billing_address_2 | The current billing street address, second line, for the bank account | | billing_city | The current billing address city for the bank account | | billing_state | The current billing address state for the bank account | | billing_zip | The current billing address zip code for the bank account | | billing_country | The current billing address country for the bank account | | current_vault | The vault that stores the payment profile with the provided `vault_token`. Can be `authorizenet` or `stripe` | | customer_id | The Chargify-assigned id for the customer record to which the bank account belongs | | customer_vault_token | (only for Authorize.Net CIM storage): the `customerProfileId` for the owner of the `customerPaymentProfileId` provided as the `vault_token` | | first_name | The first name of the bank account holder | | last_name | The last name of the bank account holder | | id | The Chargify-assigned ID of the stored bank account. This value can be used as an input to `payment_profile_id` when creating a subscription, in order to re-use a stored payment profile for the same customer | | masked_bank_account_number | A string representation of the stored bank account number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’) | | masked_bank_routing_number | A string representation of the stored bank routing number with all but the last 4 digits marked with X’s (i.e. ‘XXXXXXX1111’). `payment_type` will be bank_account | | vault_token | The “token” provided by your vault storage for an already stored payment profile | | chargify_token | Token received after sending billing informations using [chargify.js](). This token will only be received if passed as a sole attribute of `credit_card_attributes` (i.e. `tok_9g6hw85pnpt6knmskpwp4ttt`) | public: true offers-introduction: id: offers-introduction name: Offers Introduction content: |- ## Offers Intro Offers allow you to package complicated combinations of products, components and coupons into a convenient package which can then be subscribed to just like products. Once an offer is defined it can be used as an alternative to the product when creating subscriptions. ## Offers Documentation Full documentation on how to use offers in the Chargify UI can be located [here](https://help.chargify.com/offers/offers-introduction.html). public: true api-access-limitations: id: api-access-limitations name: API Access Limitations content: |- ## API Access Limitations There are a few scenarios that may end up in causing an API request to be blocked even with correct credentials. **Please note:** All relevant API requests will be blocked if any of the below conditions are true. These limitations also apply to [Chargify Direct](https://developer.chargify.com/content/chargify-direct/chargify-direct.html). Those scenarios are as follows: - Your Chargify subscription is canceled. - Your Chargify trial has reached an end. - The site you're making a request for is in the process of ["clearing site data"](https://help.chargify.com/sites/clearing-site-data.html) - _Note: any API request for another site that is in a good state will NOT be blocked_ - The site you're making a request for has been deleted. - _Note: any API request for another site that is in a good state will NOT be blocked_ Read more about your Chargify subscription [here](https://help.chargify.com/my-account/chargify-subscription.html) ## What happens when an API request is blocked The request will fail with a `422` http status code. The response will also include a message explaining the reason for the request being blocked. For example: - If your Chargify subscription is canceled: ```json { "errors" => [ [0] "Your Chargify account has been canceled. Please contact support@chargify.com to reactivate." ] } ``` - If your Chargify trial has reached and end and you attempted to make an API request, the response body will look like: ```json { "errors" => [ [0] "Your trial has ended, please contact sales." ] } ``` - If the site you're making a request for is in the process of ["clearing site data"](https://help.chargify.com/sites/clearing-site-data.html): ```json { "errors" => [ [0] "Site data clearing is in progress. Please try later." ] } ``` - If the site you're making a request for has been deleted: ```json { "errors" => [ [0] "This site has been deleted." ] } ``` public: true relationship-invoicing-intro: id: relationship-invoicing-intro name: Relationship Invoicing - Intro content: |- ## API Compatibility for Relationship Invoicing This section describes the API for the new, [Relationship Invoicing](https://help.chargify.com/invoices/index.html) style of invoices introduced in January 2018. If you are an existing customer from prior to January 2018 or have not otherwise explicitly opted into this new style of invoices, you are probably looking for the old "Invoices" section that describes [invoice-billing legacy-style invoices.](docTextSection:JYyHXetBrWb9vjMJF) These new invoices provide a single representation of all of your Chargify billing, whether you collect automatically or via remittance. ## About Decimal Numbers In order to prevent losing precision, we serialize decimal numbers as strings instead of as JSON numbers. We recommend parsing these strings into their decimal equivalent using a decimal number library in your programming language (i.e. `BigDecimal` in Ruby) instead of relying on floating point values or arithmetic. ## About Amount Fields Fields holding amount values are given as a string representing a decimal whole currency amount. For example, `"1.23"` in currency `"USD"` would equate to `$1.23`. Not all fields will be rounded to the smallest currency denomination. Intermediate results, such as those that derive from line-level tax calculations, may hold precision up to 8 decimal places. However, the top-level totals we provide (e.g. `total_amount`) will be rounded to the smallest currency denomination. It is up to API consumers to parse the string into a decimal number representation and do any rounding necessary for your application. ### Summary + If your site **is** using relationship invoicing, you may only use the methods described in this section for working with invoices. + If your site is **not** using relationship invoicing, please use the classic invoice methods under the titles of any of the following: + [Invoices](#docTextSection:JYyHXetBrWb9vjMJF) + [Invoices: Payments](#docTextSection:AN95FahMs2LLgkico) + [Invoices: Charges](#docTextSection:AN95FahMs2LLgkico) + [Invoices: Credits](#docTextSection:xQ9q6Tuz7MeXrBFCa) public: true subscription-reactivation-intro: id: subscription-reactivation-intro name: Subscription Reactivation Intro content: |- ## Reactivate a subscription Chargify offers the ability to reactivate a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://help.chargify.com/subscriptions/reactivation.html). **Please note: The term "resume" is used also during another process in Chargify. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.** + The response returns the subscription object in the `active` or `trialing` state. + The `canceled_at` and `cancellation_message` fields do not have values. + The method works for "Canceled" or "Trial Ended" subscriptions. + It will not work for items not marked as "Canceled", "Unpaid", or "Trial Ended". ## Optional Parameters | Parameter | | |---|---| | `include_trial` | Boolean, default `0`. If 1 is sent the reactivated subscription will include a trial if one is available. If `0` is sent, the trial period will be ignored. This parameter should be sent in a query string, and does not need to be nested inside a subscription object | | `preserve_balance` | Boolean, default `0`. If `1` is passed, the existing subscription balance will NOT be cleared/reset before adding the additional reactivation charges. | | `coupon_code` | The coupon code to be applied during reactivation. | | `resume` | Optional. Indicates whether or not Chargify should attempt to resume the subscription's current billing period. Valid values are `true`, `false`, or ` { require_resume: true }`. See [Resuming a subscription](#resuming-a-subscription) for more details.| | `resume[forgive_balance]`| Boolean, default `false`. Indicates whether or not Chargify should clear the subscription's _existing_ balance before attempting to resume the subscription. See [Resuming a subscription](#resuming-a-subscription) for more details. | | `calendar_billing[reactivation_charge]` | For calendar billing subscriptions only. String, default `prorated`. Determines how to handle the reactivation charge for the subscription, relative to it's snap day. See [Reactivating a calendar billing subscription](#reactivating_a_calendar_billing_subscription]) for more details. | | `use_credits_and_prepayments` | Boolean, default `true`. If `true` is sent, Chargify will use service credits and prepayments upon reactivation. If `false` is sent, the service credits and prepayments will be ignored. | ## Resume the current billing period for a subscription A subscription is considered "resumable" if you are attempting to reactivate within the billing period the subscription was canceled in. A resumed subscription's billing date remains the same as before it was canceled. In other words, it does not start a new billing period. Payment may or may not be collected for a resumed subscription, depending on whether or not the subscription had a balance when it was canceled (for example, if it was canceled because of dunning). Consider a subscription which was created on June 1st, and would renew on July 1st. The subscription is then canceled on June 15. If a reactivation with `resume: true` were attempted _before_ what would have been the next billing date of July 1st, then Chargify would resume the subscription. If a reactivation with `resume: true` were attempted _after_ what would have been the next billing date of July 1st, then Chargify would not resume the subscription, and instead it would be reactivated with a new billing period. | Canceled | Reactivation | Resumable? | |---|---|---| | Jun 15 | June 28 | Yes | | Jun 15 | July 2 | No | ### API parameters for resuming a subscription To attempt to resume a subscription, your request must contain the `resume` parameter. Values for this parameter can be: * `false`: Do not attempt to resume the subscription, only attempt a reactivation. Note that this is the default behavior of this endpoint in the _absence_ of the `resume` parameter. * `true`: Attempt to resume the subscription. If the subscription is not resumable, Chargify will attempt to reactivate the subscription with a new billing period. * `{ require_resume: true }`: Attempt to resume the subscription. If the subscription is not resumable, Chargify will _not_ attempt to reactivate the subscription. It will remain in it's current state. * `{ forgive_balance: true }`: Indicates whether or not Chargify should clear the subscription's _existing_ balance before attempting to resume the subscription. If subscription cannot be resumed, the balance will remain as it was before the attempt to resume was made. Given the above, the body of a JSON request to this endpoint, to resume a subscription, could look like one of the following: ``` { resume: true | false } { resume: { require_resume: true | false, forgive_balance: true | false } } ``` ## Reactivating a calendar billing subscription Subscriptions on calendar billing can be reactivated relative to their snap day. Consider a subscription with a snap day of the 15th of the month, which was canceled sometime in the past. You would like to reactivate that subscription on the 10th of the month. The subscription's initial reactivation period will be from the 10th to the 15th. You may choose how to handle the reactivation charge for that subscription by specifying the `calendar_billing[reactivation_charge]`: | Reactivation charge | Behavior | |---|---| | `prorated` | A prorated charge for the product price will be attempted for the period from the 10th to the 15th. | | `immediate` | A full-price charge for the product price will be attempted immediately. | | `delayed` | A full-price charge for the product price will be attempted at the next renewal, on the 15th. | ### API parameters for resuming a subscription To specify the reactivation charge, the body of a JSON request to this endpoint, to resume a subscription, should look like: ``` { calendar_billing: { reactivation_charge: "prorated" | "immediate" | "delayed", } } ``` public: true product-price-point-intro: id: product-price-point-intro name: Product Price Point Intro content: |- ## Product Price Points Documentation + [Product Price Points Documentation](http://help.chargify.com/products/product-price-points.html) public: true subscription-request-examples: id: subscription-request-examples name: Subscription Request Examples content: "The subscription examples below will be split into two sections.\n\nThe first section, \"Subscription Customization\", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure `chargify_token` generated by Chargify.js.\n\nThe second section, \"Passing Payment Information\", will focus on passing payment information into Chargify. Please be aware that collecting and sending Chargify raw card details requires PCI compliance on your end; these examples are provided as guidance. If your business is not PCI compliant, we recommend using Chargify.js to collect credit cards or bank accounts.\n\n\n\n# Subscription Customization\n\n## Existing Customers\n\nAn existing Customer can be specified by `customer_id` (its ID within Chargify) or `customer_reference` (a unique value within your application that you have shared with Chargify). \n\nUse the following JSON example to form an object that will create a subscription for an already existing customer.\n\n```\n {\n \t\"subscription\": {\n \t\t\"product_handle\": \"basic\",\n \t\t\"customer_id\": 2000,\n \t\t\"credit_card_attributes\": {\n \t\t \"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n }\n }\n }\n```\n\n\n## New Customer\n\nA new Customer can be created by providing `customer_attributes` along with any information. The base requirements are a first name, last name, and email address.\n\n## Create Subscription with Coupon\n\nUse the following JSON example to create a subscription with a coupon. This JSON is applicable when a payment method is not required for a product.\n\nFor more information on creating subscriptions with a coupon code, please see the section on creating a subscription with coupon [here.](#endpoint:YFHw4XRYxaqLwGNvk)\n\n```\n {\n \t\"subscription\": {\n \t\t\"product_handle\": \"basic\",\n \t\t\"customer_attributes\": {\n \t\t\t\"first_name\": \"Joe\",\n \t\t\t\"last_name\": \"Blow\",\n \t\t\t\"email\": \"joe@example.com\",\n \t\t\t\"zip\": \"02120\",\n \t\t\t\"state\": \"MA\",\n \t\t\t\"reference\": \"XYZ\",\n \t\t\t\"phone\": \"(617) 111 - 0000\",\n \t\t\t\"organization\": \"Acme\",\n \t\t\t\"country\": \"US\",\n \t\t\t\"city\": \"Boston\",\n \t\t\t\"address_2\": null,\n \t\t\t\"address\": \"123 Mass Ave.\"\n \t\t},\n \t\t\"coupon_code\": \"SUB111\"\n \t}\n }\n``` \n\n## Create Subscription with Coupon and Payment Profile\n\nUse the following JSON example to create a subscription with a coupon. This JSON is applicable when a payment method is required for a product.\n\nFor more information on creating subscriptions with a coupon code, please see the section on creating a subscription with coupon [here.](#endpoint:YFHw4XRYxaqLwGNvk)\n\n```\n {\n \t\"subscription\": {\n \t\t\"product_handle\": \"basic\",\n \t\t\"customer_attributes\": {\n \t\t\t\"first_name\": \"Joe\",\n \t\t\t\"last_name\": \"Blow\",\n \t\t\t\"email\": \"joe@example.com\",\n \t\t\t\"zip\": \"02120\",\n \t\t\t\"state\": \"MA\",\n \t\t\t\"reference\": \"XYZ\",\n \t\t\t\"phone\": \"(617) 111 - 0000\",\n \t\t\t\"organization\": \"Acme\",\n \t\t\t\"country\": \"US\",\n \t\t\t\"city\": \"Boston\",\n \t\t\t\"address_2\": null,\n \t\t\t\"address\": \"123 Mass Ave.\"\n \t\t},\n \t\t\"credit_card_attributes\": {\n \t\t \"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n \t\t},\n \t\t\"coupon_code\": \"SUB111\"\n \t}\n }\n```\n\n\n## Subscription with Future Billing Date\n\n```\n {\n \t\"subscription\": {\n \t\t\"product_handle\": \"basic\",\n \t\t\"customer_attributes\": {\n \t\t\t\"first_name\": \"Joe\",\n \t\t\t\"last_name\": \"Blow\",\n \t\t\t\"email\": \"joe@example.com\"\n \t\t},\n \t\t\"credit_card_attributes\": {\n \t\t \"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n \t\t},\n \t\t\"next_billing_at\": \"2020-06-01\"\n \t}\n }\n```\n\n## Subscription with On-Off Component\n\n```\n {\n \t\"subscription\": {\n \t\t\"product_handle\": \"basic\",\n \t\t\"customer_attributes\": {\n \t\t\t\"first_name\": \"Joe\",\n \t\t\t\"last_name\": \"Blow\",\n \t\t\t\"email\": \"joe@example.com\"\n \t\t},\n \t\t\"credit_card_attributes\": {\n \t\t\t\"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n \t\t},\n \t\t\"components\": [{\n \t\t\t\"component_id\": 2500,\n \t\t\t\"enabled\": true\n \t\t}]\n \t}\n }\n```\n\n## Subscription with Metered Components\n\n```\n {\n \t\"subscription\": {\n \t\t\"product_handle\": \"basic\",\n \t\t\"customer_attributes\": {\n \t\t\t\"first_name\": \"Joe\",\n \t\t\t\"last_name\": \"Blow\",\n \t\t\t\"email\": \"joe1049am@example.com\"\n \t\t},\n \t\t\"credit_card_attributes\": {\n \t\t\t\"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n \t\t},\n \t\t\"components\": [{\n \t\t\t\"component_id\": 195268,\n \t\t\t\"unit_balance\": 20\n \t\t}]\n \t}\n }\n```\n\n## Subscription with Quantity-Based Component\n\n```\n {\n \t\"subscription\": {\n \t\t\"product_handle\": \"basic\",\n \t\t\"customer_attributes\": {\n \t\t\t\"first_name\": \"Joe\",\n \t\t\t\"last_name\": \"Blow\",\n \t\t\t\"email\": \"joe@example.com\"\n \t\t},\n \t\t\"credit_card_attributes\": {\n \t\t\t\"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n \t\t},\n \t\t\"components\": [{\n \t\t\t\"component_id\": 2500,\n \t\t\t\"allocated_quantity\": 14\n \t\t}]\n \t}\n }\n```\n\n## Subscription with a Non-Default Component Price Point\n\nWhen creating a subscription with a component, a `price_point_id` can be passed in along with the `component_id` to specify which price point to use. If not passed in, the default price point will be used.\n\nNote: if an invalid `price_point_id` is used, the subscription will still proceed but will use the component's default price point.\n\n```\n {\n\t\"subscription\": {\n\t\t\"product_handle\": \"basic\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"last_name\": \"Blow\",\n\t\t\t\"email\": \"joe@example.com\",\n\t\t\t\"zip\": \"02120\",\n\t\t\t\"state\": \"MA\",\n\t\t\t\"reference\": \"XYZ\",\n\t\t\t\"phone\": \"(617) 111 - 0000\",\n\t\t\t\"organization\": \"Acme\",\n\t\t\t\"country\": \"US\",\n\t\t\t\"city\": \"Boston\",\n\t\t\t\"address_2\": null,\n\t\t\t\"address\": \"123 Mass Ave.\"\n\t\t},\n\t\t\"credit_card_attributes\": {\n\t\t\t\"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n\t\t},\n\t\t\"components\": [{\n\t\t\t\"component_id\": 2500,\n\t\t\t\"price_point_id\": 499,\n\t\t\t\"allocated_quantity\": 14\n\t\t}]\n\t}\n}\n```\n\n## Subscription with Component Handles\n\nThe component passed here is a quantity-based component, but the format to pass component and price point handles will be the same for each component type.\n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"basic\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"last_name\": \"Blow\",\n\t\t\t\"email\": \"joe@example.com\"\n\t\t},\n\t\t\"credit_card_attributes\": {\n\t\t\t\"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n\t\t},\n\t\t\"components\": [{\n\t\t\t\"component_id\": \"handle:my-handle\",\n\t\t\t\"price_point_id\": \"handle:special-offer\",\n\t\t\t\"allocated_quantity\": 14\n\t\t}]\n\t}\n}\n```\n\n## Subscription with Calendar Billing\n\n```\n {\n\t\"subscription\": {\n\t\t\"product_handle\": \"gold\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"last_name\": \"Blow\",\n\t\t\t\"email\": \"joe@example.com\",\n\t\t\t\"zip\": \"02120\",\n\t\t\t\"state\": \"MA\",\n\t\t\t\"reference\": \"XYZ\",\n\t\t\t\"phone\": \"(617) 111 - 0000\",\n\t\t\t\"organization\": \"Acme\",\n\t\t\t\"country\": \"US\",\n\t\t\t\"city\": \"Boston\",\n\t\t\t\"address_2\": null,\n\t\t\t\"address\": \"123 Mass Ave.\"\n\t\t},\n\t\t\"calendar_billing\": {\n\t\t\t\"snap_day\": 1,\n\t\t\t\"calendar_billing_first_charge\": \"immediate\"\n\t\t},\n\t\t\"credit_card_attributes\": {\n\t\t\t\"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n\t\t}\n\t}\n}\n```\n\n## Subscription with Referral Code\n\nUse the following JSON to create a subscription using a referral code. Note that the `ref` key/value pair must be part of the subscription object. \n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"product-handle\",\n\t\t\"ref\": \"1q2w3e\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"last_name\": \"Blow\",\n\t\t\t\"email\": \"joe@example.com\",\n\t\t\t\"zip\": \"02120\",\n\t\t\t\"state\": \"MA\",\n\t\t\t\"reference\": \"XYZ\",\n\t\t\t\"phone\": \"(617) 111 - 0000\",\n\t\t\t\"organization\": \"Acme\",\n\t\t\t\"country\": \"US\",\n\t\t\t\"city\": \"Boston\",\n\t\t\t\"address_2\": null,\n\t\t\t\"address\": \"123 Mass Ave.\"\n\t\t},\n\t\t\"credit_card_attributes\": {\n\t\t\t\"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n\t\t}\n\t}\n}\n```\n\n## Subscription for existing customer on invoice collection method\n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"test\",\n\t\t\"customer_id\": \"12345\",\n\t\t\"payment_collection_method\": \"invoice\"\n\t}\n}\n```\n\n## Subscription with metafields\n\nIn the example below, the custom field `color` exists while `comments` doesn't.\n\nWhen the request below is sent, the metafields are populated with the supplied metadata. In addition a new metafield called `comments` will have been created. \n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"basic\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"last_name\": \"Blow\",\n\t\t\t\"email\": \"joe@example.com\",\n\t\t\t\"zip\": \"02120\",\n\t\t\t\"state\": \"MA\",\n\t\t\t\"reference\": \"XYZ\",\n\t\t\t\"phone\": \"(617) 111 - 0000\",\n\t\t\t\"organization\": \"Acme\",\n\t\t\t\"country\": \"US\",\n\t\t\t\"city\": \"Boston\",\n\t\t\t\"address_2\": null,\n\t\t\t\"address\": \"123 Mass Ave.\"\n\t\t},\n\t\t\"credit_card_attributes\": {\n\t\t \"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n\t\t},\n\t\t\"metafields\": {\n\t\t\t\"color\": \"blue\",\n\t\t\t\"comments\": \"Thanks!\"\n\t\t}\n\t}\n}\n```\n\n\n## Subscription with customer level metafields\n\nSince both subscriptions and customers can have metafields/metadata associated with them you can also create a customer with metafields/metadata.\n\nIn the example below, the custom field `nickname` exists while `language` doesn't.\n\nWhen the request below is sent, the metafields are populated with the supplied metadata on the Customer level. In addition a new metafield called `language` will have been created. \n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"basic\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"last_name\": \"Blow\",\n\t\t\t\"email\": \"joe@example.com\",\n\t\t\t\"zip\": \"02120\",\n\t\t\t\"state\": \"MA\",\n\t\t\t\"reference\": \"XYZ\",\n\t\t\t\"phone\": \"(617) 111 - 0000\",\n\t\t\t\"organization\": \"Acme\",\n\t\t\t\"country\": \"US\",\n\t\t\t\"city\": \"Boston\",\n\t\t\t\"address_2\": null,\n\t\t\t\"address\": \"123 Mass Ave.\",\n\t\t\t\"metafields\": {\n\t\t \"nickname\": \"Boris\",\n\t\t \"language\": \"Spanish\"\n\t }\n\t\t},\n\t\t\"credit_card_attributes\": {\n\t\t\t\"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\"\n\t\t}\n\t}\n}\n```\n\n# Passing Payment Information\n\n## Subscription with Chargify.js token\n\nThe `chargify_token` can be obtained using [chargify.js](https://developer.chargify.com/content/chargify-js/chargify-js.html). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway.\n\nThe `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of payment method being added. If a bank account is being passed, the payment attributes should be changed to `bank_account_attributes`.\n\n```\n{\n \"subscription\": {\n \"product_handle\": \"pro-plan\",\n \"customer_attributes\": {\n \"first_name\": \"Joe\",\n \"last_name\": \"Smith\",\n \"email\": \"j.smith@example.com\"\n },\n \"credit_card_attributes\": {\n \"chargify_token\": \"tok_cwhvpfcnbtgkd8nfkzf9dnjn\",\n \"payment_type\": \"credit_card\"\n }\n }\n}\n```\n\n## Subscription with vault token\n\nIf you already have a customer and card stored in your payment gateway, you may create a subscription with a `vault_token`. Providing the last_four, card type and expiration date will allow the card to be displayed properly in the Chargify UI.\n\n```\n{\n \"subscription\": {\n \"product_handle\": \"pro-plan\",\n \"customer_attributes\": {\n \"first_name\": \"Joe\",\n \"last_name\": \"Smith\",\n \"email\": \"j.smith@example.com\"\n },\n \"credit_card_attributes\": {\n first_name: \"Joe,\n last_name: \"Smith\",\n card_type: \"visa\",\n expiration_month: \"05\",\n expiration_year: \"2025\",\n last_four: \"1234\",\n vault_token: \"12345abc\",\n current_vault: \"braintree_blue\"\n }\n}\n```\n\n## Existing Customer with Existing Payment Profile\n\n```\n{\n \"subscription\": {\n \"product_handle\": \"product-xyz\",\n \"customer_id\": 17346006,\n \"payment_profile_id\": 11991557\n }\n}\n```\n\n## Subscription with Credit Card\n\n```\n\"subscription\": {\n\t\t\"product_handle\": \"basic\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"last_name\": \"Blow\",\n\t\t\t\"email\": \"joe@example.com\",\n\t\t\t\"zip\": \"02120\",\n\t\t\t\"state\": \"MA\",\n\t\t\t\"reference\": \"XYZ\",\n\t\t\t\"phone\": \"(617) 111 - 0000\",\n\t\t\t\"organization\": \"Acme\",\n\t\t\t\"country\": \"US\",\n\t\t\t\"city\": \"Boston\",\n\t\t\t\"address_2\": null,\n\t\t\t\"address\": \"123 Mass Ave.\"\n\t\t},\n\t\t\"credit_card_attributes\": {\n\t\t\t\"last_name\": \"Smith\",\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"full_number\": \"4111111111111111\",\n\t\t\t\"expiration_year\": \"2021\",\n\t\t\t\"expiration_month\": \"1\",\n\t\t\t\"card_type\": \"visa\",\n\t\t\t\"billing_zip\": \"02120\",\n\t\t\t\"billing_state\": \"MA\",\n\t\t\t\"billing_country\": \"US\",\n\t\t\t\"billing_city\": \"Boston\",\n\t\t\t\"billing_address_2\": null,\n\t\t\t\"billing_address\": \"123 Mass Ave.\"\n\t\t}\n}\n```\n\n## Subscription with ACH as Payment Profile\n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"gold-product\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Joe\",\n\t\t\t\"last_name\": \"Blow\",\n\t\t\t\"email\": \"joe@example.com\",\n\t\t\t\"zip\": \"02120\",\n\t\t\t\"state\": \"MA\",\n\t\t\t\"reference\": \"XYZ\",\n\t\t\t\"phone\": \"(617) 111 - 0000\",\n\t\t\t\"organization\": \"Acme\",\n\t\t\t\"country\": \"US\",\n\t\t\t\"city\": \"Boston\",\n\t\t\t\"address_2\": null,\n\t\t\t\"address\": \"123 Mass Ave.\"\n\t\t},\n\t\t\"bank_account_attributes\": {\n\t\t\t\"bank_name\": \"Best Bank\",\n\t\t\t\"bank_routing_number\": \"021000089\",\n\t\t\t\"bank_account_number\": \"111111111111\",\n\t\t\t\"bank_account_type\": \"checking\",\n\t\t\t\"bank_account_holder_type\": \"business\",\n\t\t\t\"payment_type\": \"bank_account\"\n\t\t}\n\t}\n}\n```\n\n## Subscription with PayPal payment profile \n\n### With the nonce from Braintree JS\n\n```\n{ \"subscription\": {\n \"product_handle\":\"test-product-b\",\n \"customer_attributes\": {\n \"first_name\":\"Amelia\",\n \"last_name\":\"Johnson\",\n \"email\":\"amelia@example.com\",\n \"organization\":\"My Awesome Company\"\n },\n \"payment_profile_attributes\":{\n \"paypal_email\": \"amelia@example.com\",\n \"current_vault\": \"braintree_blue\",\n \"payment_method_nonce\":\"abc123\",\n \"payment_type\":\"paypal_account\"\n }\n }\n```\n\n\n### With the Braintree Customer ID as the vault token:\n\n```\n{ \"subscription\": {\n \"product_handle\":\"test-product-b\",\n \"customer_attributes\": {\n \"first_name\":\"Amelia\",\n \"last_name\":\"Johnson\",\n \"email\":\"amelia@example.com\",\n \"organization\":\"My Awesome Company\"\n },\n \"payment_profile_attributes\":{\n \"paypal_email\": \"amelia@example.com\",\n \"current_vault\": \"braintree_blue\",\n \"vault_token\":\"58271347\",\n \"payment_type\":\"paypal_account\"\n }\n }\n```\n\n## Subscription using GoCardless Bank Number\n\nThese examples creates a customer, bank account and mandate in GoCardless.\n\nFor more information on GoCardless, please view the following two resources:\n\n+ [Payment Profiles via API for GoCardless](#endpoint:CaR3rApsyniuZtoEH)\n+ [Full documentation on GoCardless](https://help.chargify.com/payment-gateways/gocardless.html)\n\n+ [Using Chargify.js with GoCardless - minimal example](https://developer.chargify.com/content/chargify-js/example.html#minimal-example-with-gocardless)\n\n+ [Using Chargify.js with GoCardless - full example](https://developer.chargify.com/content/chargify-js/example.html#full-example-with-gocardless)\n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"gold-product\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Jane\",\n\t\t\t\"last_name\": \"Doe\",\n\t\t\t\"email\": \"jd@chargify.test\"\n\t\t},\n\t\t\"bank_account_attributes\": {\n\t\t\t\"bank_name\": \"Royal Bank of France\",\n\t\t\t\"bank_account_number\": \"0000000\",\n\t\t\t\"bank_routing_number\": \"0003\",\n\t\t\t\"bank_branch_code\": \"00006\",\n\t\t\t\"payment_type\": \"bank_account\",\n\t\t\t\"billing_address\": \"20 Place de la Gare\",\n\t\t\t\"billing_city\": \"Colombes\",\n\t\t\t\"billing_state\": \"Île-de-France\",\n\t\t\t\"billing_zip\": \"92700\",\n\t\t\t\"billing_country\": \"FR\"\n\t\t}\n\t}\n}\n```\n\n## Subscription using GoCardless IBAN Number\n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"gold-product\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Jane\",\n\t\t\t\"last_name\": \"Doe\",\n\t\t\t\"email\": \"jd@chargify.test\"\n\t\t},\n\t\t\"bank_account_attributes\": {\n\t\t\t\"bank_name\": \"French Bank\",\n\t\t\t\"bank_iban\": \"FR1420041010050500013M02606\",\n\t\t\t\"payment_type\": \"bank_account\",\n\t\t\t\"billing_address\": \"20 Place de la Gare\",\n\t\t\t\"billing_city\": \"Colombes\",\n\t\t\t\"billing_state\": \"Île-de-France\",\n\t\t\t\"billing_zip\": \"92700\",\n\t\t\t\"billing_country\": \"FR\"\n\t\t}\n\t}\n}\n```\n\n## Subscription using Stripe SEPA Direct Debit\n\nFor more information on Stripe Direct Debit, please view the following two resources:\n\n+ [Payment Profiles via API for Stripe SEPA Direct Debit](#endpoint:NasuhQCFDimxYmBh4)\n+ [Full documentation on Stripe Direct Debit](https://help.chargify.com/payment-gateways/stripe-direct-debit.html)\n\n+ [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://developer.chargify.com/content/chargify-js/example.html#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway)\n\n+ [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://developer.chargify.com/content/chargify-js/example.html#full-example-with-sepa-direct-debit-stripe-gateway)\n\n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"gold-product\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Jane\",\n\t\t\t\"last_name\": \"Doe\",\n\t\t\t\"email\": \"jd@chargify.test\"\n\t\t},\n\t\t\"bank_account_attributes\": {\n\t\t\t\"bank_name\": \"Test Bank\",\n\t\t\t\"bank_iban\": \"DE89370400440532013000\",\n\t\t\t\"payment_type\": \"bank_account\"\n\t\t}\n\t}\n}\n```\n\n## Subscription using Stripe BECS Direct Debit\n\nFor more information on Stripe Direct Debit, please view the following two resources:\n\n+ [Payment Profiles via API for Stripe BECS Direct Debit](#endpoint:H4z4BsLgSCd68A45W)\n+ [Full documentation on Stripe Direct Debit](https://help.chargify.com/payment-gateways/stripe-direct-debit.html)\n\n+ [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://developer.chargify.com/content/chargify-js/example.html#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway)\n\n+ [Using Chargify.js with Stripe BECS Direct Debit - full example](https://developer.chargify.com/content/chargify-js/example.html#full-example-with-becs-direct-debit-stripe-gateway)\n\n\n```\n{\n\t\"subscription\": {\n\t\t\"product_handle\": \"gold-product\",\n\t\t\"customer_attributes\": {\n\t\t\t\"first_name\": \"Jane\",\n\t\t\t\"last_name\": \"Doe\",\n\t\t\t\"email\": \"jd@chargify.test\"\n\t\t},\n\t\t\"bank_account_attributes\": {\n\t\t\t\"bank_name\": \"Test Bank\",\n\t\t\t\"bank_branch_code\": \"000000\",\n \"bank_account_number\": \"000123456\",\n\t\t\t\"payment_type\": \"bank_account\"\n\t\t}\n\t}\n}\n```" public: true transaction-output-attributes: id: transaction-output-attributes name: Transaction Output Attributes content: |- ## Transaction Output Attributes All of the transaction attribute fields are returned from GET (read) operations, and all are read only. | transaction_type / type | The type of the transaction, see above | |---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | The unique identifier for the Transaction | | amount_in_cents | The amount in cents of the Transaction | | created_at | Timestamp indicating when the Transaction was created | | starting_balance_in_cents | The initial balance on the subscription before the Transaction has been processed | | ending_balance_in_cents | The remaining balance on the subscription after the Transaction has been processed | | memo | A note about the Transaction | | subscription_id | The unique identifier for the associated Subscription | | product_id | The unique identifier for the product associated`: with the Subscription | | success | Whether or not the Transaction was successful | | payment_id | The unique identifier for the payment being explicitly refunded (in whole or in part) by this transaction. Will be null for all transaction types except for “Refund”. May be null even for Refunds. For partial refunds, more than one Refund transaction may reference the same payment_id. | | kind | The specific “subtype” for the transaction_type | | gateway_transaction_id | The transaction ID from the remote gateway (i.e. Authorize.Net), if one exists | | gateway_order_id | A gateway-specific identifier for the transaction, separate from the `gateway_transaction_id` | | component_id | ID of the component, only available in the `charge` | | customer_id | The ID of the customer | | item_name | The name of the product or component | | period_range_start | The start date of the transaction period | | period_range_end | The end date of the transaction period | | parent_id | (Experimental, only for Payments) Some payments modify earlier payments, such as when a payment from one subscription is "split" and applied to other subscriptions in Invoice Consolidation. In those cases, this field identifies the original Payment from which this one derived. | | role | (Experimental, only for Payments) Payments may be marked with a role to define the context in which they were applied. Valid values are currently reserved for invoicing and consolidated invoicing: `invoice_payment`, `consolidated_invoice_payment`, `invoice_segment_payment`, `payment_split` | | **Gateway** | **Value in gateway_order_id** | | BPoint | “ReceiptNumber” from the transaction response | | All other gateways | Undefined at this time | public: true subscription-threedsecure-stripe: id: subscription-threedsecure-stripe name: Subscription 3D Secure - Stripe content: |- ## 3D Secure - Stripe It may happen that a payment needs 3D Secure Authentication when the subscription is created; this is referred to in our help docs as a [post-authentication flow](https://help.chargify.com/payment-gateways/testing-3dsecure.html). The server returns `422 Unprocessable Entity` in this case with the following response: ``` { "errors": [ "Your card was declined. This transaction requires 3D secure authentication." ], "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh", "description": "This card requires 3D secure authentication. Redirect the customer to the URL from the action_link attribute to authenticate. Attach callback_url param to this URL if you want to be notified about the result of 3D Secure authentication. Attach redirect_url param to this URL if you want to redirect a customer back to your page after 3D Secure authentication. Example: https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after payment is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.", "action_link": "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_token_id=242" } ``` To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`. Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information: - whether the authentication was successful (`success`) - the gateway ID for the payment (`gateway_payment_id`) - the subscription ID (`subscription_id`) Lastly, you can also specify a `redirect_url` within the `action_link` URL if you’d like to redirect a customer back to your site. The final URL that you send a customer to to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` ### Example Redirect Flow You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference: 1. Create a subscription via API; it requires 3DS 2. You receive a `gateway_payment_id` in the `action_link` along other params in the response. 3. Use this `gateway_payment_id` to, for example, connect with your internal resources or generate a session_id 4. Include 1 of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to 5. Redirect the customer to the `action_link` with `callback_url` and `redirect_url` applied 6. After the customer finishes 3DS authentication, we let you know the result by making a request to applied `callback_url`. 7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known 8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine whether it was successful or not public: true mrr-overview: id: mrr-overview name: MRR Overview content: |- This section describes API endpoints for accessing your site's [MRR Report](https://help.chargify.com/reports/mrr-analytics.html) data. ### Understanding MRR movements Whenever a subscription event occurs that causes your site's MRR to change (such as a signup or upgrade), we record an MRR movement. These records are accessible via the MRR Movements endpoint. Each MRR Movement belongs to a subscription and contains a timestamp, category, and an amount. `line_items` represent the subscription's product configuration at the time of the movement. ### Plan & Usage Breakouts In the MRR Report UI, we support a setting to [include or exclude](https://help.chargify.com/reports/mrr-analytics.html#displaying-component-based-metered-usage-in-mrr) usage revenue. In the MRR APIs, responses include `plan` and `usage` breakouts. Plan includes revenue from: * Products * Quantity-Based Components * On/Off Components Usage includes revenue from: * Metered Components public: true migration-3d-secure-stripe: id: migration-3d-secure-stripe name: Migration 3D Secure - Stripe content: |- ## Migration 3D Secure - Stripe It may happen that a payment needs 3D Secure Authentication when the subscription is migrated to a new product; this is referred to in our help docs as a [post-authentication flow](https://help.chargify.com/payment-gateways/testing-3dsecure.html). The server returns `422 Unprocessable Entity` in this case with the following response: ``` { "errors": [ "Your card was declined. This transaction requires 3D secure authentication." ], "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh", "description": "This card requires 3D secure authentication. Redirect the customer to the URL from the action_link attribute to authenticate. Attach callback_url param to this URL if you want to be notified about the result of 3D Secure authentication. Attach redirect_url param to this URL if you want to redirect a customer back to your page after 3D Secure authentication. Example: https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after payment is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.", "action_link": "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_token_id=242" } ``` To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`. Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information: - whether the authentication was successful (`success`) - the gateway ID for the payment (`gateway_payment_id`) - the subscription ID (`subscription_id`) Lastly, you can also specify a `redirect_url` within the `action_link` URL if you’d like to redirect a customer back to your site. The final URL that you send a customer to to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com` ### Example Redirect Flow You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference: 1. Create a migration via API; it requires 3DS 2. You receive a `gateway_payment_id` in the `action_link` along other params in the response. 3. Use this `gateway_payment_id` to, for example, connect with your internal resources or generate a session_id 4. Include 1 of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to 5. Redirect the customer to the `action_link` with `callback_url` and `redirect_url` applied 6. After the customer finishes 3DS authentication, we let you know the result by making a request to applied `callback_url`. 7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known 8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine whether it was successful or not. public: true sales-commission-intro: id: sales-commission-intro name: Sales Commission Intro content: |- ## Sales Commission Intro The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://help.chargify.com/announcements/new-api-authentication-method.html). Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Chargify support. > Note: The request is at seller level, it means `<>` variable will be replaced by `app` public: true secure-applications: id: secure-applications name: Secure Applications content: |- ## Secure Applications Please note that it is NOT possible to make API requests directly from the customer's browser or device. Doing so would expose your API key on the client side, and anyone who has that key has full access to all of your Chargify data. Instead you will need to take care to tokenize sensitive information by using [Chargify.js](https://developer.chargify.com/content/chargify-js/chargify-js.html) or a similar JavaScript library provided by your gateway, and then post the token and other information to your own server, from which you can make the API call to Chargify. ### Troubleshooting If you attempt to make a Chargify API request directly from the customer's browser, you may see an error such as: ```Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.``` ```Origin 'https://example.com' is therefore not allowed access.` `The response had HTTP status code 404.``` This is an error message indicating that Cross-Origin Resource Sharing (CORS) is not enabled on the Chargify server. public: true subscriptions-hierarchies-and-whopays-intro: id: subscriptions-hierarchies-and-whopays-intro name: Subscriptions Hierarchies & WhoPays Intro content: |- ## Hierarchies & WhoPays When subscription groups were first added to our Relationship Invoicing architecture, to group together invoices for related subscriptions and allow for complex customer hierarchies and WhoPays scenarios, they were designed to consist of a primary and a collection of group members. The primary would control many aspects of the group, such as when the consolidated invoice is generated. As of today, groups still function this way. In the future, the concept of a "primary" will be removed in order to offer more flexibility into group management and reduce confusion concerning what actions must be done on a primary level, rather than a member level. We have introduced a two scheme system as a bridge between these two group organizations. Scheme 1, which is relevant to all subscription groups today, marks the group as being "ruled" by a primary. When reading a subscription via API, they will return a top-level attribute called `group`, which will denote which scheme is being used. At this time, the `scheme` attribute will always be 1. public: true mock: enabled: false dynamic: false x-tests: {}