Skip to content

Widget URL

If you want to guide customers to a specific page of Cabital Widget, you need to put the signature in the URL as described below.

The process of creating a signature is as follows:

  1. Add the required parameters to the widget base URL.
  2. Add the additional required parameters for the specific feature page according to you want.
  3. Encrypt the URL (including parameters) with Secret Key.
  4. Put the result of step 3 with the signature parameter at the end of the URL.
  5. Enter this widget URL in the browser.

Step 1: Add the required parameters

https://connect.cabital.com/api/v1/partner/link

Parameter Required Description
partner_key Yes Partner's Access Key
user_ext_ref Yes Customer account ID provided by Partner
feature Yes Specific feature page
  • onboarding: Onboarding
  • link: Link account
  • kyc: KYC
  • 2fa: Set up 2FA
  • wallet: Wallet
  • deposit: Deposit
  • buy: Buy crypto
  • convert: Convert
  • transfer: Transfer
  • transaction: Transaction list of a specific currency
  • transaction_detail: Transaction details
  • withdraw: Withdraw

Step 2: Add the additional required parameters

Widget feature Required parameter Optional parameter
Link Account link email: Customer account ID provided by Partner redirect_url: Redirected to the partner site immediately after account linked.
Onboarding onboarding email: Customer account ID provided by Partner redirect_url: Redirected to partner site by clicking button below on Cabital Widget
KYC kyc - -
Set up 2FA 2fa - -
Wallet wallet - -
Deposit deposit -
  • method: Deposit method
  • major_ccy: Deposit currency
  • major_amount: Deposit amount
Buy Crypto buy -
  • pair: Currency pair
  • major_ccy: The fiat currency the customer wants to spend
  • major_amount: Spend amount
Convert convert -
  • pair:Trading pair
  • major_ccy: The currency customers enter on conversion UI
  • major_amount: Buy or sell amount
Transfer transfer -
  • major_ccy: Transfer currency
  • major_amount: Transfer amount
Transaction List transaction major_ccy: The currency of transaction -
Transaction Details transaction_detail txn_id: Transaction ID -
Withdraw withdraw -
  • method: Withdraw method
  • major_ccy: Withdraw currency
  • major_amount: Withdraw amount

Step 3: Encrypt the URL

Encrypt the URL with Secret Key by HMAC-SHA256, and encode the result to URL-encoded format with in Base64.

You can validate the encryption result by using this online tool.

Step 4: Put the signature parameter at the end of the URL

e.g. https://connect.cabital.com/api/v1/partner/link?partner_key=ccf290ed-ebee-9f87-4b35-cd1c174c90bf&user_ext_ref=cabital_user_1656048062&redirect_url=https%3A%2F%2Fwww.google.com%2F&feature=link&email=demo@partner.com&signature=0rsN8CSfeRHbaRfuGQeqrIcn%2BkEBzImPsEXihLcuGh4%3D

Example

Partner's information

  • Access Key is ccf290ed-ebee-9f87-4b35-cd1c174c90bf
  • Secret Key is 123 (this is a sample, not a real secret key)

Scenario

Redirect customer to Google after completing account link on Cabital Widget.

Compose steps

  1. The base URL of link feature page is :

    https://connect.cabital.com/api/v1/partner/link?feature=link&partner_key=ccf290ed-ebee-9f87-4b35-cd1c174c90bf&user_ext_ref=cabital_user_1656048062

  2. Add the required parameters according to different feature page, and add the optional parameters as appropriate:
    The required parameter of the link feature is email. If you want to redirect customer to Google after account linking, you have to add the optional parameter redirect_url.

    https://connect.cabital.com/api/v1/partner/link?feature=link&partner_key=ccf290ed-ebee-9f87-4b35-cd1c174c90bf&user_ext_ref=cabital_user_1656048062&redirect_url=https%3A%2F%2Fwww.google.com%2F&email=demo@partner.com

  3. After encrypting then encoding the URL, the result is:

    0rsN8CSfeRHbaRfuGQeqrIcn%2BkEBzImPsEXihLcuGh4%3D

  4. Add the encryption result to the end of the URL with the value of the signature parameter:

    https://connect.cabital.com/api/v1/partner/link?partner_key=ccf290ed-ebee-9f87-4b35-cd1c174c90bf&user_ext_ref=cabital_user_1656048062&redirect_url=https%3A%2F%2Fwww.google.com%2F&feature=link&email=demo@partner.com&signature=0rsN8CSfeRHbaRfuGQeqrIcn%2BkEBzImPsEXihLcuGh4%3D