Payment Profiles

Change Subscription Group Default Payment Profile

POST
/subscription_groups/{uid}/payment_profiles/{payment_profile_id}/change_payment_profile.json

Changes the default payment profile on the subscription group to the existing payment profile with the specified ID.

You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint.

The new payment profile must belong to the subscription group's customer, otherwise you will receive an error.

Authorization

BasicAuth
AuthorizationBasic <token>

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

In: header

Path Parameters

uid*string

The uid of the subscription group

payment_profile_id*integer

The Chargify id of the payment profile

Response Body

application/json

application/json

curl -X POST "https://example.com/subscription_groups/string/payment_profiles/0/change_payment_profile.json"
{  "payment_profile": {    "id": 10211899,    "first_name": "Amelia",    "last_name": "Example",    "masked_card_number": "XXXX-XXXX-XXXX-1",    "card_type": "bogus",    "expiration_month": 2,    "expiration_year": 2018,    "customer_id": 14399371,    "current_vault": "bogus",    "vault_token": "1",    "billing_address": "",    "billing_city": "",    "billing_state": "",    "billing_zip": "",    "billing_country": "",    "customer_vault_token": null,    "billing_address_2": "",    "payment_type": "credit_card",    "site_gateway_setting_id": 1,    "gateway_handle": null  }}