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
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the charge. |
amount | number | Yes | Amount to charge. |
currency | string | Yes | Currency code (e.g., USD, EUR). |
description | string | No | Description of the charge. |
redirect_url | string | No | URL to redirect after successful payment. |
cancel_url | string | No | URL to redirect if payment is cancelled. |
metadata | object | No | Additional 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
| Parameter | Type | Required | Description |
|---|---|---|---|
business_name | string | Yes | Name of the business issuing the invoice. |
customer_email | string | Yes | Email address of the customer. |
amount | number | Yes | Amount to invoice. |
currency | string | Yes | Currency code (e.g., USD, EUR). |
memo | string | No | Optional 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
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of charges to return (max 100). |
starting_after | string | No | Charge 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
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of invoices to return (max 100). |
customer_email | string | No | Filter 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
| Parameter | Type | Required | Description |
|---|---|---|---|
charge_code | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
invoice_id | string | Yes | The invoice ID to retrieve. |
Response
{
"business_name": "Test Business",
"code": "INV123",
"id": "invoice_123",
"status": "OPEN"
}