Coinbase commerce REST API list of possible invoice statuses

I am creating an invoice via REST API, on page Show an invoice,
But where can I find a list of possible statuses? I need to do a check to see if it’s been paid but I don’t know the correct status

Hi @hyaservice! Welcome to Developers Forum! Thank you for taking an interest in trying out Coinbase APIs. You can find the list of invoice statuses by using this List invoices endpoint. You may also check the list of possible statuses on this documentation. We hope this helps

1 Like

Hi @joshmer.briones , thanks for the reply.
None of those links provide a list of possible statuses for an invoice object, they only provide a list for charges.
With some digging through possible responses I found a "PAID" status by chance only.
I would suggest to update the documentation to list all possible statuses for commerce Invoices

Hi @hyaservice! Thank you for taking an interest in trying out Coinbase APIs.

List Invoices endpoint will return a response that includes the statuses of all the Invoice created. While the List Charges endpoint returns a response for the statuses of all the Charge created.

Sample response below shows a status “VIEWED” for an Invoice using /invoices endpoint:

  "data": [
    {
      "id": "30934862-d980-46cb-9402-43c81b0cabd5",
      "resource": "invoice",
      "code": "8LA8E2WX",
      "status": "VIEWED",
      "business_name": "Crypto Accounting LLC",
      "customer_name": "Test Customer",
      "customer_email": "customer@test.com",
      "memo": "Accounting and tax consultation services",
      "local_price": {
        "amount": "50.00",
        "currency": "USD"
      },
   ...

While sample response below shows a status “NEW” for a Charge using the /charge endpoint:

 "data": [
    {
      "id": "f765421f2-1451-fafb-a513-aac6c819fba9",
      "resource": "charge",
      "code": "66BEOV2A",
      "name": "The Sovereign Individual",
      "description": "Mastering the Transition to the Information Age",
      "logo_url": "https://commerce.coinbase.com/charges/ybjknds.png",
      "hosted_url": "https://commerce.coinbase.com/charges/66BEOV2A",
      "created_at": "2017-01-31T20:49:02Z",
      "confirmed_at": "2017-01-31T21:49:02Z",
      "expires_at": "2017-01-31T22:49:02Z",
      "checkout": {
        "id": "a76721f2-1611-48fb-a513-aac6c819a9d6"
      },
      "timeline": [
        {
          "time": "2017-01-31T20:49:02Z",
          "status": "NEW"
        }
      ],
...

We’d like to apologize regarding the documentation as it doesn’t have a list for Invoice Status. We appreciate it if you can share this in the Feedback Section of the Forum as most new features and improvements to Coinbase come directly from feedback like yours, so it’s very valuable to us. Thank you!

2 Likes