Skip to main content

Chargify Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow data flow that sends data to a Chargify location.
chargify_api.png

Chargify

Create a Chargify Destination

  1. Click the + icon on the Nexset that will be sent to the Chargify destination, and select the Send to Destination option from the menu.

  2. Select the Chargify connector from the list of available destination connectors. Then, select the credential that will be used to connect to the Chargify organization, and click Next; or, create a new Chargify credential for use in this flow.

  3. In Nexla, Chargify destinations can be created using pre-built endpoint templates, which expedite destination setup for common Chargify write operations. Each template is designed specifically for the corresponding Chargify endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    Chargify destinations can also be configured manually, allowing you to send data to Chargify endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Chargify endpoints. Each template is designed specifically for the corresponding Chargify endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

Create Subscription

This endpoint creates a new subscription in Chargify. Use this template when you need to programmatically enroll customers into a subscription plan—for example, as part of a sign-up flow, a data migration, or an integration that provisions subscriptions based on events in another system.

  • The data sent to this endpoint must conform to the Chargify subscription creation schema. At minimum, a valid product_handle or product_id and customer information (either an existing customer_id or new customer details including first_name, last_name, and email) are required.

  • Optionally include additional fields such as payment_profile_id (to use an existing payment method), coupon_code (to apply a discount at signup), components (to add component allocations), or ref (a custom reference identifier for the subscription).

  • A successful request returns the newly created subscription object with its Chargify-assigned id and current state. The subscription state at creation depends on your site's payment collection settings and whether a valid payment method is provided.

Chargify validates subscription creation requests carefully. Ensure that the product handle or ID, customer details, and any payment profile information are correct before sending data. For complete details about required and optional fields, see the Chargify API reference for Create Subscription.

Create Customer

This endpoint creates a new customer record in Chargify. Use this template when you need to provision customer accounts in Chargify from an external source—for example, syncing new signups from a CRM, provisioning billing accounts as part of an onboarding workflow, or migrating customers from another billing platform.

  • The data sent to this endpoint must include at minimum a valid first_name, last_name, and email address for the customer.

  • Optionally include additional fields such as organization (the company name), reference (your internal identifier for the customer, useful for cross-referencing with your own systems), address, city, state, zip, country, and phone.

  • A successful request returns the newly created customer object with its Chargify-assigned id. Use this ID in subsequent API calls to associate subscriptions, payment profiles, or other records with this customer.

The reference field is particularly useful for maintaining a link between Chargify customers and records in your own system. Setting a unique reference value at customer creation makes it easy to look up Chargify customers by your internal ID. For complete details about the customer object, see the Chargify API reference for Create Customer.

Update Subscription

This endpoint updates an existing subscription in Chargify. Use this template to modify subscription details such as the product, payment collection method, custom reference, or other subscription-level attributes as part of a migration, upgrade workflow, or automated subscription management process.

  • The Chargify-assigned subscription ID must be provided as part of the API URL path when updating a subscription. This ID is returned in the subscription object from the List Subscriptions endpoint or Create Subscription endpoint.

  • Include in the request body only the fields you want to update. Common updatable fields include product_handle or product_id (to change the product), payment_collection_method (automatic or invoice), receives_invoice_emails, and ref (custom reference).

  • A successful request returns the updated subscription object with all current field values reflected.

Changing a subscription's product via the Update Subscription endpoint initiates a product migration in Chargify. Depending on your site's migration settings, prorations may be applied. For complete details about updatable fields and migration behavior, see the Chargify API reference for Update Subscription.

Configure Manually

Chargify destinations can be manually configured to send data to any valid Chargify API endpoint.

Using manual configuration, you can also configure Nexla to automatically send the response received from the Chargify API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Chargify API from the Method pulldown menu. Common methods for Chargify destination operations include:

    • POST: For creating new resources (customers, subscriptions, charges, refunds)
    • PUT: For replacing an existing resource with new data
    • DELETE: For canceling subscriptions or removing records

Data Format

  1. Select the format in which the Nexset data will be sent to the Chargify API from the Content Format pulldown menu. Chargify accepts JSON as the recommended format. Nexla will automatically convert the data to the selected format for each API call.

API Endpoint URL

  1. Enter the URL of the Chargify API endpoint to which you want to send the Nexset data in the URL field. All Chargify API endpoints use the base URL https://{'{subdomain}'}.chargify.com/ where {'{subdomain}'} is your Chargify site's unique subdomain.

    Examples of commonly used Chargify destination endpoints:

    • https://mycompany.chargify.com/subscriptions.json — Create a subscription (POST)
    • https://mycompany.chargify.com/customers.json — Create a customer (POST)
    • https://mycompany.chargify.com/subscriptions/{'{subscription_id}'}.json — Update a subscription (PUT)

Replace mycompany in the example URLs with your actual Chargify site subdomain. For update and delete operations, include the Chargify-assigned resource ID in the URL path. All Chargify API requests must use HTTPS.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2).

    You do not need to include Authorization headers here—authentication is handled automatically by Nexla based on your credential configuration. To send JSON data, Nexla automatically sets the Content-Type: application/json header when JSON is selected as the content format.

Exclude Attributes from the Call

Optional
  • If any record attributes in the Nexset should be omitted when sending data to this Chargify destination, select the attributes from the Exclude Attributes pulldown menu.

  • Any number of attributes can be selected for exclusion, and all excluded attributes will be shown in the field. To remove an attribute from the list, click the X icon next to the attribute name.

Record Batching

Optional
  1. If records should be sent to this destination in batched API calls, check the box next to Would you like to batch your records together? to enable record batching.

  2. Enter the maximum number of records that should be batched together in a single API call in the Batch Size field. By default, this value is set to 100.

  3. Select the algorithm that will be used to group records into batches from the Grouping Algorithm pulldown menu. The sample request shown in the panel on the right will be updated to reflect the current batching settings. Some algorithms require additional settings—click on an algorithm listed below to view instructions for configuring these settings.

Property Inside JSON Object

  1. Enter the name of the JSON property that should contain the batched records in the Property Name field.
  2. If any additional properties should be included in the request, enter the properties in the Other Props field in JSON format.

Code

  1. Enter the code that will be used to create the batched request in the code editor below the Grouping Algorithm field.

Response Webhook

Optional

Nexla can automatically send the response received from the Chargify API after each call to a new Nexla webhook data source. This option allows you to keep track of the status of each API call and any additional information returned after each call.

  • To enable this option, check the box next to Would you like to process the API response as a Nexla Webhook source?.

Sample Request Payload

Sample request payloads containing a portion of the Nexset data that will be sent to the Chargify API endpoint based on the current settings are shown in the Sample Payload panel on the right. These samples can be referenced to ensure that the destination and request settings are correctly configured.

  • Click on a sample request payload to expand it and view the complete payload content.
  • Sample payloads are automatically updated with each setting change, making it easy to verify that changes achieve the desired effect.

Endpoint Testing (Manual Configuration)

After all endpoint settings have been configured, Nexla can send a test payload to the Chargify API to ensure that the destination is configured correctly.

  1. To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  2. If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  3. Click the Send Test Data button at the top of a sample payload to send the test payload to the Chargify API using the current settings.

Save & Activate the Destination

  • Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To begin sending data to the configured Chargify endpoint, open the destination resource menu, and select Activate.

    The Nexset data will not be sent to the Chargify endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.