Skip to main content
POST
/
api
/
v1
/
webhooks
Create webhook
curl --request POST \
  --url https://payments.coinbase.com/api/v1/webhooks \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>",
  "events": [
    "EVENT_TYPE_PAYMENT_AUTHORIZED"
  ],
  "identifier": "<string>",
  "description": "<string>"
}
'
{
  "entity": "<string>",
  "id": "<string>",
  "operatorCoinbaseUserId": "<string>",
  "identifier": "<string>",
  "description": "<string>",
  "url": "<string>",
  "events": [
    "EVENT_TYPE_PAYMENT_AUTHORIZED"
  ],
  "secret": "<string>",
  "status": "WEBHOOK_STATUS_ACTIVATED",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Authorization header using the Bearer scheme. Learn more about JWT tokens in the Coinbase Developer Portal.

Body

application/json

Request to create a new webhook.

Request to create a new webhook.

url
string
required

The URL where webhook events will be sent.

Example:

"https://example.com/webhooks"

events
enum<string>[]
required

Types of events this webhook should receive.

List of supported events.

Available options:
EVENT_TYPE_PAYMENT_AUTHORIZED,
EVENT_TYPE_PAYMENT_CAPTURED,
EVENT_TYPE_PAYMENT_VOIDED,
EVENT_TYPE_PAYMENT_REFUNDED,
EVENT_TYPE_PAYMENT_CHARGED,
EVENT_TYPE_REWARD_ALLOCATED,
EVENT_TYPE_REWARD_DISTRIBUTED,
EVENT_TYPE_REWARD_DEALLOCATED,
EVENT_TYPE_REWARD_SENT,
EVENT_TYPE_PAYMENT_RECONCILED
Example:
[
"EVENT_TYPE_PAYMENT_AUTHORIZED",
"EVENT_TYPE_PAYMENT_CAPTURED",
"EVENT_TYPE_PAYMENT_VOIDED",
"EVENT_TYPE_PAYMENT_REFUNDED",
"EVENT_TYPE_PAYMENT_CHARGED",
"EVENT_TYPE_REWARD_ALLOCATED",
"EVENT_TYPE_REWARD_DISTRIBUTED",
"EVENT_TYPE_REWARD_DEALLOCATED",
"EVENT_TYPE_REWARD_SENT"
]
identifier
string

External identifier for operators.

Example:

"client-webhook-1"

description
string

Human-readable description of the webhook's purpose.

Example:

"Payment notifications for order processing"

Response

A successful response.

Webhook configuration details.

entity
string

Type of the entity, always "webhook".

Example:

"webhook"

id
string

Unique identifier for the webhook.

Example:

"wh_123456789"

operatorCoinbaseUserId
string

Coinbase user ID of the operator this webhook belongs to.

Example:

"f521747f-6fc8-4a1d-a765-625dcc86c0db"

identifier
string

External identifier for clients.

Example:

"client-webhook-1"

description
string

Human-readable description of the webhook's purpose.

Example:

"Payment notifications for order processing"

url
string

The URL where webhook events will be sent.

Example:

"https://example.com/webhooks"

events
enum<string>[]

Types of events this webhook should receive.

List of supported events.

Available options:
EVENT_TYPE_PAYMENT_AUTHORIZED,
EVENT_TYPE_PAYMENT_CAPTURED,
EVENT_TYPE_PAYMENT_VOIDED,
EVENT_TYPE_PAYMENT_REFUNDED,
EVENT_TYPE_PAYMENT_CHARGED,
EVENT_TYPE_REWARD_ALLOCATED,
EVENT_TYPE_REWARD_DISTRIBUTED,
EVENT_TYPE_REWARD_DEALLOCATED,
EVENT_TYPE_REWARD_SENT,
EVENT_TYPE_PAYMENT_RECONCILED
Example:
[
"EVENT_TYPE_PAYMENT_AUTHORIZED",
"EVENT_TYPE_PAYMENT_CAPTURED",
"EVENT_TYPE_PAYMENT_VOIDED",
"EVENT_TYPE_PAYMENT_REFUNDED",
"EVENT_TYPE_PAYMENT_CHARGED",
"EVENT_TYPE_REWARD_ALLOCATED",
"EVENT_TYPE_REWARD_DISTRIBUTED",
"EVENT_TYPE_REWARD_DEALLOCATED",
"EVENT_TYPE_REWARD_SENT"
]
secret
string

Secret used for webhook signature verification.

Example:

"whsec_abcdef1234567890"

status
enum<string>

Status of the webhook (active, inactive).

Available options:
WEBHOOK_STATUS_ACTIVATED,
WEBHOOK_STATUS_DEACTIVATED
Example:

"WEBHOOK_STATUS_ACTIVE"

createdAt
string<date-time>

When the webhook was created.

Example:

"2023-01-01T00:00:00.000Z"

updatedAt
string<date-time>

When the webhook was last updated.

Example:

"2023-01-02T00:00:00.000Z"