Summary: ◀▼
You can connect action flows to Recurly to automate customer account and subscription management. Actions include creating, updating, and looking up accounts and subscriptions, as well as canceling subscriptions and retrieving invoice or transaction details. Use a dedicated service account for connections and provide Recurly API credentials. This integration helps streamline billing and subscription workflows within your support processes.
Connecting Recurly to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
To locate your Recurly domain and API key
- Recurly subdomain: The subdomain portion of your Recurly URL (for example, "yourcompany" from yourcompany.recurly.com).
- API Key: Your Recurly private API key, found in Recurly under Integrations > API Credentials > Private API Key.
See the Recurly documentation for more information.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action
flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click Recurly.
- Click Connect.
- Follow Recurly's prompts to enter your Recurly API key and complete the
connection.Important: All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it is a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for Recurly.
Using Recurly actions in action flows
Creating an account
Use the Create account action to create a new customer account in Recurly.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Account CodeThe Account Code is a unique account identifier with a maximum of 50 characters. Use a Zendesk user or organization ID for easy cross-referencing. Optional:
Tax Exempt can be set to Yes or No. |
| Output | Account details including id, code, email, state, created_at, and hosted_login_token. |
Updating an account
Use the Update account action to modify an existing customer account in Recurly.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Account CodeAccount Code can be either the account code or UUID. Optional:
Only provide values for fields you want to update. Existing values for fields you don't specify will remain unchanged. |
| Output | Account details including id, code, state, and updated_at timestamp. |
Looking up an account
Use the Lookup account action to retrieve account details by account code or UUID. Use this action to retrieve comprehensive information about a customer account, including subscription status and billing details.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Account CodeThe Account Code can be either the account code or UUID. |
| Output | Account details including id, code, email, first_name, last_name, company, state, balance, has_active_subscription, has_past_due_invoice, created_at, and updated_at. |
Creating a subscription
Use the Create subscription action to create a new subscription for a Recurly account.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Account Code,
Plan, Currency,
Collection methodOptional:
Consider the following when using the Create subscription action:
|
| Output | Subscription details including uuid, account_code, account_email, plan_code, plan_name, state, quantity, currency, current_period_started_at, current_period_ends_at, trial_ends_at, activated_at, and created_at. |
Updating a subscription
Use the Update subscription action to change an existing subscription's plan, quantity, or timeframe.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Subscription UIIDOptional:
The New Plan field dynamically populates with available subscription plans. When to Apply determines whether changes take effect immediately (Now) or at the next billing cycle (At renewal). Only provide values for fields you want to update. |
| Output | Subscription details including uuid, state, plan_code, plan_name, quantity, and updated_at timestamp. |
Canceling a subscription
Use the Cancel subscription action to cancel an active subscription at term end or immediately.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Subscription UUIDOptional:
When to Cancel determines the cancellation timing: "At term end" (recommended) cancels at the end of all billing cycles, while "At next billing cycle" cancels at the next billing date. Choose the option that best fits your business policy. |
| Output | Subscription details including uuid, state, canceled_at, and expires_at timestamps. |
Looking up a subscription
Use the Lookup subscription action to retrieve detailed subscription information by UUID. Use this action to retrieve comprehensive subscription information, including billing periods, pricing, and cancellation status. The output includes both current state and historical timestamps.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Subscription UUID
|
| Output | Subscription details including uuid, account_code, account_email, plan_code, plan_name, plan_interval_unit, plan_interval_length, state, quantity, currency, unit_amount, subtotal, current_period_started_at, current_period_ends_at, trial_ends_at, activated_at, canceled_at, and expires_at. |
Looking up an invoice
Use the Lookup invoice action to retrieve invoice details by invoice number or UUID. The output includes pdf_url, which provides a direct link to download the invoice PDF.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Invoice IDInvoice ID can be either an invoice number (for example, 1234) or UUID. |
| Output | Invoice details including id, number, account_code, state, type, subtotal, tax, total, balance, currency, created_at, due_at, closed_at, and pdf_url. |
Looking up a transaction
Use the Lookup transaction action to retrieve payment transaction details by UUID. Use this action to retrieve detailed payment transaction information, including payment method, gateway response, and transaction status. The output includes timestamps for voids and refunds if applicable.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Transaction UUID
|
| Output | Transaction details including uuid, account_code, invoice_number, subscription_uuid, type, status, amount, currency, payment_method, gateway_code, gateway_message, created_at, voided_at, and refunded_at. |