Merchant Client Withdrawal

Place a merchant client withdrawal Request.

The endpoint places a withdrawal Request for a merchant on her generated Wallet address tied to an email address

Withdrawal Request

POST BaseUrl/api/merchantClientWithdrawal

Request Body

NameTypeDescription

amount*

Numbers

10

currency*

Enum

3

destinationAddress*

String

Client Wallet_Address

merchantClientEmailAddress*

String

Client Email Address

networkChain*

Enum

1

merchantReference*

String

X-your-Unique-Ref('uuid'-preferably)

publicKey

String

your PublicKey

{
  "status": 1,
  "message": "string",
  "data": {
    "destinationAddress": "Client Wallet_Address",
    "paymentCurrency": 1,
    "networkChain": 1,
    "withdrawnAmount": 0,
    "transactionCharge": 0,
    "withdrawnAmountRequested": 0,
    "paymentDescription": "string",
    "merchantTransactionReference": "X-your-Unique-Ref('uuid'-preferably)",
    "switchWalletTransactionReference": "our-Unique-Ref",
    "transactionChargeCurrency": 1
  }
}

Code Gist

Withdrawal Request Code gist
POST /api/merchantClientWithdrawal?api-version=1 HTTP/1.1
Host: testnet.switchwallet.io
Content-Type: application/json-patch+json; ver=1.0
Accept: text/plain; ver=1.0
Authorization: ApiKey 5128620015083006430

{
  "amount": 10,
  "currency": "3",
  "destinationAddress": "0x0fC0c413e80cef85a273930269E70D1B8C6cC146",
  "merchantClientEmailAddress": "merchantClientEmailAddress@mail.com",
  "networkChain": "1",
  "merchantReference": "xp-your-Ref",
  "publicKey": "your publicKey"
}
Javascript
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json-patch+json; ver=1.0");
myHeaders.append("Accept", "text/plain; ver=1.0");
myHeaders.append("Authorization", "ApiKey 5128620015083006430");

var raw = "{\n  \"amount\": 10,\n  \"currency\": \"3\",\n  \"destinationAddress\": \"0x0fC0c413e80cef85a273930269E70D1B8C6cC146\",\n  \"merchantClientEmailAddress\": \"merchantClientEmailAddress@mail.com\",\n  \"networkChain\": \"1\",\n  \"merchantReference\": \"xp-your-Ref\",\n  \"publicKey\": \"your publicKey\"\n}";

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://testnet.switchwallet.io/api/merchantClientWithdrawal?api-version=1", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Last updated