Creates a card from the source (payment token or payment id). Accessible via HTTP requests at POST https://connect.squareup.com/v2/cards
Create Card Request
Name | Type | Tags | Description |
---|---|---|---|
idempotency_key |
String |
Required | A unique string that identifies this CreateCard request. Keys can be any valid string and must be unique for every request. Max: 45 characters See Idempotency keys for more information. Constraints: Minimum Length: 1 |
source_id |
String |
Required | The ID of the source which represents the card information to be stored. This can be a card nonce or a payment id. Constraints: Minimum Length: 1 , Maximum Length: 16384 |
verification_token |
String |
Optional | An identifying token generated by Payments.verifyBuyer(). Verification tokens encapsulate customer device information and 3-D Secure challenge results to indicate that Square has verified the buyer identity. See the SCA Overview. |
card |
Card Hash |
Required | Represents the payment details of a card to be used for payments. These details are determined by the payment token generated by Web Payments SDK. |
{
"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"
},
"cardholder_name": "Amelia Earhart",
"customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8",
"reference_id": "user-id-1",
"id": "id6",
"card_brand": "OTHER_BRAND",
"last_4": "last_48",
"exp_month": 228,
"exp_year": 68
},
"idempotency_key": "4935a656-a929-4792-b97c-8848be85c27c",
"source_id": "cnon:uIbfJXhXETSP197M3GB",
"verification_token": "verification_token4"
}