XendBridge
  • Get Started
  • 🛠️API Method Calls
    • Third Party Order Operations
      • Rate
      • Buy Order
      • Sell Order
      • Swap Order
      • Pending Order
      • Pay For Order
      • Cancel Order
    • LP Simulation
      • Pay For Order (Buy Order)
      • Pay For Order (Sell Order)
    • Dispute
      • Raise Third Party Dispute
      • Get All Disputes
      • XendBridge Chat SDK
    • Payment Inquiry
    • WebHooks
      • Order Payment Confirmation
      • Order Matched Notification
      • Order Canceled Notification
      • Checksum Verification
  • 📄XENDBRIDGE PORTAL
    • Checkout URL
      • Buy Order
      • Sell Order
      • Swap Order
      • Rate
      • Rate Bounds
      • Initiate Order Created With Deferred Payment Method
      • Supported Currencies
      • Payment Methods
    • Inline Html Snippet
    • DeFi Checkout
  • 📦XENDBRIDGE SDKS
    • XendBridge NodeJs SDK
    • XendBridge .NET SDK
      • Rate
      • Buy Order
      • Sell Order
      • Swap Order
      • Pending Order
      • Pay For Order Confirmation
      • Cancel Order
      • Raise A Dispute
  • Errors
  • 🔖REFERENCE
    • API Reference
Powered by GitBook
On this page

Was this helpful?

  1. XENDBRIDGE PORTAL

DeFi Checkout

PreviousInline Html SnippetNextXendBridge NodeJs SDK

Last updated 2 years ago

Was this helpful?

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 and . 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

Name
Type
Description

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.

See for the base urls of the different environments.

📄
account
setup
Environments