Receiving donations with Coinbase Commerce

Hello,

looks like these docs are outdated? Adding a Commerce Payment Button | Coinbase Cloud

I want to create a payment button to accept donations and wanted to follow the guide, but there’s no Accept payments button anywhere in my dashboard.

I thought I should create a checkout instead, but that allows only fixed prices, which doesn’t seem right for donations?

Any ideas what’s going on?

Thanks.

Hey @safghasdfh, Welcome to the Developer Forum Community.

To insert payment button, you may refer to the below sample code

<div>
  <a
    class="donate-with-crypto"
    href="https://commerce.coinbase.com/checkout/your_checkout_id"
  >
    <span>Donate with Crypto</span>
  </a>

</div>

You can use the pricing_type":“no_price” for creating a checkout without a fixed price. Sample api call is shard below

POST https://api.commerce.coinbase.com/checkouts

body:
{"name" : "Jan 8 test 1",
"description" : "Test email",
"pricing_type" : "no_price",
"requested_info": [
                "email",
                "name",
                "address",
                "phone"
            ]
}

We hope this helps. Please let us know if you have any more questions.

Thank you and have a nice day!

This is now apparently broken, see Are charges/checkouts with “no_price” broken?