Read Account Balances
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.
Authorization
BasicAuth The username is a Maxio Chargify API key. The password is x.
In: header
Path Parameters
The Chargify id of the subscription.
Response Body
application/json
curl -X GET "https://example.com/subscriptions/0/account_balances.json"{ "open_invoices": { "balance_in_cents": 0, "automatic_balance_in_cents": 0, "remittance_balance_in_cents": 0 }, "pending_invoices": { "balance_in_cents": 0, "automatic_balance_in_cents": 0, "remittance_balance_in_cents": 0 }, "pending_discounts": { "balance_in_cents": 0, "automatic_balance_in_cents": 0, "remittance_balance_in_cents": 0 }, "service_credits": { "balance_in_cents": 0, "automatic_balance_in_cents": 0, "remittance_balance_in_cents": 0 }, "prepayments": { "balance_in_cents": 0, "automatic_balance_in_cents": 0, "remittance_balance_in_cents": 0 }}Issue Invoice POST
Issues an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. You cannot issue a pending child invoice that was created for a member subscription in a group. For Remittance subscriptions, the invoice will go into "open" status and payment won't be attempted. The value for `on_failed_payment` would be rejected if sent. Any prepayments or service credits that exist on the subscription will be automatically applied. Additionally, if the setting is enabled, an email will be sent for the issued invoice. For Automatic subscriptions, prepayments and service credits will apply to the invoice before payment is attempted. On successful payment, the invoice will go into "paid" status and email will be sent to the customer (if setting applies). When payment fails, the next event depends on the `on_failed_payment` value: - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option. - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history. - `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).
List Prepayments GET
Lists a subscription's prepayments.