Development
  • Guides
  • API Reference
  • API Explorer
  • SDKs
  • Sample apps
  • System status
Support
  • Developer forums
  • Developer blog
  • YouTube
  • X
More
  • Square Home
  • Square Developer
  • App Marketplace
  • Partner with Square
  • Solutions Partner Program
  • Pricing
  • Sales

© 2026 Square, Inc.

  • Developer terms of service
  • Developer Integration and Marketing Agreement
  • Privacy policy
  • Partnerships
  • Sign In
  • Sign In

    Cards

  • List cards

  • Create card

  • Retrieve card

  • Disable card

  • Webhooks

  • card.automatically_updated

  • card.created

  • card.disabled

  • card.forgotten

  • card.updated

<- Cards API

Cards API

All versions ->

Create card

POST

 /v2/cards

Adds a card on file to an existing merchant.

Permissions:PAYMENTS_WRITE
Try in API Explorer
Link to section

Request body

Example code

Link to section

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.

Min Length
1
Link to section

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.

Min Length
1
Max Length
16384
Link to section

verification_token

string

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.

Link to section

card

Required

Payment details associated with the card to be stored.

Link to section

Response fields

Link to section

errors

Errors resulting from the request.

Link to section

card

The card created by the request.

Link to section

Examples

All versions ->

POST /v2/cards
curl https://connect.squareup.com/v2/cards \ -X POST \ -H 'Square-Version: 2026-11-18' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "idempotency_key": "4935a656-a929-4792-b97c-8848be85c27c", "source_id": "cnon:uIbfJXhXETSP197M3GB", "card": { "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "cardholder_name": "Amelia Earhart", "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", "reference_id": "user-id-1" } }'

Response JSON

{ "card": { "id": "ccof:uIbfJXhXETSP197M3GB", "billing_address": { "address_line_1": "500 Electric Ave", "address_line_2": "Suite 600", "locality": "New York", "administrative_district_level_1": "NY", "postal_code": "10003", "country": "US" }, "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q", "bin": "411111", "card_brand": "VISA", "card_type": "CREDIT", "cardholder_name": "Amelia Earhart", "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8", "enabled": true, "exp_month": 11, "exp_year": 2022, "last_4": "1111", "merchant_id": "6SSW7HV8K2ST5", "prepaid_type": "NOT_PREPAID", "reference_id": "user-id-1", "hsa_fsa": false, "version": 1 } }

Error descriptions

400 Bad request

{ "errors": [ { "code": "CUSTOMER_NOT_FOUND", "category": "INVALID_REQUEST_ERROR" } ] }