Where is the credit card information coming from?

I’m (obviously) completely lost on some of these examples. I can get a response with your example (below) but the disconnect is understanding what is tokenizing the card and posting that token to this php script?

Am I wrong in thinking I can just have a vanilla html/php page (no node) and have your javascript use the php below to send off the tokenized transaction to be processed? I’m missing an example of the 2 things working together.

$amount_money = new \Square\Models\Money();

$body = new \Square\Models\CreatePaymentRequest(

$api_response = $client->getPaymentsApi()->createPayment($body);

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

You will need to have a server side to process the payment. If you want to just use PHP we have an example that uses our PHP SDK. :slightly_smiling_face: