For Developers

Set Primary Payment Method

PATCH https://ed.link/api/v2/teams/:team_id/payment_methods/:payment_method_id

Sets the specified payment method as the primary payment instrument for the team.

Permissions

Requires the payment_methods.update system permission.

Parameters

ParameterTypeRequiredDescription
:team_idUUIDYesThe ID of the team.
:payment_method_idStringYesStripe payment method ID (pm_...).

Request Body

PropertyTypeRequiredDescription
primaryBooleanYesSet to true to designate as default.

Sample Request

const response = await axios.patch(
    `https://ed.link/api/v2/teams/${team_id}/payment_methods/${payment_method_id}`,
    {
        primary: true
    },
    {
        headers: {
            authorization: `Bearer ${user_session_token}`,
            'content-type': 'application/json'
        }
    }
);

Sample Response

{
    "$data": {
        "success": true
    }
}