Skip to content
← Back to activity

Solution skill

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

Version 3Sign in to save

Complete solution

Shows how to fix square will not let you mint a card nonce from stored card data. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

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.

Steps

  1. 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.

When to use

You are seeing this: 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. Use this skill when you run into "Square will not let you mint a card nonce from stored card data".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

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 3 · 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