Complete flow from react redux app with node.js back needed

I’m a newbie using React Redux with Node.js at backend and would be nice to have a complete flow to handle payments using coinbase commerce.

When I say complete I would like to mean:

the customer has a cart with articles that I can send from a button at frontend to the back to create a charge, to display a new window for payment… to left the charge with a payment status (i.e where is recommended to put this status).
and after that if the payment was completed create a completed record and if no just left the status (expired, cancelled , etc)

it will be great help if someone has this code pieces or part of them to understand how them works…

Hi @sdelp.eth! Thank you for pointing this out. We will be glad to communicate this with our internal team and we’ll get back to you once we have updates. Keep in touch!

Hi again @sdelp.eth! Thank you for taking interest in using Coinbase Commerce API. For your inquiry regarding a complete flow to handle payments in Coinbase Commerce, you would want to visit the documentation here to see a visual presentation of how it all works. If this does not suffice your inquiry, please further elaborate what you mean when you say “complete flow”.

Additionally, we’re sorry to say but we are only able to provide guidance and troubleshooting for issues with the raw Coinbase APIs. Unfortunately we are unable to provide guidance on how to write code in specific programming languages and frameworks, and cannot assist further on this request. However, you may look into the following for reference of your use case:

Please see the Coinbase Commerce documentation to know more. We hope this helps. If you have any more questions, feel free to reach out back to us. Have a great day!

Thanks for your prompt response.

I already did a payment button as described here >
Adding a Payment Button

https://commerce.coinbase.com/charges/C337F993

But it is not what I’m looking for because it doesn’t allow me to input amounts in a dynamic way (with the total displayed on cart)

I understand that you are unable to provide guidance on how to write code in specific programming languages and frameworks, and cannot assist further on this request.

But maybe someone in this forum already wrote code for generating a charge from a cart in the front and later creating the flow to wait for cart payment in the back, probably using webhooks in order to provide this feature to allow coinbase payments on our site.

The other question is if there is a sandbox to test payments (on test networks) to pre test our implementation of coinbase API before going into production.

I look forward to hearing from you or someone else in this regard,

Best regards,

Sergio

Hello @sdelp.eth! We apologize if this hasn’t gone according to your plan. We would like to help you out with your use case, please provide us the following information to further investigate:

  • Can you please clarify to us if what you want to achieve is to pass the total displayed on your cart to your payment function? Otherwise, please elaborate.
  • Can you explain what will be the use of webhook in relation to your use case?

In regard to your inquiry about sandbox, unfortunately, this is not something we currently offer as of the moment. However, rest assured that we will log this as a feature request with our internal teams so we can continue improving our user experience. Most new features and improvements to our products come directly from feedback like yours, so it’s very valuable to us. While we can’t offer any specific timeline for adding features, we are constantly working to build products our customers will love. If you want to stay up to date on the latest from Coinbase Cloud, you can also bookmark the following webpage and subscribe to email updates at the bottom of the page: https://www.coinbase.com/cloud/discover

Thank you for your patience and understanding as we try to help you out. Looking forward to your response!

Hi bazinga,

“Can you please clarify to us if what you want to achieve is to pass the total displayed on your cart to your payment function?” BIG YES!

“Can you explain what will be the use of webhook in relation to your use case?” Here I go:
As far as I understand the way crypto payments works makes that after we generate a charge (or invoice or checkout) sorry I did not get the difference between these terms yet…
There is a time that the user (buyer) has to make the crypto payment and this time might be up to 60 minutes in coinbase platform. In the meanwhile I understood the payment will put in a kind of hold (pending) and after or while this amount of time there might be different events happening, those interested us are : completed, we will put the order as paid, or (canceled/unresolved) that will lead us to a not paid order).
We want to build a webhook in order to get those events> tu put the order as paid or not…

I hope this explanation helps to understand our use case,

Best regards!

Hi @sdelp.eth does this sample webapp help?

I need to push an update to how the webapp handles the polling. This should be updated in a few weeks.

Sorry did not get what do you mean with “this sample webapp”
I look forward to hear from you soon.

Best,

sergio

Hi, sorry for any confusion.

Your earlier question was if we “have a complete flow to handle payments using coinbase commerce.”

The github link I shared is a sample web application that uses React and NodeJs to power a fictitious furniture store. Users will add items to a cart and be able to make payments on a checkout page to a QR code. Payments will be handled by Coinbase Commerce.

Sorry I did not get the github link (the sample webapp link goes to this post)

My apologies try this link – GitHub - coinbase-samples/commerce-explorer-js: Coinbase Commerce REST API sample application for merchants

Hi Hughes! great I think that this was what I’m looking for…I will review it carefully and will let you know if it works for me.Thanks!!! :raised_hands:

1 Like