post

POST /v2/affiliatePaymentMethods — Add a payment method

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Adds a Stripe payment method to the authenticated affiliate's Telegra billing profile.

For cards, obtain a paymentMethodId (pm_xxx) via Stripe.js, then call this endpoint. The paymentMethodType field can be omitted for cards.

For ACH bank accounts, complete the SetupIntent flow first (see POST /ach-setup-intent), then call this endpoint with paymentMethodType: "us_bank_account". The bank account is already attached to the Stripe customer by the time you call this — the endpoint registers it in Telegra's billing profile.

Request body

FieldTypeRequiredDescription
paymentMethodIdstringYesStripe payment method ID (pm_xxx)
paymentMethodTypestringNoSet to us_bank_account for ACH; omit or set to card for credit/debit cards

Response

Returns 201 Created with the added payment method details.

Card response (data)

FieldDescription
paymentMethodIdStripe pm_xxx ID
billingProfileIdTelegra internal billing profile ID
paymentMethodDetails.typecard
paymentMethodDetails.cardBrande.g. visa, mastercard
paymentMethodDetails.last4Last 4 digits
paymentMethodDetails.expMonthExpiry month (1–12)
paymentMethodDetails.expYearExpiry year (4-digit)
paymentMethodDetails.isDefaultWhether this is the default method
paymentMethodDetails.nameCardholder name
paymentMethodDetails.postalCodeBilling postal code

ACH bank account response (data)

FieldDescription
paymentMethodIdStripe pm_xxx ID
billingProfileIdTelegra internal billing profile ID
paymentMethodDetails.typeus_bank_account
paymentMethodDetails.bankNameBank name
paymentMethodDetails.last4Last 4 digits of account number
paymentMethodDetails.accountTypechecking or savings
paymentMethodDetails.isDefaultWhether this is the default method
paymentMethodDetails.nameAccount holder name

Errors

ErrorCause
PAYMENT_METHOD_CANNOT_BE_REUSEDThe Stripe payment method was previously detached and can no longer be attached
PAYMENT_METHOD_ATTACHMENT_FAILEDStripe rejected the attachment for another reason

Required role

affiliate_super_admin, affiliate_admin, or affiliate_agent

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!