kepa
Server-side payments/createPaymentMethod

Create a payment method

Planned
Planned. This contract is published ahead of the build. It is not callable yet — treat it as the shape to design against, not a live endpoint.

Save a tokenized card as a reusable payment method.

POST/v1/cnp/payment-methods
Create a reusable payment method from a full PAN or a vault token. Raw PAN is accepted only from a PCI-L1 source — your own L1 environment, or a token vault such as Basis Theory — asserted with the `X-PCI-Source` header. Most integrations should use a token and never touch a PAN.

Request body

application/json

typeenumRequired
card
Example "card"
tokenstring

A single-use token from a vault. Preferred over a raw PAN.

Example "tok_basistheory_9c2a"
cardobject

Raw card. Requires the X-PCI-Source header. Omit if using a token.

customerIdstring

Attach the method to a customer for reuse.

Example "cus_123"
billingDetailsobject

Response

application/json

idstring
Example "pm_9c2a4f10"
typestring
Example "card"
customerIdstringnullable
Example "cus_123"
cardobject
createdAtstring · ISO 8601
Example "2026-04-09T09:14:22Z"

createPaymentMethod