question

seanogorman avatar image
seanogorman asked elaineelders answered

Single Charge 204

Good afternoon. We are trying to create a simple integration for low volume charges. We were able to create a card token through consuming https://token.clover.com/v1/tokens.


When trying to create a change through https://api.clover.com/v1/charges we are getting back a 204 return.


We are self generating an API key in Account Setup -> API Keys


1664222482675.png


When attempting to create a charge we are receiving a 204 status code.


1664222585499.png

is https://api.clover.com/v1/charges able to be used with the self generated key as the Bearer token?

REST APIe-commerce apiAPI Token
1664222482675.png (138.5 KiB)
1664222585499.png (45.2 KiB)
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

larryrichard avatar image larryrichard commented ·

I think you should extract the URL and then make a GET API call to the below URL with App sercet

0 Likes 0 ·
jainh avatar image
jainh answered rebeccastewart commented

The Key that you had hidden in the first Image is the App Secret. This is generated when you create an application in clover. This is not authroized yet. Follow the steps as below:-

When you create an application you must have provided provided some localhost URL for testing

Step 1. Use the below URL
https://sandbox.dev.clover.com/oauth/authorize?client_id=YOUR_CLIENT_ID
Just paste this link in your browser, make sure your server that you mentioned in the app is up at that time.


This link will redirect you to a URL or some page, but you only need the URL


Step 2: Extract the URL, it should look something like
https://YOUR_URL_MENTIONED_IN_APP/?merchant_id=MERCHANT_ID&employee_id=EMP_ID&client_id=CLIENT_ID&code=AUTHORIZED_CODE

fetch all the 4 fields merchant_id, employee_id, client_id and code


Step 3:-

Make a GET API call to the below URL with App sercet and code from the above step

https://sandbox.dev.clover.com/oauth/token?client_id=CLIENT_ID&client_secret=APP_SECRET&code=AUTHORIZED_CODE

the value returned is "access_token", this is the value that you can use to create charges and all other things. This bearer token is authorized and should work.


Let me know if this works for you.

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rebeccastewart avatar image rebeccastewart commented ·

This method really worked for me. Thank you for sharing
penalty shooters 2

-1 Like -1 ·
elaineelders avatar image
elaineelders answered

"Single Charge 204" introduces a groundbreaking battery technology promising extended power retention. With a single charge, telugutechpro it offers unparalleled longevity, revolutionizing energy storage solutions. From smartphones to electric vehicles, this innovation ensures uninterrupted usage, reducing environmental impact and enhancing user convenience. A game-changer in the quest for sustainable energy solutions.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community