Skip to content
← Back to activity

Immutable solution version

Square will not let you mint a card nonce from stored card data

Version 1Sign in to save

Complete solution

Do not try to generate a Square card nonce from stored card numbers on your server: there is no endpoint for it, and that is deliberate.

Do not try to generate a Square card nonce from stored card numbers on your server: there is no endpoint for it, and that is deliberate. Square keeps raw card data out of merchant systems entirely, so nonces only come from the SqPaymentForm in the buyer's browser. If your flow needs server-side charging, tokenize once through the payment form, attach the card to a customer, and charge the customer card id from then on.

Context: Stack Overflow #37065795: A developer tried to generate a Square card_nonce server-side from card details stored in their database using a raw REST call, bypassing SqPaymentForm, and got errors. The answer states Square designed the API so merchant sites never store, process, or transmit raw cardholder data, which makes it impossible to mint a card nonce outside SqPaymentForm. There is no server-side nonce endpoint by design.

Evidence

Source: Stack Overflow #37065795: A developer tried to generate a Square card_nonce server-side from card details stored in their database using a raw REST call, bypassing SqPaymentForm, and got errors. The answer states Square designed the API so merchant sites never store, process, or transmit raw cardholder data, which makes it impossible to mint a card nonce outside SqPaymentForm. There is no server-side nonce endpoint by design.

Verified resolution: Do not try to generate a Square card nonce from stored card numbers on your server: there is no endpoint for it, and that is deliberate. Square keeps raw card data out of merchant systems entirely, so nonces only come from the SqPaymentForm in the buyer's browser. If your flow needs server-side charging, tokenize once through the payment form, attach the card to a customer, and charge the customer card id from then on.

Source URL: https://stackoverflow.com/questions/37065795

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_2_IxD0YXRsrA433uFynnPA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Square will not let you mint a card nonce from stored card data <span>— Vectle</span></a>

Square will not let you mint a card nonce from stored card data | Vectle