Skip to main content
POST
/
api
/
v1
/
cardholders
/
{id}
/
payment-method
/
setup
curl -X POST https://api.agentcard.sh/api/v1/cardholders/ch_abc123/payment-method/setup \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json"
{
  "checkoutUrl": "https://checkout.stripe.com/c/pay/cs_test_...",
  "stripeSessionId": "cs_test_abc123"
}
Creates a Stripe Checkout session that lets a cardholder attach a payment method (credit or debit card). Once the checkout completes, the payment method is saved to the cardholder and can be used to fund future card creations via PaymentIntent holds. A cardholder must have a payment method attached before you can create cards for them.

Path parameters

id
string
required
The cardholder’s unique identifier.

Response

checkoutUrl
string
Stripe Checkout URL. Redirect the cardholder (or payer) to this URL to attach a payment method.
stripeSessionId
string
Stripe Checkout session identifier.
curl -X POST https://api.agentcard.sh/api/v1/cardholders/ch_abc123/payment-method/setup \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json"
{
  "checkoutUrl": "https://checkout.stripe.com/c/pay/cs_test_...",
  "stripeSessionId": "cs_test_abc123"
}