Maxio

App · 25 actions

Manage customers, subscriptions, usage and invoices in Maxio Advanced Billing (formerly Chargify).

Actions

ActionWhat it does
Cancel subscriptionCancel a subscription now, so it stops renewing.
Create customerCreate a customer, whom you can then sign up for subscriptions.
Create subscriptionSign an existing customer up to a product.
Delete customerDelete a customer.
Get customerGet a customer's details.
Get invoiceGet an invoice with its amounts, dates, status and line items.
Get subscriptionGet a subscription with its state, product, customer and billing dates.
List componentsList the add-ons and usage-based components of your products.
List couponsList your coupons with their codes and discounts.
List customersList your customers, or search them by name, email, company, reference or ID.
List eventsList what has happened on your site, such as signups, payments, renewals and state changes, newest first.
List invoicesList invoices, filtered by status, subscription, customer or a date.
List product familiesList your product families, the groups your products, components and coupons belong to.
List productsList the products customers can subscribe to, with their prices and handles.
List subscription componentsList the components on a subscription, with their allocated quantities.
List subscriptionsList subscriptions, filtered by state, customer or a date.
Pause subscriptionPut a subscription on hold so it stops renewing.
Reactivate subscriptionReactivate a canceled subscription or one whose trial ended.
Record invoice paymentRecord a payment received outside Maxio, such as a check or bank transfer, against an invoice.
Record usageRecord usage of a metered or prepaid component, such as API calls or hours, for the next invoice.
Resume subscriptionTake a subscription off hold.
Update customerChange a customer's details.
Update subscriptionChange a subscription's product, billing date, end date, reference or how it is paid.
Validate couponCheck that a coupon code exists and can be used, and get its discount.
Void invoiceVoid an open, pending or canceled invoice so it is no longer owed.

Cancel subscription

Cancel a subscription now, so it stops renewing. It can be reactivated later.

Inputs

Subscriptionsubscription_idnumberRequired
The Maxio subscription.
Reasoncancellation_messagetext
Why it is being canceled, for your own records.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "activated_at": "example",
    "automatically_resume_at": "example",
    "balance_in_cents": 1,
    "canceled_at": "example",
    "cancellation_message": "example",
    "coupon_codes": [
      "example"
    ],
    "created_at": "example",
    "currency": "example",
    "current_billing_amount_in_cents": 1,
    "current_period_ends_at": "example",
    "current_period_started_at": "example",
    "customer": {
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "expires_at": "example",
    "id": 1,
    "next_assessment_at": "example",
    "on_hold_at": "example",
    "payment_collection_method": "example",
    "previous_state": "example",
    "product": {
      "handle": "example",
      "id": 1,
      "name": "example",
      "price_in_cents": 1
    },
    "product_price_in_cents": 1,
    "reference": "example",
    "state": "example",
    "total_revenue_in_cents": 1,
    "updated_at": "example"
  }
}

Create customer

Create a customer, whom you can then sign up for subscriptions.

Inputs

First namefirst_nametextRequired
The customer's first name.
Last namelast_nametextRequired
The customer's last name.
EmailemailtextRequired
The email address Maxio sends invoices and receipts to.
CC emailscc_emailstext
More addresses to copy on emails, separated by commas.
Companyorganizationtext
The customer's company name.
Referencereferencetext
Your own unique ID for the customer, such as the ID in your app.
Phonephonetext
The customer's phone number.
Addressaddresstext
The first line of the billing address.
Address line 2address_2text
The second line of the billing address.
Citycitytext
The billing address's city.
Statestatetext
The state or region as its ISO code, such as MA for Massachusetts.
Postal codeziptext
The postal or ZIP code.
Countrycountrytext
The country as its two-letter ISO code, such as US or GB.
Languagelocaletext
The language for this customer's invoices, such as en-US or es-MX.
VAT numbervat_numbertext
The customer's VAT number.
Tax exempttax_exempttrue/false
Whether the customer is exempt from tax.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "address": "example",
    "address_2": "example",
    "cc_emails": "example",
    "city": "example",
    "country": "example",
    "created_at": "example",
    "email": "example",
    "first_name": "example",
    "id": 1,
    "last_name": "example",
    "locale": "example",
    "organization": "example",
    "parent_id": 1,
    "phone": "example",
    "reference": "example",
    "state": "example",
    "tax_exempt": true,
    "updated_at": "example",
    "vat_number": "example",
    "zip": "example"
  }
}

Create subscription

Sign an existing customer up to a product. With Send an invoice, no card is needed.

Inputs

Customercustomer_idnumberRequired
The customer to subscribe.
Productproduct_handletextRequired
The product to subscribe them to.
Collect payment bypayment_collection_methodtext
How Maxio collects payment: charge the customer's saved payment method, send an invoice, or draw on a prepaid balance.One of: automatic (Charge the saved payment method), remittance (Send an invoice), prepaid (Prepaid balance).
Coupon codescoupon_codeslist
Coupon codes to apply.
Referencereferencetext
Your own unique ID for the subscription.
First billingnext_billing_atdate and time
Bill first at this time instead of now. No trial or signup charges apply, which suits moving existing subscribers over.
Expiresexpires_atdate and time
When the subscription ends. Leave empty to keep renewing.
Payment terms (days)net_termsnumber
For invoiced subscriptions, how many days after an invoice is issued it is due, from 0 to 180.From 0 to 180.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "activated_at": "example",
    "automatically_resume_at": "example",
    "balance_in_cents": 1,
    "canceled_at": "example",
    "cancellation_message": "example",
    "coupon_codes": [
      "example"
    ],
    "created_at": "example",
    "currency": "example",
    "current_billing_amount_in_cents": 1,
    "current_period_ends_at": "example",
    "current_period_started_at": "example",
    "customer": {
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "expires_at": "example",
    "id": 1,
    "next_assessment_at": "example",
    "on_hold_at": "example",
    "payment_collection_method": "example",
    "previous_state": "example",
    "product": {
      "handle": "example",
      "id": 1,
      "name": "example",
      "price_in_cents": 1
    },
    "product_price_in_cents": 1,
    "reference": "example",
    "state": "example",
    "total_revenue_in_cents": 1,
    "updated_at": "example"
  }
}

Delete customer

Delete a customer. Maxio refuses while the customer has subscriptions.

Inputs

Customercustomer_idnumberRequired
The Maxio customer.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {}
}

Get customer

Get a customer's details.

Inputs

Customercustomer_idnumberRequired
The Maxio customer.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "address": "example",
    "address_2": "example",
    "cc_emails": "example",
    "city": "example",
    "country": "example",
    "created_at": "example",
    "email": "example",
    "first_name": "example",
    "id": 1,
    "last_name": "example",
    "locale": "example",
    "organization": "example",
    "parent_id": 1,
    "phone": "example",
    "reference": "example",
    "state": "example",
    "tax_exempt": true,
    "updated_at": "example",
    "vat_number": "example",
    "zip": "example"
  }
}

Get invoice

Get an invoice with its amounts, dates, status and line items.

Inputs

Invoiceinvoice_uidtextRequired
The invoice. Its ID starts with inv_; it is not the invoice number.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "collection_method": "example",
    "created_at": "example",
    "currency": "example",
    "customer": {
      "chargify_id": 1,
      "email": "example",
      "first_name": "example",
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "customer_id": 1,
    "discount_amount": "example",
    "due_amount": "example",
    "due_date": "example",
    "issue_date": "example",
    "memo": "example",
    "number": "example",
    "paid_amount": "example",
    "paid_date": "example",
    "product_name": "example",
    "public_url": "example",
    "status": "example",
    "subscription_id": 1,
    "subtotal_amount": "example",
    "tax_amount": "example",
    "total_amount": "example",
    "uid": "example",
    "updated_at": "example"
  }
}

Get subscription

Get a subscription with its state, product, customer and billing dates.

Inputs

Subscriptionsubscription_idnumberRequired
The Maxio subscription.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "activated_at": "example",
    "automatically_resume_at": "example",
    "balance_in_cents": 1,
    "canceled_at": "example",
    "cancellation_message": "example",
    "coupon_codes": [
      "example"
    ],
    "created_at": "example",
    "currency": "example",
    "current_billing_amount_in_cents": 1,
    "current_period_ends_at": "example",
    "current_period_started_at": "example",
    "customer": {
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "expires_at": "example",
    "id": 1,
    "next_assessment_at": "example",
    "on_hold_at": "example",
    "payment_collection_method": "example",
    "previous_state": "example",
    "product": {
      "handle": "example",
      "id": 1,
      "name": "example",
      "price_in_cents": 1
    },
    "product_price_in_cents": 1,
    "reference": "example",
    "state": "example",
    "total_revenue_in_cents": 1,
    "updated_at": "example"
  }
}

List components

List the add-ons and usage-based components of your products.

Inputs

Include archivedinclude_archivedtrue/false
Include archived components.
Pagepagenumber
Which page of components to read, starting at 1. Use the next_page a previous list step returned.At least 1.
Per pageper_pagenumber
How many components to return, up to 200. Maxio's default is 20.From 1 to 200.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "archived": true,
        "created_at": "example",
        "description": "example",
        "handle": "example",
        "id": 1,
        "kind": "example",
        "name": "example",
        "pricing_scheme": "example",
        "product_family_id": 1,
        "product_family_name": "example",
        "unit_name": "example",
        "updated_at": "example"
      }
    ],
    "next_page": 1
  }
}

List coupons

List your coupons with their codes and discounts.

Inputs

Pagepagenumber
Which page of coupons to read, starting at 1. Use the next_page a previous list step returned.At least 1.
Per pageper_pagenumber
How many coupons to return, up to 200. Maxio's default is 30.From 1 to 200.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "amount_in_cents": 1,
        "archived_at": "example",
        "code": "example",
        "created_at": "example",
        "description": "example",
        "end_date": "example",
        "id": 1,
        "name": "example",
        "percentage": "example",
        "product_family_id": 1,
        "product_family_name": "example",
        "recurring": true,
        "stackable": true,
        "start_date": "example"
      }
    ],
    "next_page": 1
  }
}

List customers

List your customers, or search them by name, email, company, reference or ID.

Inputs

Searchqtext
Search text: an email, a name, a company, a reference or a Maxio ID.
Orderdirectiontext
Newest first or oldest first.One of: desc (Newest first), asc (Oldest first).
Filter by datedate_fieldtext
Which of the customers' dates From and To filter on.One of: created_at (Created), updated_at (Updated).
Fromstart_datedate
Only those on or after this date, in your site's time zone.
Toend_datedate
Only those on or before this date, in your site's time zone.
Pagepagenumber
Which page of customers to read, starting at 1. Use the next_page a previous list step returned.At least 1.
Per pageper_pagenumber
How many customers to return, up to 200. Maxio's default is 50.From 1 to 200.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "address": "example",
        "address_2": "example",
        "cc_emails": "example",
        "city": "example",
        "country": "example",
        "created_at": "example",
        "email": "example",
        "first_name": "example",
        "id": 1,
        "last_name": "example",
        "locale": "example",
        "organization": "example",
        "parent_id": 1,
        "phone": "example",
        "reference": "example",
        "state": "example",
        "tax_exempt": true,
        "updated_at": "example",
        "vat_number": "example",
        "zip": "example"
      }
    ],
    "next_page": 1
  }
}

List events

List what has happened on your site, such as signups, payments, renewals and state changes, newest first.

Inputs

Kinds of eventkindslist
Only these kinds of events. Leave empty for all.One or more of: signup_success (Signup succeeded), signup_failure (Signup failed), payment_success (Payment succeeded), payment_failure (Payment failed), renewal_success (Renewal succeeded), renewal_failure (Renewal failed), subscription_state_change (Subscription state changed), subscription_product_change (Subscription product changed), pending_cancellation_change (Scheduled cancellation changed), billing_date_change (Billing date changed), and 21 more.
From event IDsince_idnumber
Only events with this ID or a later one.
Orderdirectiontext
Newest first or oldest first.One of: desc (Newest first), asc (Oldest first).
Pagepagenumber
Which page of events to read, starting at 1. Use the next_page a previous list step returned.At least 1.
Per pageper_pagenumber
How many events to return, up to 200. Maxio's default is 20.From 1 to 200.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "created_at": "example",
        "customer_id": 1,
        "event_specific_data": {},
        "id": 1,
        "key": "example",
        "message": "example",
        "subscription_id": 1
      }
    ],
    "next_page": 1
  }
}

List invoices

List invoices, filtered by status, subscription, customer or a date.

Inputs

Statusstatustext
Only invoices with this status.One of: draft, open, pending, processing, paid, voided, canceled.
Subscriptionsubscription_idnumber
Only this subscription's invoices.
Customerscustomer_idslist
Only these customers' invoices.
Sort bysorttext
What to sort by. Maxio sorts by invoice number unless told otherwise.One of: number (Invoice number), created_at (Created), updated_at (Updated), issue_date (Issue date), due_date (Due date), status, total_amount (Total), due_amount (Amount due).
Orderdirectiontext
Newest first or oldest first.One of: desc (Newest first), asc (Oldest first).
Filter by datedate_fieldtext
Which of the invoices' dates From and To filter on.One of: due_date (Due date), issue_date (Issue date), paid_date (Paid date), created_at (Created), updated_at (Updated).
Fromstart_datedate
Only those on or after this date, in your site's time zone.
Toend_datedate
Only those on or before this date, in your site's time zone.
Include line itemsline_itemstrue/false
Include each invoice's line items.
Pagepagenumber
Which page of invoices to read, starting at 1. Use the next_page a previous list step returned.At least 1.
Per pageper_pagenumber
How many invoices to return, up to 200. Maxio's default is 20.From 1 to 200.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "collection_method": "example",
        "created_at": "example",
        "currency": "example",
        "customer": {
          "chargify_id": 1,
          "email": "example",
          "first_name": "example",
          "last_name": "example",
          "organization": "example",
          "reference": "example"
        },
        "customer_id": 1,
        "discount_amount": "example",
        "due_amount": "example",
        "due_date": "example",
        "issue_date": "example",
        "memo": "example",
        "number": "example",
        "paid_amount": "example",
        "paid_date": "example",
        "product_name": "example",
        "public_url": "example",
        "status": "example",
        "subscription_id": 1,
        "subtotal_amount": "example",
        "tax_amount": "example",
        "total_amount": "example",
        "uid": "example",
        "updated_at": "example"
      }
    ],
    "next_page": 1
  }
}

List product families

List your product families, the groups your products, components and coupons belong to.

Inputs

None.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "archived_at": "example",
        "created_at": "example",
        "description": "example",
        "handle": "example",
        "id": 1,
        "name": "example",
        "updated_at": "example"
      }
    ]
  }
}

List products

List the products customers can subscribe to, with their prices and handles.

Inputs

Include archivedinclude_archivedtrue/false
Include archived products.
Pagepagenumber
Which page of products to read, starting at 1. Use the next_page a previous list step returned.At least 1.
Per pageper_pagenumber
How many products to return, up to 200. Maxio's default is 20.From 1 to 200.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "archived_at": "example",
        "created_at": "example",
        "description": "example",
        "handle": "example",
        "id": 1,
        "initial_charge_in_cents": 1,
        "interval": 1,
        "interval_unit": "example",
        "name": "example",
        "price_in_cents": 1,
        "product_family": {
          "handle": "example",
          "id": 1,
          "name": "example"
        },
        "require_credit_card": true,
        "trial_price_in_cents": 1,
        "updated_at": "example"
      }
    ],
    "next_page": 1
  }
}

List subscription components

List the components on a subscription, with their allocated quantities.

Inputs

Subscriptionsubscription_idnumberRequired
The Maxio subscription.
Only in usein_usetrue/false
Only components the subscription is using now.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "allocated_quantity": 1,
        "component_handle": "example",
        "component_id": 1,
        "created_at": "example",
        "enabled": true,
        "kind": "example",
        "name": "example",
        "price_point_id": 1,
        "price_point_name": "example",
        "pricing_scheme": "example",
        "subscription_id": 1,
        "unit_balance": 1,
        "unit_name": "example",
        "updated_at": "example"
      }
    ]
  }
}

List subscriptions

List subscriptions, filtered by state, customer or a date.

Inputs

Statestatetext
Only subscriptions in this state.One of: active, trialing, trial_ended (Trial ended), past_due (Past due), unpaid, on_hold (On hold), awaiting_signup (Awaiting signup), awaiting_signup_date (Awaiting signup date), pending_cancellation (Pending cancellation), pending_renewal (Pending renewal), and 5 more.
Customercustomer_idnumber
Only this customer's subscriptions.
Searchqtext
Search text, such as a customer's name or email or a reference.
Sort bysorttext
What to sort by. Maxio sorts by signup date unless told otherwise.One of: signup_date (Signup date), created_at (Created), updated_at (Updated), period_start (Period start), period_end (Period end), next_assessment (Next billing), expires_at (Expires), total_payments (Total paid), open_balance (Open balance), id.
Orderdirectiontext
Newest first or oldest first.One of: desc (Newest first), asc (Oldest first).
Filter by datedate_fieldtext
Which of the subscriptions' dates From and To filter on.One of: created_at (Created), updated_at (Updated), activated_at (Activated), canceled_at (Canceled), expires_at (Expires), current_period_starts_at (Current period start), current_period_ends_at (Current period end), trial_started_at (Trial start), trial_ended_at (Trial end).
Fromstart_datedate
Only those on or after this date, in your site's time zone.
Toend_datedate
Only those on or before this date, in your site's time zone.
Pagepagenumber
Which page of subscriptions to read, starting at 1. Use the next_page a previous list step returned.At least 1.
Per pageper_pagenumber
How many subscriptions to return, up to 200. Maxio's default is 20.From 1 to 200.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "count": 1,
    "items": [
      {
        "activated_at": "example",
        "automatically_resume_at": "example",
        "balance_in_cents": 1,
        "canceled_at": "example",
        "cancellation_message": "example",
        "coupon_codes": [
          "example"
        ],
        "created_at": "example",
        "currency": "example",
        "current_billing_amount_in_cents": 1,
        "current_period_ends_at": "example",
        "current_period_started_at": "example",
        "customer": {
          "email": "example",
          "first_name": "example",
          "id": 1,
          "last_name": "example",
          "organization": "example",
          "reference": "example"
        },
        "expires_at": "example",
        "id": 1,
        "next_assessment_at": "example",
        "on_hold_at": "example",
        "payment_collection_method": "example",
        "previous_state": "example",
        "product": {
          "handle": "example",
          "id": 1,
          "name": "example",
          "price_in_cents": 1
        },
        "product_price_in_cents": 1,
        "reference": "example",
        "state": "example",
        "total_revenue_in_cents": 1,
        "updated_at": "example"
      }
    ],
    "next_page": 1
  }
}

Pause subscription

Put a subscription on hold so it stops renewing. Maxio refuses within 24 hours of the next billing date.

Inputs

Subscriptionsubscription_idnumberRequired
The Maxio subscription.
Resume onautomatically_resume_atdate and time
Resume the subscription at this time. Leave empty to keep it on hold until it is resumed.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "activated_at": "example",
    "automatically_resume_at": "example",
    "balance_in_cents": 1,
    "canceled_at": "example",
    "cancellation_message": "example",
    "coupon_codes": [
      "example"
    ],
    "created_at": "example",
    "currency": "example",
    "current_billing_amount_in_cents": 1,
    "current_period_ends_at": "example",
    "current_period_started_at": "example",
    "customer": {
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "expires_at": "example",
    "id": 1,
    "next_assessment_at": "example",
    "on_hold_at": "example",
    "payment_collection_method": "example",
    "previous_state": "example",
    "product": {
      "handle": "example",
      "id": 1,
      "name": "example",
      "price_in_cents": 1
    },
    "product_price_in_cents": 1,
    "reference": "example",
    "state": "example",
    "total_revenue_in_cents": 1,
    "updated_at": "example"
  }
}

Reactivate subscription

Reactivate a canceled subscription or one whose trial ended. The customer may be charged for a new period.

Inputs

Subscriptionsubscription_idnumberRequired
The Maxio subscription.
Resume the canceled periodresumetrue/false
Pick up the billing period it was canceled in, if that period has not ended, instead of starting a new one.
Include trialinclude_trialtrue/false
Start with the product's trial, if it has one.
Keep balancepreserve_balancetrue/false
Keep the balance it had when canceled instead of clearing it.
Coupon codecoupon_codetext
A coupon code to apply on reactivation.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "activated_at": "example",
    "automatically_resume_at": "example",
    "balance_in_cents": 1,
    "canceled_at": "example",
    "cancellation_message": "example",
    "coupon_codes": [
      "example"
    ],
    "created_at": "example",
    "currency": "example",
    "current_billing_amount_in_cents": 1,
    "current_period_ends_at": "example",
    "current_period_started_at": "example",
    "customer": {
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "expires_at": "example",
    "id": 1,
    "next_assessment_at": "example",
    "on_hold_at": "example",
    "payment_collection_method": "example",
    "previous_state": "example",
    "product": {
      "handle": "example",
      "id": 1,
      "name": "example",
      "price_in_cents": 1
    },
    "product_price_in_cents": 1,
    "reference": "example",
    "state": "example",
    "total_revenue_in_cents": 1,
    "updated_at": "example"
  }
}

Record invoice payment

Record a payment received outside Maxio, such as a check or bank transfer, against an invoice.

Inputs

Invoiceinvoice_uidtextRequired
The invoice. Its ID starts with inv_; it is not the invoice number.
AmountamountnumberRequired
How much was paid, in the invoice's currency, for example 10.50.At least 0.01.
Paid bymethodtext
How the customer paid. Maxio uses Other when this is empty.One of: check, cash, money_order (Money order), ach (ACH bank transfer), credit_card (Card), other.
Detailsdetailstext
Details of the payment, such as a check number.
Memomemotext
A note about the payment.
Received onreceived_ondate
The date the payment was received. It must be in the past.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "collection_method": "example",
    "created_at": "example",
    "currency": "example",
    "customer": {
      "chargify_id": 1,
      "email": "example",
      "first_name": "example",
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "customer_id": 1,
    "discount_amount": "example",
    "due_amount": "example",
    "due_date": "example",
    "issue_date": "example",
    "memo": "example",
    "number": "example",
    "paid_amount": "example",
    "paid_date": "example",
    "product_name": "example",
    "public_url": "example",
    "status": "example",
    "subscription_id": 1,
    "subtotal_amount": "example",
    "tax_amount": "example",
    "total_amount": "example",
    "uid": "example",
    "updated_at": "example"
  }
}

Record usage

Record usage of a metered or prepaid component, such as API calls or hours, for the next invoice.

Inputs

Subscriptionsubscription_idnumberRequired
The Maxio subscription.
Componentcomponent_idnumberRequired
The metered or prepaid component on the subscription.
QuantityquantitynumberRequired
How many units were used. Whole numbers unless the component allows fractions.
Memomemotext
A note shown with the usage, such as what it was for.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "component_handle": "example",
    "component_id": 1,
    "created_at": "example",
    "id": 1,
    "memo": "example",
    "price_point_id": 1,
    "quantity": 1,
    "subscription_id": 1
  }
}

Resume subscription

Take a subscription off hold. If its renewal date has passed, Maxio bills it now.

Inputs

Subscriptionsubscription_idnumberRequired
The Maxio subscription.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "activated_at": "example",
    "automatically_resume_at": "example",
    "balance_in_cents": 1,
    "canceled_at": "example",
    "cancellation_message": "example",
    "coupon_codes": [
      "example"
    ],
    "created_at": "example",
    "currency": "example",
    "current_billing_amount_in_cents": 1,
    "current_period_ends_at": "example",
    "current_period_started_at": "example",
    "customer": {
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "expires_at": "example",
    "id": 1,
    "next_assessment_at": "example",
    "on_hold_at": "example",
    "payment_collection_method": "example",
    "previous_state": "example",
    "product": {
      "handle": "example",
      "id": 1,
      "name": "example",
      "price_in_cents": 1
    },
    "product_price_in_cents": 1,
    "reference": "example",
    "state": "example",
    "total_revenue_in_cents": 1,
    "updated_at": "example"
  }
}

Update customer

Change a customer's details. Anything left empty stays as it is.

Inputs

Customercustomer_idnumberRequired
The Maxio customer.
First namefirst_nametext
The customer's first name.
Last namelast_nametext
The customer's last name.
Emailemailtext
The email address Maxio sends invoices and receipts to.
CC emailscc_emailstext
More addresses to copy on emails, separated by commas.
Companyorganizationtext
The customer's company name.
Referencereferencetext
Your own unique ID for the customer, such as the ID in your app.
Phonephonetext
The customer's phone number.
Addressaddresstext
The first line of the billing address.
Address line 2address_2text
The second line of the billing address.
Citycitytext
The billing address's city.
Statestatetext
The state or region as its ISO code, such as MA for Massachusetts.
Postal codeziptext
The postal or ZIP code.
Countrycountrytext
The country as its two-letter ISO code, such as US or GB.
Languagelocaletext
The language for this customer's invoices, such as en-US or es-MX.
VAT numbervat_numbertext
The customer's VAT number.
Tax exempttax_exempttrue/false
Whether the customer is exempt from tax.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "address": "example",
    "address_2": "example",
    "cc_emails": "example",
    "city": "example",
    "country": "example",
    "created_at": "example",
    "email": "example",
    "first_name": "example",
    "id": 1,
    "last_name": "example",
    "locale": "example",
    "organization": "example",
    "parent_id": 1,
    "phone": "example",
    "reference": "example",
    "state": "example",
    "tax_exempt": true,
    "updated_at": "example",
    "vat_number": "example",
    "zip": "example"
  }
}

Update subscription

Change a subscription's product, billing date, end date, reference or how it is paid. Anything left empty stays as it is.

Inputs

Subscriptionsubscription_idnumberRequired
The Maxio subscription.
New productproduct_handletext
Move the subscription to this product.
Change product at renewalproduct_change_delayedtrue/false
Make the product change at the next renewal instead of now.
Next billingnext_billing_atdate and time
Move the next billing date to this time.
Expiresexpires_atdate and time
When the subscription ends.
Referencereferencetext
Your own unique ID for the subscription.
Collect payment bypayment_collection_methodtext
How Maxio collects payment from now on.One of: automatic (Charge the saved payment method), remittance (Send an invoice), prepaid (Prepaid balance).
Email invoicesreceives_invoice_emailstrue/false
Whether the customer is emailed this subscription's invoices.
Payment terms (days)net_termsnumber
Days after an invoice is issued that it is due, from 0 to 180.From 0 to 180.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "activated_at": "example",
    "automatically_resume_at": "example",
    "balance_in_cents": 1,
    "canceled_at": "example",
    "cancellation_message": "example",
    "coupon_codes": [
      "example"
    ],
    "created_at": "example",
    "currency": "example",
    "current_billing_amount_in_cents": 1,
    "current_period_ends_at": "example",
    "current_period_started_at": "example",
    "customer": {
      "email": "example",
      "first_name": "example",
      "id": 1,
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "expires_at": "example",
    "id": 1,
    "next_assessment_at": "example",
    "on_hold_at": "example",
    "payment_collection_method": "example",
    "previous_state": "example",
    "product": {
      "handle": "example",
      "id": 1,
      "name": "example",
      "price_in_cents": 1
    },
    "product_price_in_cents": 1,
    "reference": "example",
    "state": "example",
    "total_revenue_in_cents": 1,
    "updated_at": "example"
  }
}

Validate coupon

Check that a coupon code exists and can be used, and get its discount. An unknown code fails the step.

Inputs

CodecodetextRequired
The coupon code to check.
Product familyproduct_family_idnumber
Only accept the code in this product family.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "amount_in_cents": 1,
    "archived_at": "example",
    "code": "example",
    "created_at": "example",
    "description": "example",
    "end_date": "example",
    "id": 1,
    "name": "example",
    "percentage": "example",
    "product_family_id": 1,
    "product_family_name": "example",
    "recurring": true,
    "stackable": true,
    "start_date": "example"
  }
}

Void invoice

Void an open, pending or canceled invoice so it is no longer owed. This cannot be undone.

Inputs

Invoiceinvoice_uidtextRequired
The invoice. Its ID starts with inv_; it is not the invoice number.
ReasonreasontextRequired
Why the invoice is voided. It is kept with the invoice.

Outputs

dataobject
The response from Maxio.
Example output
{
  "data": {
    "collection_method": "example",
    "created_at": "example",
    "currency": "example",
    "customer": {
      "chargify_id": 1,
      "email": "example",
      "first_name": "example",
      "last_name": "example",
      "organization": "example",
      "reference": "example"
    },
    "customer_id": 1,
    "discount_amount": "example",
    "due_amount": "example",
    "due_date": "example",
    "issue_date": "example",
    "memo": "example",
    "number": "example",
    "paid_amount": "example",
    "paid_date": "example",
    "product_name": "example",
    "public_url": "example",
    "status": "example",
    "subscription_id": 1,
    "subtotal_amount": "example",
    "tax_amount": "example",
    "total_amount": "example",
    "uid": "example",
    "updated_at": "example"
  }
}

On this page