Recurly
Manage subscriptions, accounts, and invoices for recurring revenue via the
Recurly v3 API (version v2021-02-25).
This tool wraps the core read and create operations of the Recurly API using only the Python standard library — no third-party packages.
What it does
Branches on an operation and calls the matching Recurly v3 endpoint, returning
the raw JSON payload (as a string) plus the HTTP status. Non-2xx responses from
Recurly are returned with their status and body rather than raising, so callers
can react to validation/auth errors.
Operations
| operation | method + path | notes |
|---|---|---|
list_accounts |
GET /accounts?limit=N |
List customer accounts |
get_account |
GET /accounts/{accountId} |
accountId is the Recurly id, or code-{account_code} to look up by your own code |
create_account |
POST /accounts |
Requires code; optional email, firstName, lastName, company |
list_subscriptions |
GET /subscriptions?limit=N |
List subscriptions |
get_subscription |
GET /subscriptions/{subscriptionId} |
Retrieve one subscription |
list_invoices |
GET /invoices?limit=N |
List invoices |
get_invoice |
GET /invoices/{invoiceId} |
invoiceId is the id, or number-{invoice_number} |
API key setup
- Sign in to the Recurly admin UI.
- Go to Integrations > API Credentials.
- Copy your Private API Key.
The key is used as the HTTP Basic auth username with an empty password
(Authorization: Basic base64("<api_key>:")). The v3 API resolves your site
from the API key, so no subdomain or site name is required.
Every request also sends Accept: application/vnd.recurly.v2021-02-25 to pin
the API version.
Inputs
| input | required | default | description |
|---|---|---|---|
apiKey |
yes | — | Recurly private API key |
operation |
yes | — | one of the operations above |
accountId |
for get_account |
"" | account id or code-{account_code} |
subscriptionId |
for get_subscription |
"" | subscription id |
invoiceId |
for get_invoice |
"" | invoice id or number-{invoice_number} |
code |
for create_account |
"" | your unique account code |
email |
no | "" | create_account email |
firstName |
no | "" | create_account first name |
lastName |
no | "" | create_account last name |
company |
no | "" | create_account company |
limit |
no | 20 |
page size for list ops (1–200) |
Outputs
| output | description |
|---|---|
result |
the Recurly response payload as a JSON string |
status |
the HTTP status code as a string (e.g. 200, 201, 404) |
Examples
List the 10 most recent accounts:
{ "apiKey": "ewr1234...", "operation": "list_accounts", "limit": "10" }
Look up an account by your own account code:
{ "apiKey": "ewr1234...", "operation": "get_account", "accountId": "code-acme-co" }
Create a new account:
{
"apiKey": "ewr1234...",
"operation": "create_account",
"code": "acme-co",
"email": "[email protected]",
"firstName": "Ada",
"lastName": "Lovelace",
"company": "Acme Co"
}
List invoices:
{ "apiKey": "ewr1234...", "operation": "list_invoices", "limit": "20" }
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
erroroperationresultstatustruncated
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey |
string | yes | — | DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change. |
operation |
string | yes | — | One of: list_accounts, get_account, create_account, list_subscriptions, get_subscription, list_invoices, get_invoice |
accountId |
string | no | — | Account id — for get_account use the Recurly id, or 'code-{account_code}' to look up by your own code. Required for get_account. |
subscriptionId |
string | no | — | Subscription id — required for get_subscription. |
invoiceId |
string | no | — | Invoice id (or 'number-{invoice_number}') — required for get_invoice. |
code |
string | no | — | Your unique account code — required for create_account. |
email |
string | no | — | Account email — used by create_account. |
firstName |
string | no | — | Account first name — used by create_account. |
lastName |
string | no | — | Account last name — used by create_account. |
company |
string | no | — | Account company name — used by create_account. |
limit |
string | no | 20 |
Page size for list operations (1-200, Recurly default 20). |