---
title: "Create Merchant Wallet Redemption Transaction"
method: POST
path: "/redeem/merchant"
tags: ["redeem"]
---

# Create Merchant Wallet Redemption Transaction

`POST /redeem/merchant`

Creates a transaction for the user to sign in order to redeem their Coinflow credits, with the resulting stablecoins being delivered to the merchant's settlement wallet.

## Headers

- `x-coinflow-auth-wallet` string, required
- `x-device-id` string

## Request body

- MerchantWalletRedeemBody — From T, pick a set of properties whose keys are in the union K
  - `merchantId` string, required
  - `chargebackProtectionData` PickNftCartItemExcludeKeyofnftCartItemSellingPriceOrItemClass[]
    - `productName` string, required — The name of the related product
    - `productType` 'inGameProduct' | 'gameOfSkill' | 'dataStorage' | 'computingResources' | 'sportsTicket' | 'eSportsTicket' | 'musicTicket' | 'conferenceTicket' | 'virtualSportsTicket' | 'virtualESportsTicket' | 'virtualMusicTicket' | 'virtualConferenceTicket' | 'alcohol' | 'DLC' | 'subscription' | 'fundACause' | 'realEstate' | 'computingContract' | 'digitalArt' | 'topUp' | 'ownershipContract' | 'inGameCurrency' | 'digitalCollectibles' | 'digitalCollectiblesMarketplace' | 'digitalGiftingMarketplace' | 'sweepstakes' | 'virtualSportsEvents' | 'contractInvoicing' | 'onlineCasino' | 'cryptoOnramp' | 'gaming' | 'travelDocuments' | 'musicStreaming' | 'digitalContent' | 'eBooks' | 'digitalSubscriptionContent', required
    - `listPrice` PickNftCartItemExcludeKeyofnftCartItemSellingPriceOrItemClassListPrice — The item's list price
      - `currency` string
      - `valueInCurrency` number, double
    - `quantity` number, double, required — The number of units sold
    - `rawProductData` AnyObject
      - `example` string
    - `seller` SellerInfo
      - `id` string — Id of the seller
      - `email` string, nullable — Email Example: lois.lane@dailyplanet.com
      - `firstName` string — First name Example: Lois
      - `lastName` string — Last name Example: Lois
      - `dob` string — Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY Pattern: ^\d{4}(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$
      - `rawSellerData` RecordStringAny — Construct a type with a set of properties K of type T
    - `transactionHistory` TransactionHistoryItem[]
      - `txType` string, required
      - `chain` string, required
      - `paymentAmount` string, required
      - `paymentToken` string, required
      - `to` string, required
      - `from` string, required
      - `registryContract` string, required
      - `assetID` string, required
      - `txTime` string, required
      - `blockNumber` number, double, required
      - `txHash` string, required
  - `webhookInfo` AnyObject
    - `example` string
  - `feePercentage` number, double — If this purchase is for a seller/submerchant where the marketplace takes a fee, this is the % fee which is taken from the subtotal amount.
  - `fixedFee` Cents
    - `cents` integer, required
  - `jwtToken` string — This is a token encoding the parameters for the request. Allows purchase parameters to be verified to prevent manipulation when the checkout page is presented to the user.
  - `redeemAmount` Cents
    - `cents` integer, required
  - `subtotal` Cents, required
    - `cents` integer, required

## Response `200`

Ok

- RedeemResponse
  - `transaction` string, required — Transaction for the users wallet to sign and send. Solana - base 58 encoded transaction, recover using: `Transaction.from(base58.decode(transaction))` Near - Base 64 encoded stringified transaction, recover using: `JSON.parse(Buffer.from(transaction, 'base64').toString());` Evm - Base 64 encoded stringified transaction, recover using: `JSON.parse(Buffer.from(transaction, 'base64').toString());`

## Other responses

- `412` — Wallet does not have enough credits to complete redeem request, this can happen when the network is slow. Please retry the request.

---

[API](https://skmtc.net/coinflow/apis/api-reference.md) · [All operations](https://skmtc.net/coinflow/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coinflow/api-reference/versions/c7b5afab1295/schema)
