For Developers

Add Payment Method

POST https://ed.link/api/v2/teams/:team_id/payment_methods

Generates a Stripe SetupIntent client secret used with Stripe.js to securely collect payment details on the client side.

Permissions

Requires the payment_methods.create system permission.

Parameters

ParameterTypeRequiredDescription
:team_idUUIDYesThe ID of the team.

Sample Request

const response = await axios.post(
    `https://ed.link/api/v2/teams/${team_id}/payment_methods`,
    {},
    {
        headers: {
            authorization: `Bearer ${user_session_token}`
        }
    }
);

Sample Response

{
    "$data": {
        "client_secret": "seti_1P48ab2eZvKYlo2C_secret_Q482910..."
    }
}