Withdrawal Verification

With security in mind SwitchWallet goes another step further to verify that every withdrawal event triggered truely comes from the merchant, To ensure this we call the merchant's verificationUrl with the merchant reference parsed to the withdrawal endpoint.

How to set up

1) Set up your Url at your server

How it works,

Our server make http Get request to your verificationUrl

Request sample: YourVerificationUrl?reference={yourUniquelyGeneratedReference-parsed-at-thePoint-ofWithdrawal}

to confirm withdrawal

GET YourDomian/VerificationEndpoint

Query Parameters

Name
Type
Description

reference*

String

yourUniquelyGeneratedReference-parsed-at-thePoint-ofWithdrawal

// if you are the initiator of the withdrawal
 {
     isVerified :"true" 
     checksum :""
 }

Here are steps merchant must take to compute the above checksum return as response in the above example for the withdrawal to be successful

Checksum generation process

Hash algorithm = SHA512

  1. Hash your secerteKey, e.g hashedSecreteKey = "Hashed secerteKey"

  2. concat your reference with the withdrawal destination wallet address, e.g var ReferenceAndDestinationWallet_CONCAT = ${merchantReference}:${destinationWallet}

  3. stringToHash = hashedSecreteKey + referenceAndDestinationWallet_CONCAT

  4. var checksum = hashed (StringToHash)

Sample

2) How to set up verificationUrl

Go to "Settings" >> "ApiKey & Webhook"

Paste your url in the verificationUrl Input box and press the "Update" button beside it

Last updated