/b2b/oor/buy

Create on-ramp transaction using 'card' method

Body
required
application/json

Request body

  • address
    Type: string
    required

    The address to which the crypto should be transferred.

  • trx_token
    Type: string
    required

    Buy token returned by /b2b/oor/buy-rates endpoint.

  • card_id
    Type: string

    ID of the existing card (Get from /b2b/user/cards)

  • merchant_transaction_id
    Type: string

    Custom ID for checking transaction status. If empty, it will be generated

  • theme
    Type: string

    Widget display theme

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/b2b/oor/buy
curl https://sandbox-api.mrcr.io/v1.6/b2b/oor/buy \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'B2B-Bearer-Token: YOUR_SECRET_TOKEN' \
  --data '{
  "trx_token": "0a580b4653e7e3488",
  "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "merchant_transaction_id": "00357ec76de855485",
  "card_id": "card_1234567890",
  "theme": "dark"
}'
{
  "status": 200,
  "data": {
    "merchant_transaction_id": "00357ec76de855485",
    "redirect_url": "https://payments.mercuryo.io/sell?init_token=0a580b4653e7e3488&merchant_transaction_id=00357ec76de855485"
  }
}