Transactions
The application can use openCheckout to use Pay3's Fiat only solution. Here the Pay3 modal will guide user through fiat payment services and deposit the payment to the app's Fiat account.
Parameters
- requestId (Type string): App needs to generate a unique identifier for every checkout call. This id will be provided in the Javascript 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.
- lastName (Optional Type string): Last name of the user with maximum length of 50 characters.
- taxId (Optional Type string): This is country specific tax identifier of the user. For example for users of Brazil, it is the CPF number.
- phoneNumber (Optional Type string): This is the phone number of the user in E.164 format [+][country code][number including area code] which can have a maximum of fifteen digits.
- pixKey (Optional Type string): This is the unique identifier for a user in the PIX system, provided by the user. It can be an email address, phone number, CPF, or a random key.
- intlBankAccount (Optional Type string): This is the International Bank Account Number (IBAN) entered by the user. It follows the standard IBAN format, which includes the country code, check digits, and the bank account number.
- bankAccount (Optional Type string): This is the bank account number entered by the user. It is specific to the user's bank and is used to identify the user's account within the financial institution.
- docType (Optional Type string): This specifies the type of document, which for instance for Brazil is CPF (Cadastro de Pessoas Físicas). CPF is the Brazilian individual taxpayer registry identification.
- docId (Optional Type string): This is the Documentation ID, entered by the user. It corresponds to the specific identifier for the type of document (e.g., CPF number) provided.
- payment (Type Array of Objects ): 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.
- paymentMethodKey (Optional Type string): Payment method key indicates the payment method that is suitable for the payment currency specified in name. This could help in customization of the user interface. This is considered only if the payment array has a single Object.
- userMessage (Type string): Short meaningful name of the asset user is about to purchase.
- mode (Optional Type enum string): Application can take full control on how the Pay3 payment model showed up using this option
- returnUrl - In this mode, the openCheckout() will return a Pay3 payment url which can be used to embed within clients application. This is useful when the client need to open Pay3 url with in a WebView (in React Native application) or Iframe.
- redirect - In this mode the open checkout() function will redirect user from application's page to Pay3 payment page where user can complete the payment.
- default - If this parameter is not sent or does not match above values, Pay3 sdk will open a new window/tab while application page will be accessible to the user in the background.
- callbackUrl (Optional Type url): Application can provide a url in this parameter. After completion of the transaction, user will be redirected to this url. An additional parameter data query parameter will be added to the url. Refer callback url for more details.
The application can use openPayout to use Pay3's fiat withdraw solution. Once this function is called, the Pay3 modal will guide the user through the withdraw of funds flow. The funds will be deposited into users' account.
This needs to be called after calling create payout order from application's backend.
Parameters
- requestId (Type string): App needs to generate a unique identifier for every payout call. This id will be provided in the Javascript events and Webhooks callbacks. This id can be used by the App to identify and update state in App's backend.
- token (Type string): This is a unique id generated by Pay3 backend on calling create payout order. This is to identify the approved order created by Application's backend.
- mode (Optional Type enum string): Application can take full control on how the Pay3 payment model showed up using this option
- returnUrl - In this mode, the openCheckout() will return a Pay3 payment url which can be used to embed within clients application. This is useful when the client need to open Pay3 url with in a WebView (in React Native application) or Iframe.
- redirect - In this mode the open checkout() function will redirect user from application's page to Pay3 payment page where user can complete the payment.
- default - If this parameter is not sent or does not match above values, Pay3 sdk will open a new window/tab while application page will be accessible to the user in the background.
- callbackUrl (Optional Type url): Application can provide a url in this parameter. After completion of the transaction, user will be redirected to this url. An additional parameter data query parameter will be added to the url. Refer callback url for more details.
This function opens Pay3 buy crypto modal. The Buy modal will guide the user through the digital asset purchase flow using user's own digital assets like Coins and ERC20 tokens. User can connect their wallet and pay through the connected wallet or users can deposit using QR code. For detailed understanding please refer to end user flow - crypto payin
This needs to be called after calling create crypto checkout order from application's backend. The digital asset purchased will be deposited into the wallet address provided in the create crypto checkout order.
Parameters
- requestId (Type string): App needs to generate a unique identifier for every openCryptoCheckout call. This id will be provided in the Javascript events and Webhooks callbacks. This id can be used by the App to identify and update state in App's backend.
- token (Type string): This is a unique id generated by Pay3 backend on calling create crypto checkout order. This is to identify the request created by Application's backend.
- mode (Optional Type enum string): Application can take full control on how the Pay3 payment model showed up using this option
- returnUrl - In this mode, the openCryptoCheckout() will return a Pay3 payment url which can be used to embed within clients application. This is useful when the client need to open Pay3 url with in a WebView (in React Native application) or Iframe.
- redirect - In this mode the openCryptoCheckout() function will redirect user from application's page to Pay3 payment page where user can complete the payment.
- default - If this parameter is not sent or does not match above values, Pay3 sdk will open a new window/tab while application page will be accessible to the user in the background.
- callbackUrl (Optional Type url): Application can provide a url in this parameter. After completion of the transaction, user will be redirected to this url. An additional parameter data query parameter will be added to the url. Refer callback url for more details.
Token buy flow where destination address is Game's wallet address