Subscription Invoice Account

Create Prepayment

POST
/subscriptions/{subscription_id}/prepayments.json

Creates a prepayment for a subscription.

In order to specify a prepayment made against a subscription, specify the amount, memo, details, method.

When the method specified is "credit_card_on_file", the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.

Note that passing amount_in_cents is now allowed.

3D Secure (3DS) Authentication post-authentication flow

When a payment requires 3DS Authentication to adhere to Strong Customer Authentication (SCA), the request enters a post-authentication flow where a 422 Unprocessable Entity status is returned with an action_link that will direct the customer through 3DS Authentication.

See the 3D Secure Post-Authentication Flow article in the product documentation to learn how to manage the redirect flow.

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

prepayment*

Response Body

application/json

application/json

curl -X POST "https://example.com/subscriptions/0/prepayments.json" \  -H "Content-Type: application/json" \  -d '{    "prepayment": {      "amount": 100,      "details": "John Doe signup for $100",      "memo": "Signup for $100",      "method": "check"    }  }'
{  "prepayment": {    "id": 1,    "subscription_id": 1,    "amount_in_cents": 10000,    "memo": "John Doe - Prepayment",    "created_at": "2020-07-31T05:52:32-04:00",    "starting_balance_in_cents": 0,    "ending_balance_in_cents": -10000  }}