Invoices

Record Payment For Subscription

POST
/subscriptions/{subscription_id}/payments.json

Records an external payment made against a subscription that will pay partially or in full one or more invoices.

Payment will be applied starting with the oldest open invoice and then next oldest, and so on until the amount of the payment is fully consumed.

Excess payment will result in the creation of a prepayment on the Invoice Account.

Only ungrouped or primary subscriptions may be paid using the "bulk" payment request.

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Path Parameters

subscription_id*integer

The Chargify id of the subscription.

Request Body

application/json

payment*

Response Body

application/json

application/json

curl -X POST "https://example.com/subscriptions/0/payments.json" \  -H "Content-Type: application/json" \  -d '{    "payment": {      "amount": "10.0",      "memo": "to pay the bills",      "payment_details": "check number 8675309",      "payment_method": "check"    }  }'

{  "paid_invoices": [    {      "invoice_id": "inv_bchyhr6z5grby",      "status": "paid",      "due_amount": "0.0",      "paid_amount": "50.0"    },    {      "invoice_id": "inv_bchyhrgvyb6vm",      "status": "paid",      "due_amount": "0.0",      "paid_amount": "50.0"    }  ],  "prepayment": null}