---
title: Transactions
slug: crypto/transactions
docTags: 
createdAt: 2025-12-24T09:57:14.681Z
---

### pay3Pay.openCryptoCheckout(transactionObj)

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.&#x20;

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 checkout](docId:8tejd9BeOuudZ6DeeilXh)&#x20;

This needs to be called after calling [Create Crypto Checkout Order](docId\:OBfd2VKKnqM4xvcIJa8YN) from application's backend. The digital asset purchased will be deposited into the wallet address provided in the [Create Crypto Checkout Order](docId\:OBfd2VKKnqM4xvcIJa8YN).

**Parameters**

1. **requestId&#x20;**(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.&#x20;
2. **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.
3. **mode** (Optional Type enum string): Application can take full control on how the Pay3 payment model showed up using this option &#x20;
   1. `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.
   2. `redirect` - In this mode the openCryptoCheckout() function will redirect user from application's page to Pay3 payment page where user can complete the payment.&#x20;
   3. `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.
4. **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](docId\:xwWaLQLjb7qBTv8ltDFWG) for more details.

**Token buy flow where destination address is Game's wallet address&#x20;**

:::CodeblockTabs
index.js

```javascript
const transactionObj = {
  "requestId": requestId,
  "token": pay3CreatedTokenId
};

// Opens Pay3 Crypto Checkout Modal
await pay3.openCryptoCheckout(transactionObj);
```
:::

***

