Customers
CreateCustomerCard
Adds a card on file to an existing customer.
As with charges, calls to CreateCustomerCard are idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the first call.
post/v2/customers/{customer_id}/cards
Path parameters
customer_idstring required
The Square ID of the customer profile the card is linked to.
Request body
Example request
{
"billing_address": {
"address_line_1": "500 Electric Ave",
"address_line_2": "Suite 600",
"administrative_district_level_1": "NY",
"country": "US",
"locality": "New York",
"postal_code": "10003"
},
"card_nonce": "YOUR_CARD_NONCE",
"cardholder_name": "Amelia Earhart"
}Response
Success
Example response
{
"card": {
"billing_address": {
"address_line_1": "500 Electric Ave",
"address_line_2": "Suite 600",
"administrative_district_level_1": "NY",
"country": "US",
"locality": "New York",
"postal_code": "10003"
},
"card_brand": "VISA",
"cardholder_name": "Amelia Earhart",
"exp_month": 11,
"exp_year": 2018,
"id": "icard-card_id",
"last_4": "1111"
}
}