<coinbase-payment> web component. This allows customers to complete payments without leaving your checkout page.
Setup
Rendering
Callrender() with the payment object from POST /api/v1/payments:
render() again. To navigate back to the wallet selection view, call back():
Attributes
| Attribute | Description |
|---|---|
layout | Set to "single-column" to force the small desktop view regardless of screen size. Set to "default" for the standard 2-column layout when appropriate. |
Events
The component emits Custom Events for handling payment outcomes:| Event | Description |
|---|---|
rendered | Fired when the component is ready. Includes installedWallets in detail. |
completed | Payment completed. Detail includes status: 'success' | 'failure'. |
cancelled | User cancelled the payment. |
walletAction | Wallet interaction events (selected, connected, rejected). |
pageNavigated | Navigation between views. Detail includes page name. |
paymentError | Error occurred. Detail includes error message. |
deeplink | Deeplink URL for mobile wallet redirects. Detail includes url. |
Deeplink handling (iframes)
When the component is rendered inside an iframe, it cannot redirect the browser directly. You must handle thedeeplink event to perform the redirect from the parent page:
iFrame permissions
If embedding the component inside an iframe, configure the following permissions to enable passkey and clipboard access:Theming
Customize the component appearance using CSS custom properties:All CSS custom properties
All CSS custom properties
| Property | Default |
|---|---|
--cb-color-background-primary | white |
--cb-color-background-secondary | white |
--cb-color-qr-background | white |
--cb-color-text-primary | black |
--cb-color-link-hover | - |
--cb-color-button-primary | #005bd3 (blue) |
--cb-color-button-primary-hover | #005bd3 (blue) |
--cb-color-button-primary-text | - |
--cb-color-button-border-primary | - |
--cb-color-accent-primary | - |
--cb-border-radius-button-primary | - |
--cb-color-navigation-hover | - |
--cb-color-border-primary | - |
--cb-color-icon | grey |
--cb-color-icon-background-hover | light gray |
--cb-typography-header-font-family | System |
--cb-typography-body-font-family | System |