Coinbase Wallet messaging is built with XMTP, and defines a custom content type for Coinbase Wallet payment messages.
This documentation outlines the structure for the payment message content type so other XMTP message API clients can encode and decode these messages, ensuring interoperability and consistent display of messages across other applications.
The custom content type for payment messages is:
coinbase.com/coinbase-messaging-payment-activity:1.0
Payment messages can be one of two types:
A regular payment message contains details of standard cryptocurrency transactions.
Name | Description |
---|---|
currencyCode | Specifies the cryptocurrency being transacted. |
fromAddress | The sender’s cryptocurrency wallet address. |
network | Details of the network on which the transaction is being conducted. |
toAddress | The recipient’s cryptocurrency wallet address. |
transactionHash | A unique identifier for the transaction. |
The transactionHash
can be used to fetch additional details and verify that the transaction has succeeded.
Coinbase sponsored payments differ slightly from regular payments in their structure. They contain a sponsored transaction ID instead of a direct transaction hash.
Name | Description |
---|---|
fromAddress | The sender’s cryptocurrency wallet address. |
network | Details of the network on which the transaction is being conducted. |
sponsoredTxId | A unique identifier for the sponsored transaction. |
toAddress | The recipient’s cryptocurrency wallet address. |
To obtain the actual transactionHash
using the sponsoredTxId
, make a GET request to the provided endpoint:
Replace the token in the query parameter with your sponsoredTxId
. This endpoint will return the transactionId
, which is equivalent to the transaction hash, allowing you to verify the transaction on the relevant blockchain.