DeFi Checkout

XendBridge also provides a quicker way to integrate using our Defi Checkout where you get to make an order request only by sending the parameters via URL.

In order to make the request, you must already have an account and setup. Below is the web page url and parameters that contain required and optional ones needed to redirect your users.

&payIn=NGN&payInNetwork=LOCAL&receiveIn=BUSD&receiveInNetwork=BEP20&amt=50&sign=signature

GET https://checkout-staging.xendbridge.com/transaction?pk={yourPK}&wallet={walletAddress}&allowEdit=false&id={newUuid}&orderType=buy

Query Parameters

NameTypeDescription

pk*

string

{publicKey}

id*

uuid

3fa85f64-5717-4562-b3fc-2c963f66afa6

payIn

string

NGN

payInNetwork

string

LOCAL

receiveIn

string

BUSD

receiveInNetwork

string

BEP-20

amt

int

50

wallet*

string

0x52434Ac4BE04393e020c9b16C327d04d4367Cbcd

sign*

uuid

2JI8dgtm3ZiynG6rige5z0JErd7JVadbgZzY2CvVu1/T1iAZEEDIjQbQ9k2SjomlMcnuGVadS1/fx7NCvPw91Q==

allowEdit*

bool

false

orderType*

string

Buy

Example Web URL Order
https://checkout-staging.xendbridge.com/transaction?pk=XLPUK_95BAFDA4E7874C7CB9A3A0CBFF08CB90
&wallet=0x52434Ac4BE04393e020c9b16C327d04d4367Cbcd
&allowEdit=false&id=1fa85f62-5717-4562-b3fc-2c963f66afa6
&orderType=buy&payIn=NGN&payInNetwork=LOCAL
&receiveIn=BUSD&receiveInNetwork=BEP20&amt=1500
&sign=signature

Generating Signature

In order to generate the signature needed to verify the order being made, you'd have to generate a signature hash using the following data:

string data = $"{yourApp.SecretKey}{yourApp.PublicKey}
{model.WalletAddress}{model.AllowEdit}{model.RequestId}";

The Hash Algorithm is sha512 and the output should be in hexadecimal;

byte[] hashBytes = sha512Hash(data);

string hashInHexFormat = ConvertByteToHexString(hashBytes);

{model.AllowEdit} is a bool property which indicates whether the user can edit the order after being redirected by the web url order.

Use any library or implementations to your liking to achieve the above before passing the value as the sign on the URL.

After this is done, your users are redirected to our portal to continue with registration/login and finish the order request.

Last updated