Can I create checkouts via API?

Use case is an app that has infinitely variable charge amounts - the price is always different depending on user added options at checkout. Unlike a static ecommerce store for example.

So my question is can i create a new checkout everytime a customer starts the payment flow in the app?

Second queation is assuming the answer is yes, i would then have to create a charge using that newly created checkout to start the coinbase commerce payment - is this accurate?

Edit: do I even need a checkout? Or can I skip straight to creating a charge with custom amount?

Hi @Skoot,

To answer your question, you don’t need to create a checkout every time if the payment amount is same, simply create charge on the checkout payment value for reach and every customer.

If the amount is not same then you have to create checkout every time and then you have to create charge, to give a better understanding let me give you an example. E commerce website or app will be best example.

Let’s take that you have 2 different product A and B. For A you have created the checkout, when ever some of you customer buys the product A, you can create charge directly and get the payment from them. Suppose a customer wants to buy the product B for the first time then you have to create the new checkout for the product B, because the price or payment value will be different from A, so you have to create a new checkout for B after that only you can create a charge for the product B.

If you create a checkout once for a product then you don’t need to create new checkout for the same product every time you create charge, directly you can create charge using the unique ID of the checkout for the respective product.

For more details and to know different types payment accepting method you can refer this page Not a Developer? | Coinbase Cloud.

Hope this helps you, have a good rest of your day.

Ok this helps @Sandy . Thanks. So for my use case I’ll need to create a new checkouts for every purchase.

These checkouts can be created instantaneously via API as needed as a part of the checkout flow then I assume?

Hi @Skoot,

To create checkout please refer to this help page, where you can find video tutorials as well. Hope it will be helpful.
Help page https://help.coinbase.com/en/commerce/managing-account/checkouts

Hope this helps you, have a good day ahead !