Pay3 URL Mode

6min

Introduction

Pay3 provides URL Mode of integration for Pay3 web SDK. This solution is platform agnostic (Unity, Unreal etc) . This is also useful in case when the dApp decides to not include a platform specific sdk provided by Pay3. Here the dApp interacts with Pay3's solution using http url parameters. A customised Pay3 wallet and payment solution opens up in a new browser window where your user can securely do the login & transactions.

In this mode the messages are sent back to the dApp using Webhooks.

URL Reference

Following is the structure of the url, where strings within <> have be replaced with correct values.

Curl


Host Name

pay3-hostname: Pay3 team will share the hostname of the Pay3 Web SDK. This will be different for development, pre-production and production environment.

Path Parameters

  1. sdk-view: This parameter can take values web-sdk or web-sdk-pay based on the requirement of the dApp. Integrated wallet and payments solution is available at web-sdk, while payments only solution need web-sdk-pay.
  2. client-id: A unique client id is created for each client application. The client id is environment dependent.

Query Parameters

  1. referrer: The client application needs to pass<application-identifier>. The value is of the form scheme://resource. For a web based integration use https url of the application eg: https://my-dapp.com. In case of an ios app use application id lik ios://com.my-ios-dapp, for android use android://com.my-android-dapp. The referrer is whitelisted for the client-id.
  2. action: The client application needs to pass <action-type>.This parameter can take values login or buy.
  3. data: The client application needs to pass <action-data-in-base64-encoding> for data query parameter. This data is base 64 encoding of the json string parameter associated with the action. Dapp needs to send a unique requestId value in the payload. Refer to transactionObj for full list of parameters that can be passed in this payload.

Connect your wallet

Pay3 Web SDK provides secure and easy login options for users. User will be able to connect to the wallet using Social, Email & Phone OTP or Wallet connect.

Following is a C# code that can be used with in Unity based code snippet that generates a URL of Login Modal with all the required params and opens it in a browser. This can be associated with a Login / Connect Wallet Button with in the dApp.

CSP


Best practice here is to store the requestId with in dApp's backend so that the Webhook callbacks can be validated.

Buy Crypto

This function opens Pay3 buy crypto modal. The Buy modal will guide the user through the digital asset purchase flow.

Following is a C# code that can be used with in Unity based code snippet that generates a URL of Buy Modal with all the required params and opens it in a browser. This can be associated with Buy Button with in the dApp.

CSP


Receive Notifications of users actions.

After completing transactions in Pay3 Wallet Modal, the Pay3 SDK publishes webhook events. For more information refer to Webhooks

Unity Plugin

Pay3 provides an easy to integrate Unity plugin for games. This plugin abstracts the above functionalities and integrates with Firebase Realtime Database to provide events directly to the game. Details of this plugin will be provided upon request.