Skip to content

Creates a card payment method

Request

POST {{baseURL}}/pay-api/v1/customers/{{customerId}}/payment-methods/cards

This endpoint adds a payment method for credit and debit cards.

See Also:
To list a customer's payment methods, see GET /pay-api/v1/customers/{customerId}/payment-methods.
To create an ACH payment method for a customer, see POST /pay-api/v1/customers/{customerId}/payment-methods/ach.
To update a customer's payment method, see PUT /pay-api/v1/customers/{customerId}/payment-methods/{paymentMethodId}.
To set a customer's default payment method, see PUT /pay-api/v1/customers/{customerId}/payment-methods/{paymentMethodId}/make-default.

Security
Bearer
Path
customerIdstring, (uuid)required

Specifies the customerId, also known as the customer identifier.

Example:c4b210e9-be39-4ebc-8195-0c422de87f90
Bodyapplication/json
namestring or null

Specifies the payment method name.

This is a free-formed name that is convenient for the merchant to recognize.

Example: Cafe Peppared

Example:"Cafe Peppared"
panstring, non-emptyrequired

Specifies the customer’s PAN (primary account number).

This is the payment card number.

Example: 1234567890123

Example:"1234567890123"
expirationMonthinteger, (int32)required

Specifies the expiration month of the card.

Example: 7

Example:7
expirationYearinteger, (int32)required

Specifies the expiration year of the card.

Example: 2032

Example:2032
securityCodestring or null

Security code

// Language is not supported.

Responses

OK

Bodyapplication/json
idstring, (uuid)

Indicates the payment method identifier.

This is also known the paymentMethodId.

Example: db02ec6c-2e5a-4b87-98a0-8dd881707d84

Example:"db02ec6c-2e5a-4b87-98a0-8dd881707d84"
Response
{ "id": "db02ec6c-2e5a-4b87-98a0-8dd881707d84" }