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
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:payment_method_id | String | Yes | Stripe payment method ID (pm_...). |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
primary | Boolean | Yes | Set 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
}
}
