Pay3 Unity Integration
Transactions
2min
triggeropencheckout the application can use triggeropencheckout to receive payments from the users here the pay3 modal will guide user through fiat payment services and deposit the payment to the app's fiat account checkoutpayload json string with following parameters requestid (type string) app needs to generate a unique identifier for every checkout call this id will be provided in the events and webhooks callbacks this id can be used by the app to identify and update state in app's backend user (type object) user details can be passed to pay3 in this object email (type string) provide valid email address of user this data will be passed to paymen partner during the fiat checkout flow payment partner might send mails to user updating them status of their transaction payment (type object) this section provides is the amount payable by the user of your platform it could be cost price of your digital asset user wishes to checkout amount (type string) string representing currency amount in two decimal precision the amount is provided separately for each supported currency name (type string) name of the currency supported in the purchase flow the name will be provided by pay3 during onboarding usermessage (type string) short meaningful name of the asset user is about to purchase pay3helper cs public class pay3helper monobehaviour { // pseudocode to trigger checkout using fiat public void triggeropencheckout() { string checkoutpayload = "{}"; // create a checkout payload byte\[] plaintextbytes = encoding utf8 getbytes(checkoutpayload); string requestparam = convert tobase64string(plaintextbytes); string requrl = "https //"+hostname+"/web sdk/"+ clientid +"?referrer="+deeplink+"\&action=checkout\&data=" + requestparam; application openurl(requrl); } }