Create Card -> Card#?

Hi! I am new and have been testing my app all day in sandbox. I want to creat Customer then add a card then create a new subscription. I can do all this, but I am confused when creating a card there are no fields for the card #, CSV code etc. Am I missing something? At some pint I want need my customers to add these details into my webform to create an account on my site. I do not see where I can add these values. My code:

///Create Customer Card//

$billing_address = new \Square\Models\Address();
$billing_address->setAddressLine1(‘500 Electric Ave’);
$billing_address->setAddressLine2(‘Suite 600’);
$billing_address->setLocality(‘New York’);
$billing_address->setAdministrativeDistrictLevel1(‘NY’);
$billing_address->setPostalCode(‘94103’);
$billing_address->setCountry(‘US’);

$card = new \Square\Models\Card();
$card->setCardholderName(‘Jane Doe’);
$card->setBillingAddress($billing_address);
$card->setCustomerId($customer[‘id’]);
$card->setReferenceId(‘alternate-id-1’);

$body = new \Square\Models\CreateCardRequest(
‘{’.rand().‘}’,
‘cnon:card-nonce-ok’,
$card
);

$api_response = $client->getCardsApi()->createCard($body);

if ($api_response->isSuccess()) {
$result = $api_response->getResult();
} else {
$errors = $api_response->getErrors();
}

Hi. I answered my own question. You need the Web SDK to generate a token in client browser then pass it to backend via json.

Glad to hear you figured it out. :slightly_smiling_face: