Save a tokenized payment method for a customer
Saves a payment method for the customer from a one-time `token`. The customer must already have a linked Hyperswitch customer identity (otherwise 404). The request is routed to the engine's `/v1/customers/{id}/payment-methods` extension path; the response is the engine payment-method object (loosely typed; extra fields pass through). Pass an `Idempotency-Key` header to make retries safe.
Authentication
x-api-keystring
A scoped MvsPayApiKey, e.g. mvspay_live_…. Mint and scope keys from the dashboard (Settings → API Keys).
Path parameters
id
The org-scoped billing customer id.
Headers
Idempotency-Key
Client-supplied idempotency key for safe retries.
Request
This endpoint expects an object.
token
One-time token representing the card to save.
Response
The saved payment method as returned by the engine.
payment_method_id
brand
last4
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error
502
Bad Gateway Error