Skip to content

Allow purchase of crypto assets via Coinbase Pay #2775

@justindg

Description

@justindg

Allow users to purchase crypto assets via Coinbase Pay.

--

Endpoint:
https://pay.coinbase.com/buy/select-asset

Parameters:
appId : string - Provided by Coinbase Pay team, check discord for valid AlphaWallet app ID.
destinationWallets : array - See below.

Destination Wallets Parameters:
address : string - Destination address where the purchased tokens will be sent.
blockchains : string array - List of enabled blockchains, available values*: ethereum, solana, avalanche-c-chain
assets : string array - List of tokens that will be displayed to the user in the succeeding screen

  • Seems only ethereum blockchain is relevant to AlphaWallet

Upon testing, there are two ways we could utilize this API.

  1. Select from a list of tokens in the ethereum network:
https://pay.coinbase.com/buy/select-asset?appId=<APP_ID>&destinationWallets=[{"address": "<WALLET_ADDRESS>","blockchains":["ethereum"]}
  1. Directly purchase a token; this will skip the token selection screen:
https://pay.coinbase.com/buy/select-asset?appId=<APP_ID>&destinationWallets=[{"address": "<WALLET_ADDRESS>","assets":["ETH"]}

Requirements to test this feature:

  1. Verified Coinbase account - may include ID verification and linked payment info depending on the country of origin.

--

Sample flow:

Screen_Recording_20220818-145949_AlphaWallet.mp4

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions