Subscription Invoice Account

Refund Prepayment

POST
/subscriptions/{subscription_id}/prepayments/{prepayment_id}/refunds.json

Refunds a prepayment applied to a subscription, either fully or partially. The prepayment_id will be the account transaction ID of the original payment. The prepayment must have some amount remaining in order to be refunded.

The amount may be passed either as a decimal, with amount, or an integer in cents, with amount_in_cents.

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.

prepayment_id*integer

id of prepayment

Formatint64

Request Body

application/json

refund*

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/subscriptions/0/prepayments/0/refunds.json" \  -H "Content-Type: application/json" \  -d '{    "refund": {      "amount_in_cents": 0,      "amount": "string",      "memo": "string"    }  }'
{  "prepayment": {    "id": 0,    "subscription_id": 0,    "amount_in_cents": 0,    "remaining_amount_in_cents": 0,    "refunded_amount_in_cents": 0,    "details": "string",    "external": true,    "memo": "string",    "payment_type": "check",    "created_at": "2019-08-24T14:15:22Z"  }}