> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/integrations/connectors-integrations/payment-processor-capabilities/available-connectors/coinbase.md).

# Coinbase

Accept cryptocurrency payments through Coinbase Commerce with signed payment webhooks.

<div align="left"><img src="https://hyperswitch.io/icons/homePageIcons/logos/coinbaseLogo.svg" alt=""></div>

Coinbase Commerce gives this connector a cryptocurrency checkout path. Coinbase sends webhooks when a charge changes status, and Hyperswitch checks each webhook's signature before applying the update.

### Status and capabilities

**Integration status:** beta

**Category:** payment gateway

**Webhook flows:** payments, refunds

| Payment method | Type   | Mandates      | Refunds       | Capture methods                         | Countries                                        | Currencies |
| -------------- | ------ | ------------- | ------------- | --------------------------------------- | ------------------------------------------------ | ---------- |
| crypto         | Crypto | not supported | not supported | automatic, manual, sequential automatic | 15 ([full list](https://hyperswitch.io/pm-list)) | -          |

Two lines of that block are the connector's declaration rather than working behavior, and both are being corrected upstream in [juspay/hyperswitch#14277](https://github.com/juspay/hyperswitch/issues/14277):

* **Webhook flows.** Refunds are declared, but no refund event exists to process: only `charge:*` events are recognized, and refunds are not supported on this connector at all. Webhooks work for payments only.
* **Capture methods.** Manual and sequential automatic are declared, but capture is not implemented and capture requests return `FlowNotSupported`. Only automatic capture works.

### Authentication

Coinbase requires an **API Key**. Hyperswitch sends it unchanged in the `X-CC-API-KEY` header for each implemented request path. Every request also pins the Coinbase Commerce API version with an `X-CC-Version: 2018-03-22` header. See [`CoinbaseAuthType::try_from()`](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs#L75-L86), [`get_auth_header()`](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase.rs#L120-L131), and [`build_headers()`](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase.rs#L85-L103) (version header).

### Before you start

1. Register with Coinbase Commerce at [coinbase.com/commerce](https://www.coinbase.com/commerce).
2. Sign in to the [Hyperswitch control center](https://app.hyperswitch.io/).
3. Obtain the **API Key** from the Coinbase Commerce dashboard.

Follow [Activate a connector on Hyperswitch](/integrations/connectors-integrations/activate-connector-on-hyperswitch.md), then return here for Coinbase-specific behavior.

### Webhooks

Hyperswitch verifies the hexadecimal `X-CC-Webhook-Signature` value with HMAC-SHA256 over the raw request body. Configure the Coinbase webhook signing secret in Hyperswitch's connector `merchant_secret` (the **Source Verification Key**); Hyperswitch uses it as the HMAC key when checking the signature. See [`get_webhook_source_verification_signature()`](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase.rs#L392-L401) and [`get_webhook_source_verification_message()`](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase.rs#L403-L412).

Handled event wire values: **5**.

| Wire value         | Effect                       |
| ------------------ | ---------------------------- |
| `charge:confirmed` | Payment succeeds             |
| `charge:resolved`  | Payment succeeds             |
| `charge:failed`    | Payment requires action      |
| `charge:pending`   | Payment is processing        |
| `charge:created`   | No payment update is applied |

The wire names come from [`WebhookEventType`](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs#L340-L354); their effects come from [`get_webhook_event_type()`](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase.rs#L427-L450).

### Source reference

Authentication and webhook behavior on this page is tied to Hyperswitch `d4e93b6e6dd39e45a8d5d8647b362f1bb8543946`. See [Coinbase connector source](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase.rs) and [Coinbase transformers](https://github.com/juspay/hyperswitch/blob/d4e93b6e6dd39e45a8d5d8647b362f1bb8543946/crates/hyperswitch_connectors/src/connectors/coinbase/transformers.rs).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hyperswitch.io/integrations/connectors-integrations/payment-processor-capabilities/available-connectors/coinbase.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
