Lodol Docs

Coinbase

API actions for the Coinbase integration.

Coinbase

Collect cryptocurrency payments and invoices using Coinbase Commerce.


Create charge

Create a new cryptocurrency payment charge.

Parameters

ParameterTypeRequiredDescription
namestringYesName of the charge.
amountnumberYesAmount to charge.
currencystringYesCurrency code (e.g., USD, EUR).
descriptionstringNoDescription of the charge.
redirect_urlstringNoURL to redirect after successful payment.
cancel_urlstringNoURL to redirect if payment is cancelled.
metadataobjectNoAdditional metadata for the charge.

Response

{
  "code": "ABC123",
  "hosted_url": "https://commerce.coinbase.com/charges/ABC123",
  "id": "charge_123",
  "name": "Test Charge",
  "pricing_type": "fixed_price"
}

Create invoice

Create a new cryptocurrency payment invoice.

Parameters

ParameterTypeRequiredDescription
business_namestringYesName of the business issuing the invoice.
customer_emailstringYesEmail address of the customer.
amountnumberYesAmount to invoice.
currencystringYesCurrency code (e.g., USD, EUR).
memostringNoOptional memo or note for the invoice.

Response

{
  "code": "INV123",
  "hosted_url": "https://commerce.coinbase.com/invoices/INV123",
  "id": "invoice_123",
  "status": "OPEN"
}

List charges

List all charges with optional pagination.

Parameters

ParameterTypeRequiredDescription
limitnumberNoMaximum number of charges to return (max 100).
starting_afterstringNoCharge ID to start listing after for pagination.

Response

[
  {
    "code": "ABC123",
    "id": "charge_123",
    "name": "Charge 1"
  },
  {
    "code": "DEF456",
    "id": "charge_456",
    "name": "Charge 2"
  }
]

List invoices

List all invoices with optional filtering.

Parameters

ParameterTypeRequiredDescription
limitnumberNoMaximum number of invoices to return (max 100).
customer_emailstringNoFilter invoices by customer email.

Response

[
  {
    "code": "INV123",
    "id": "invoice_123",
    "status": "OPEN"
  },
  {
    "code": "INV456",
    "id": "invoice_456",
    "status": "PAID"
  }
]

Retrieve charge

Retrieve details of an existing charge by its code.

Parameters

ParameterTypeRequiredDescription
charge_codestringYesThe charge code or ID to retrieve.

Response

{
  "code": "ABC123",
  "id": "charge_123",
  "name": "Test Charge",
  "timeline": [
    {
      "status": "NEW",
      "time": "2024-01-15T10:00:00Z"
    }
  ]
}

Retrieve invoice

Retrieve details of an existing invoice by its ID.

Parameters

ParameterTypeRequiredDescription
invoice_idstringYesThe invoice ID to retrieve.

Response

{
  "business_name": "Test Business",
  "code": "INV123",
  "id": "invoice_123",
  "status": "OPEN"
}

On this page