Create a payment method
Exchanges a one-time payment token for a PaymentMethod.
Pass reusable: true for an instrument that can be charged multiple
times; reusable: false for a single-use token consumed on its first
charge. Supply a customer id to attach the method to that customer in
the same request. Send an Idempotency-Key header so a retried request
does not vault the same card twice.
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.
255Body
The payment method type. Currently only card is supported.
card A one-time payment token created by the client-side card form.
true for an instrument that can be charged multiple times; false for a single-use token consumed on its first charge.
Three-letter ISO currency code.
Customer id (cus_…) to attach this method to immediately after creation.
Optional. When provided, becomes the method's initial billing details.
A string key-value map for storing your own structured data.
Response
The created payment method.
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.
Card details returned for type: card_present, or null when unavailable. Null for type: card.
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.
Unix epoch seconds.
Billing details captured for this method. Null when not supplied.

