get
https://example.com
PUT /v2/affiliatePaymentMethods/{paymentMethodId}/actions/set-default — Set default payment method
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Marks a payment method as the default for the affiliate. Updates both Stripe (sets it as the customer's invoice_settings.default_payment_method) and Telegra's local billing profile (flips isDefault on each stored method).
Path parameters
| Parameter | Description |
|---|---|
paymentMethodId | Stripe payment method ID (pm_xxx) to set as default |
Response
{
"success": true,
"message": "Default payment method updated successfully",
"data": {
"paymentMethodId": "pm_xxx"
}
}Errors
| Error | Cause |
|---|---|
INVALID_PAYMENT_METHOD | The paymentMethodId is not associated with this affiliate's billing profile |
Required role
affiliate_super_admin, affiliate_admin, or affiliate_agent
