POST

/api/billing/payment-methods

Add payment method

Adds a new payment method (card or Alipay) to the user's account.

curl -s -X POST "$BASE/api/billing/payment-methods" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "card", "paymentMethodId": "pm_xxx"}'

Request Body

FieldTypeReqDefaultDescription
typestring (card | alipay)YPayment method type
paymentMethodIdstringNStripe PaymentMethod ID (for card)

Try it out

Sign in to use your API key
Request Body
Response
Click Execute to test