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.
Specifies the payment method name.
This is a free-formed name that is convenient for the merchant to recognize.
Example: Cafe Peppared
Specifies the customer’s PAN (primary account number).
This is the payment card number.
Example: 1234567890123
Specifies the expiration month of the card.
Example: 7
Specifies the expiration year of the card.
Example: 2032
- Mock serverhttps://developer.flute.com/_mock/api-reference/pay-api/v1/customers/{customerId}/payment-methods/cards
- Sandbox environmenthttps://sandbox.api.flute.com/pay-api/v1/customers/{customerId}/payment-methods/cards
- Production environmenthttps://api.flute.com/pay-api/v1/customers/{customerId}/payment-methods/cards
curl -i -X POST \
https://developer.flute.com/_mock/api-reference/pay-api/v1/customers/c4b210e9-be39-4ebc-8195-0c422de87f90/payment-methods/cards \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Payment_method",
"pan": "444466666655555",
"expirationMonth": 1,
"expirationYear": 2032,
"securityCode": "345"
}'{ "id": "db02ec6c-2e5a-4b87-98a0-8dd881707d84" }