0
votes

I have to integrate Square API in my application developed in .net. I have to process online payments through Square API which are made on my website. I searched on square documentation and related to dot net I found link https://developer.squareup.com/blog/announcing-squares-new-net-sdk/

Sample code provided in above link is only for creating customer on Square. Where I will find sample code for making payments with Card details.

Did more research and came across below one. This ask for payment, API Keys and many more things but not asking for Card details.

I can't understand where I have to add card details. https://developer.squareup.com/explorer/square/payments-api/create-payment

Also what are idempotency_key and source_id.

How to create nonce in Square?

1

1 Answers

0
votes

To accept card payments, and to generate a nonce, you must implement the Square Payment Form: https://developer.squareup.com/docs/payment-form/overview. The source_id would either be a nonce or a customer_card_id if you saved the card on file.

As for idempotency_key, that is a unique key that you pass to ensure idempotency. Basically, if you are unsure of the reuslt of a API call (like if you lose internet connection and didn't receive a response), you could make the same call with the same idempotency key. You would receive the same response if it had been processed, ensuring that you don't create a second payment. For more info check out our blog on this: https://developer.squareup.com/blog/understanding-the-essentials-idempotency/.