A valid request URL is required to generate request examples{
"wallet_origin": "unknown",
"wallet_origin_evidence": "unknown",
"id": "<string>",
"object": "payment_method",
"type": "card",
"livemode": true,
"reusable": true,
"status": "active",
"customer": "<string>",
"card": {
"last4": "<string>",
"brand": "visa",
"exp_month": 123,
"exp_year": 123,
"funding_type": "credit",
"country": "<string>"
},
"card_present": {
"bin": "<string>",
"last4": "<string>",
"brand": "visa",
"funding_type": "credit",
"entry_method": "chip"
},
"fingerprint": "<string>",
"metadata": {},
"created_at": 123,
"billing_details": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
}
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "reusable is required"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "PAYMENT_METHOD_NOT_FOUND",
"message": "payment method not found"
}
}{
"error": {
"code": "PAYMENT_METHOD_CONSUMED",
"message": "payment method has already been consumed"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Attach a payment method to a customer
Associates an active payment method with a customer. The method must
not already be attached; attachment is write-once. Send an
Idempotency-Key header to make concurrent retries safe.
A valid request URL is required to generate request examples{
"wallet_origin": "unknown",
"wallet_origin_evidence": "unknown",
"id": "<string>",
"object": "payment_method",
"type": "card",
"livemode": true,
"reusable": true,
"status": "active",
"customer": "<string>",
"card": {
"last4": "<string>",
"brand": "visa",
"exp_month": 123,
"exp_year": 123,
"funding_type": "credit",
"country": "<string>"
},
"card_present": {
"bin": "<string>",
"last4": "<string>",
"brand": "visa",
"funding_type": "credit",
"entry_method": "chip"
},
"fingerprint": "<string>",
"metadata": {},
"created_at": 123,
"billing_details": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
}
}
}{
"error": {
"code": "INVALID_REQUEST",
"message": "reusable is required"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "PAYMENT_METHOD_NOT_FOUND",
"message": "payment method not found"
}
}{
"error": {
"code": "PAYMENT_METHOD_CONSUMED",
"message": "payment method has already been consumed"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.
255Merchant ID when an authorized Platform acts for a connected Merchant. Omit when authenticating directly as that Merchant.
^mer_[0-9A-Za-z]{14}$Path Parameters
The payment method id (pm_…).
Body
The customer id to attach (cus_…).
Response
The updated payment method with the customer attached.
Wallet used when this instrument was created. A later stored-card charge does not reuse this wallet classification.
unknown, none, apple_pay, google_pay Source of the wallet origin observation.
unknown, client_reported, server, provider The payment method id (pm_…).
Always payment_method.
payment_method card is an online/vaulted card. card_present is Ionic's read-only record of one physical Terminal presentation.
card, card_present Whether this method belongs to the live (true) or test (false) environment.
true when the method can be charged multiple times; false for a single-use method that is consumed by its first charge. Only reusable methods can become expired or revoked; single-use methods cannot be revoked and never expire.
active: eligible for its type-specific application flow. consumed: used by a single-use charge. expired: network-expired reusable card. revoked: permanently deactivated by the merchant. A card_present method is staged active and consumed atomically by Terminal payment processing; clients cannot charge it directly.
active, consumed, expired, revoked The attached customer id (cus_…), or null if not attached.
Card details. Present for type: card; null otherwise.
Show child attributes
Show child attributes
Card details returned for type: card_present, or null when unavailable. Null for type: card.
Show child attributes
Show child attributes
Stable card identifier for duplicate detection when available. Always empty for type: card_present.
A string key-value map for storing your own structured data.
Show child attributes
Show child attributes
Unix epoch seconds.
Billing details captured for this method. Null when not supplied.
Show child attributes
Show child attributes

