# Project Overview

Paymento is a revolutionary non-custodial cryptocurrency payment platform designed to empower businesses to seamlessly accept and manage crypto payments. By eliminating intermediaries, Paymento prioritizes security, transparency, and control, enabling merchants to directly receive payments into their wallets. The platform is engineered to address the limitations of traditional payment systems and bridge the gap between cryptocurrency technology and real-world commerce.

Key features of Paymento include multi-chain support, automated volatility mitigation, and integration with popular e-commerce platforms. In addition, Paymento introduces decentralized finance (DeFi) tools, such as "Buy Now, Pay Later" (BNPL) and crypto-backed loans, offering merchants and consumers innovative financial solutions.

Paymento is committed to making cryptocurrency payments accessible to businesses of all sizes, fostering global inclusivity while promoting the adoption of decentralized financial systems. By providing secure, user-friendly solutions for both online and in-person transactions, Paymento is redefining how businesses and individuals transact in the digital age.

Join us on this transformative journey as we revolutionize the way the world transacts with Paymento – the future of decentralized payments starts here.

## Quick links

{% content-ref url="/pages/KuHxGnhJX5476wlg9Ser" %}
[Mission and Vision](/overview/mission-and-vision)
{% endcontent-ref %}

{% content-ref url="/pages/iMc16DsZ6yMDYYAVr0zj" %}
[Whitepaper](/overview/whitepaper)
{% endcontent-ref %}

## Get Started

We've put together some helpful guides for you to start accepting crypto payment's easily.

{% content-ref url="/pages/bFIJzhFt0a6Ef0xAQThi" %}
[Get Started](/accept-crypto-payments/get-started)
{% endcontent-ref %}

{% content-ref url="/pages/iUunYwK04N9F6U8Egxgc" %}
[API Key Generation](/accept-crypto-payments/api-key-generation)
{% endcontent-ref %}

{% content-ref url="/pages/s5n3kFiBjsEFDRmBeXS5" %}
[Payment Integration](/accept-crypto-payments/payment-integration)
{% endcontent-ref %}


# Mission and Vision

## Mission&#x20;

At Paymento, our mission is to democratize access to decentralized finance (DeFi) by providing businesses and individuals with a secure and user-friendly platform for crypto payments. We are committed to accelerating the adoption of digital assets worldwide, empowering merchants to accept crypto seamlessly and enabling consumers to transact with confidence.

## Vision Statement

Our vision at Paymento is to create a borderless and inclusive financial ecosystem where everyone has the freedom to transact securely and transparently. We envision a future where cryptocurrencies are seamlessly integrated into everyday transactions, offering unparalleled convenience, accessibility, and financial empowerment to all. With Paymento, we're building the foundation for a decentralized economy that puts the power back in the hands of the people.


# Whitepaper

{% hint style="info" %}
Whitepaper in PDF: You may download our Whitepaper in PDF format by [clicking here.](https://statics.paymento.io/documents/paymento-whitepaper.pdf)
{% endhint %}

## Abstract / Executive Summary

By utilizing the power of blockchain technology, Paymento will provide an end-to-end payment solution that allows for transactions to be made directly between users and merchants, eliminating the need for intermediaries. This allows us to provide lower transaction fees while simultaneously enhancing transaction privacy. Key to our platform's value proposition is the ability to integrate with both software and hardware wallets. Users can securely connect their wallets, provide the public key to our web application, and start accepting crypto payments instantly.

To supplement our operations, we're introducing a native utility token that serves multiple purposes within our ecosystem. Users can leverage this token to pay for transaction fees, access premium features, and more, driving our platform's growth and utility.

Through Paymento, we seek to bridge the gap between the fast-paced world of cryptocurrencies and everyday commerce, bringing about the next big step in financial inclusivity and decentralization. With a focus on user sovereignty, security, and ease of use, Paymento is poised to redefine how businesses and individuals transact using cryptocurrencies.

## Introduction to Paymento

The Bitcoin whitepaper initially proposed a system for electronic cash, enabling online payments to be sent directly from one party to another without the need for a financial institution. Despite this vision, today, Bitcoin, alongside many other cryptocurrencies, is predominantly used as an asset rather than a medium for everyday transactions. This shift is largely due to a lack of a trustless, user-friendly payment ecosystem, which has stifled the wider adoption of cryptocurrencies as a means of payment.

Enter Paymento - a non-custodial cryptocurrency payment platform designed to revolutionize this space. Paymento enables businesses to seamlessly accept crypto payments in a secure and transparent manner without having to sacrifice their control over funds. More than just a payment gateway, Paymento equips merchants with the ability to offer decentralized 'Buy Now, Pay Later' and installment payment options to their customers, mitigating the risk of fund loss. Furthermore, Paymento is set to break new ground by integrating DeFi lending protocols, which will allow users to leverage their crypto assets more efficiently.

Furthermore, Paymento's emphasis on user-friendly design and transparency encourages consumers to incorporate cryptocurrency payments into their daily lives, thus driving wider crypto adoption.

With these features, Paymento is positioned to effectively integrate cryptocurrency into the global payment economy. By aligning with the market's demand for speed, convenience, safety, and security for users, while also boosting efficiency and reliability for merchants, Paymento is set to bring us one step closer to realizing the original vision of Bitcoin and other cryptocurrencies.

<br>


# Problem Statement

### Loss of Self-Custody

A fundamental appeal of cryptocurrencies is the empowerment they offer individuals to have full custody of their assets, a stark departure from the traditional banking systems. Yet, the current crypto payment gateways often compel users and merchants to forfeit this control. To accept crypto payments, businesses face a dilemma: entrust their funds to third-party payment processors or bear the technical and financial burdens of running a full node for each cryptocurrency they wish to accept. Both scenarios are far from ideal, either compromising the security and control over funds or imposing significant operational challenges.

### Absence of Decentralized Installment Payments:

Despite the decentralized nature of cryptocurrencies, there remains a glaring absence of truly decentralized platforms that facilitate transactions in a way that aligns with the core principles of blockchain technology. Current solutions are often centralized, negating the benefits of decentralization such as enhanced security, reduced points of failure, and avoidance of censorship.

### Market Volatility and Risk

The high volatility of cryptocurrency prices poses a considerable challenge for merchants and consumers alike. For merchants, accepting crypto payments can lead to significant financial risk, as the value of the received cryptocurrency can drastically fluctuate within short periods. This volatility discourages widespread adoption among businesses concerned about their bottom line.

### Scalability Issues

Many crypto payment solutions struggle with scalability, leading to delays and limited support of cryptocurrencies. This lack of reliability and efficiency is a deterrent for businesses and consumers who expect the same level of performance they receive from traditional electronic payment systems.

### Lack of Hardware for Point of Sale (POS) Transactions&#x20;

The acceptance of cryptocurrency should not be limited to online payments. However, there is a lack of secure, easy-to-use, and manageable POS devices for accepting crypto payments in a non-custodial manner.

### Compromised Anonymity and Privacy

Limited POS Solutions and Privacy Concerns The cryptocurrency ecosystem severely lacks secure and user-friendly point-of-sale (POS) systems for in-person transactions, limiting crypto payments to online platforms. Additionally, privacy and anonymity, which are among the foundational ideals of cryptocurrencies, are often compromised in current payment solutions that require extensive personal and financial information for transactions.

Each of these issues contributes to the larger problem – the underutilization of cryptocurrencies as a medium of exchange. Paymento aims to address these challenges, driving wider adoption of cryptocurrencies in daily commerce and bringing us one step closer to realizing the original vision of cryptocurrencies as decentralized digital cash.


# Solution

### Non-Custodial Payment Gateway:

At the core of Paymento's innovation is its non-custodial payment gateway, which empowers users and merchants to transact directly, without relinquishing control of their funds to a third party. By facilitating transactions that bypass traditional intermediaries, Paymento ensures that the fundamental promise of blockchain — financial sovereignty — is maintained. Merchants receive payments directly into their wallets, with Paymento streamlining the process by generating payment addresses from the merchant’s public key and monitoring the blockchain for transactions, thus combining security with convenience.

<figure><img src="/files/vaK98bhTGgTH7abswjC5" alt=""><figcaption><p>How Paymento Offers Non-Custodial Gateway</p></figcaption></figure>

### Installment Payment Offering

Recognizing the growing importance of decentralized finance (DeFi), Paymento integrates with leading DeFi protocols to offer innovative financial services, such as crypto-backed loans and installment payment options. This integration allows users to leverage their crypto assets in new ways, enhancing liquidity and utility without selling their holdings, thereby fostering a more dynamic and flexible financial ecosystem.

<figure><img src="/files/P5CwKDstuIiZzhN7Bjug" alt=""><figcaption><p>BNPL </p></figcaption></figure>

### Volatility Risk Mitigation

Understanding the critical challenge posed by the volatility of cryptocurrencies, Paymento supports stablecoins and enables automatic conversion of payments into the merchant's preferred asset(s) by aggregating multiple exchange platforms. This feature enhances the buying experience for users by enabling them to make payments with their preferred assets.

### High Scalability

To extend the utility of cryptocurrencies beyond online transactions, Paymento is developing a suite of secure, easy-to-use point-of-sale (POS) solutions. These devices and applications will facilitate seamless crypto payments in physical storefronts, expanding the adoption of cryptocurrencies into everyday commerce and enabling true financial inclusivity

### &#x20;Enhanced Privacy and Security

Paymento respects the value of anonymity and privacy that is inherent to cryptocurrencies. By operating as a non-custodial payment gateway, it minimizes the amount of personal and financial information that users need to disclose.By minimizing data collection and adhering to the highest standards of security, Paymento preserves the privacy that is highly valued within the crypto community, making it an attractive platform for users and merchants alike.

Paymento’s proposed solution is a multi-faceted approach designed to tackle the critical barriers to cryptocurrency adoption for payments. By offering a non-custodial, scalable, and secure platform that mitigates volatility risks, extends POS solutions, and integrates with DeFi, Paymento is poised to bridge the gap between the potential of cryptocurrencies and their practical application in daily transactions. With Paymento, the vision of a decentralized, inclusive, and efficient global financial system is not just a possibility—it’s within reach.

<br>


# Architecture and Technology

Paymento is engineered to revolutionize the crypto payment landscape by leveraging a sophisticated architecture that integrates liquidity management technologies for bringing installment payment to crypto space. This architecture is designed to address the complexities of installment crypto payments, ensuring the platform is robust, agile, and capable of adapting to the rapidly evolving digital finance ecosystem. Here’s an in-depth look at the key components of Paymento’s product architecture and technology stack, with a special focus on our innovative liquidity management technologies.

### Decentralized Infrastructure

Utilizing a decentralized infrastructure, Paymento distributes operations across a network of nodes to ensure high availability, fault tolerance, and resistance to censorship. This foundational layer supports direct, wallet-to-wallet transactions without intermediaries, preserving the essence of blockchain's promise for financial sovereignty and security.

### **Microservices Architecture**

At the heart of Paymento's system is a microservices architecture, which allows for the modular and independent development of services. This structure supports scalability and rapid innovation, enabling the seamless integration of new cryptocurrencies and features. Each microservice manages a specific business function, enhancing the overall performance and reliability of the Paymento platform.

### Smart Contracts for Secure Transactions

Paymento harnesses smart contracts to automate the execution of secure transactions on the blockchain. These contracts facilitate the transfer of crypto assets based on predefined conditions, ensuring transactions are transparent, irreversible, and secure. Smart contracts are crucial for automating Paymento's liquidity management features, such as collateral saving and liquidation bonuses.

### Liquidity Management Technologies

Paymento introduces a novel approach to liquidity management, designed to mitigate the risks associated with crypto asset volatility and to provide additional revenue streams through DeFi mechanisms:

* Liquidity Pool Paymento maintains a liquidity pool to offer a collateral-saving service for users engaging in BNPL and loan agreements. This pool is used to prevent the liquidation of collateral at risk due to market fluctuations, ensuring users can reclaim their assets under more favorable conditions, albeit at a higher interest rate.
* Automated Liquidation System For high-risk assets, Paymento employs an automated liquidation system. This system preemptively identifies collateral at risk of falling below the health factor threshold and executes liquidations internally, securing liquidation bonuses. This process benefits from existing models like those employed by Aave and Compound, which are known for their efficient and transparent liquidation mechanisms. By adapting these models, Paymento can optimize its revenue generation while providing a safety net for users.

### Multi-Chain Support

Recognizing the diversity of the crypto ecosystem, Paymento supports transactions across multiple blockchain networks. This not only enhances platform accessibility but also optimizes transaction costs and speeds by leveraging the unique advantages of each supported blockchain.

### User Interface and Experience&#x20;

A user-friendly interface is key to Paymento’s adoption. The platform offers an intuitive experience, simplifying the process of making and receiving crypto payments. Regardless of technical expertise, users find the platform accessible and easy to navigate, ensuring a seamless transaction process.

### Security Measures&#x20;

Paymento prioritizes the security of its users' data and assets. Advanced encryption, secure key management, and stringent access controls are in place to protect against unauthorized access and fraud. Regular security audits and compliance checks ensure that Paymento adheres to the highest industry standards. By incorporating decentralized infrastructure, microservices, smart contracts, and especially liquidity management technologies, Paymento not only addresses current challenges in crypto payments but also paves the way for the future of decentralized finance. The platform's commitment to security, scalability, and user experience positions Paymento as a leader in the crypto payment space, ready to transform how the world transacts with digital currencies.


# Business Model

&#x20;Paymento's tokenomics and financial model are intricately designed to ensure the platform's long-term sustainability and to create a thriving ecosystem around the PMO token. This section expands on the utility of PMO within Paymento's innovative liquidity management framework and details the mechanisms in place for ensuring financial sustainability.

### Token Utility&#x20;

The PMO token serves as the cornerstone of Paymento's ecosystem, offering users a multifaceted utility that enhances the platform's value proposition:

* **Transaction Fees:** PMO holders benefit from reduced transaction fees on the Paymento platform, incentivizing the use of PMO for daily operations.&#x20;
* **Liquidity Pool Participation:** Users can stake PMO tokens to participate in Paymento's liquidity pool. This not only supports the platform's liquidity management services but also rewards stakers with a share of the revenue generated from higher interest rates charged for collateral saving and liquidation bonuses.&#x20;
* **Governance:** PMO grants holders voting rights in governance decisions, allowing them to influence the platform's development, feature integration, and liquidity management policies.


# Financial Sustainability

Paymento's financial model is designed for resilience and growth, leveraging diverse revenue streams and a strategic token economy to support the platform's operations and ecosystem development:

**Diverse Revenue Streams:** Beyond transaction fees, Paymento introduces innovative revenue mechanisms through its liquidity management technologies. This includes interest from collateral-saving interventions and bonuses from in-house liquidation processes, which are pivotal to Paymento's financial model.

**Liquidity Pool Rewards:** The liquidity pool, funded by PMO staking, is a critical component of Paymento's financial sustainability. It enables the platform to offer collateral-saving services and participate in liquidations efficiently. The pool is managed to ensure optimal utilization of funds, balancing risk and reward to maintain financial health.

**Token Buyback and Burn:** A portion of the revenue generated through Paymento's liquidity management services is allocated to buying back PMO tokens from the market. These tokens are subsequently burned, reducing the total supply and potentially increasing the token's value, benefiting all stakeholders in the ecosystem.

**Sustainable Fee Structure:** Paymento's fee structure is designed to be competitive and sustainable, ensuring that the platform can continue to offer high-quality services while also investing in growth and innovation. Fees from liquidity management services are set to reflect the value provided to users, ensuring they are in line with market expectations and platform objectives.

**Staking Incentives:** Staking PMO not only contributes to the platform's liquidity but also earns stakers a percentage of the profits from liquidity management activities. This creates a virtuous cycle, encouraging more users to stake PMO, thereby increasing the platform's financial stability and the token's utility.


# Tokenomics

• Total Supply: The total supply of Paymetno tokens is 700,000,000.

### Token Allocation

The allocation of tokens ensures a fair distribution that balances the interests of all stakeholders. The allocation plan is as follows:&#x20;

* &#x20;Investors: 189 million (27%)&#x20;
* Staking: 105 million (15%)&#x20;
* Community: 84 million (12%)&#x20;
* Partnership: 56 million (8%)&#x20;
* Advisor: 21 million (3%)&#x20;
* Development and Team: 140 million (20%)&#x20;
* Airdrop: 21 million (3%)&#x20;
* Geo Expansion and Reserves: 84 million (12%)

<figure><img src="/files/hDNgOOEc9PNOSnJ76M7h" alt=""><figcaption></figcaption></figure>

### Token Vesting&#x20;

Each phase has a unique vesting plan that is designed to ensure the long-term stability and sustainability of the token. Vesting periods range from a few months to several years, with a small percentage of tokens usually available at the Token Generation Event (TGE). The allocation and vesting details for each phase are as provided above.


# Road Map

### Q1-Q4 2024: Foundation and Development

* **Technical Infrastructure Setup:** Establish the core blockchain infrastructure and smart contract protocols.
* **Beta Platform Launch:** Release a beta version of the Paymento platform for community testing and feedback.
* **Security Audits:** Conduct comprehensive security audits to ensure the platform's integrity and trustworthiness.
* **Test and Debug:** Community development campaigns for testing and getting feedback.

***

### Q1-Q3 2025: Public Launch and Ecosystem Growth

* **Public Launch:** Officially launch the Paymento platform with full functionality of non-custodial payment gateway.
* **Token Generation Event (TGE):** Conduct the TGE for Paymento token, establishing its presence in the market.
* **Partnership Development:** Forge strategic partnerships with merchants, e-commerce platforms, and DeFi protocols to enhance platform utility and adoption.
* **Community Programs:** Initiate community engagement programs, including airdrops, staking rewards, and governance forums.

***

### Q3-Q4 2025: Expansion and Enhancement

* **Multi-Chain Integration:** Expand Paymento's infrastructure to support additional blockchain networks, enhancing versatility and user choice.
* **Defi Exchange Integration:** Implementation of decentralized protocols to allow merchant real-time currency conversion.
* **Global Marketing Campaign:** Launch a global marketing campaign to increase Paymento's visibility and user base across different regions.

***

### &#x20;Q1-Q4 2026: Scalability and Decentralization

* **Decentralized Governance Model:** Transition to a fully decentralized governance model, allowing Paymento Token holders to vote on key platform decisions and proposals.
* **Advanced Features Rollout:** Introduce advanced platform features, including decentralized 'Buy Now, Pay Later' options and integration with additional DeFi lending platforms.
* **POS Solutions:** Release secure and user-friendly point-of-sale (POS) solutions for physical retailers, broadening the scope of crypto payments.

***

### **2027 Onwards: Innovation and Sustainability**

* **Continuous Innovation:** Pursue continuous innovation, exploring emerging technologies like layer 2 solutions, cross-chain bridges, and AI integration for fraud detection and customer service.
* **Sustainability Initiatives:** Launch initiatives aimed at ensuring the long-term sustainability of the Paymento ecosystem, including environmental considerations in blockchain operations.
* **Sustainability Initiatives:** Launch initiatives aimed at ensuring the long-term sustainability of the Paymento ecosystem, including environmental considerations in blockchain operations.


# Get Started

Turn your wallet to merchant account in 3 simple steps

## Step 1 - Launch App

Start by navigating to the Paymento website and click on the "Launch App" button. This will take you to the login or registration page.

## Step 2 - Connect Wallet or Register via email

&#x20;Signup by connecting your Web 3.0 wallet or fill in the required information, including your email address, a secure password to create your account.

### Step 3 - Verification

After submitting your registration form, you'll receive an email from Paymento. Click on the verification link within this email to activate your account.<br>


# API Key Generation

Once your account is active, generating an API key is straightforward:

### Add Your Store

1. Log in to your Paymento account and click on "Add Store"
2. &#x20;Provide your store's name, the list of cryptocurrencies you wish to accept, and upload your store's logo and click on Next.
3. &#x20;For each cryptocurrency, you'll need to provide a public key.&#x20;

   * UTXO-based Blockchains (e.g., Bitcoin): Provide an Extended Public Key (XPUB) for each UTXO-based blockchain you're accepting.
   * EVM-based Blockchains (e.g., Ethereum): Provide the account address for each EVM-based blockchain.

   You can either manually copy and paste the public key/address for each blockchain from your wallet or connect your wallet to Paymento to automatically retrieve them.
4. Once all details are entered and your public keys are provided, submit the information to finalize the setup of your store on Paymento.

Now just enable your store and you have access to API key for accepting payments.


# How to Export xPub Keys

How to Export xPub Keys from Popular Wallets for Non-Custodial Payment Integration

An Extended Public Key (xPub) is a crucial component of hierarchical deterministic (HD) wallets, allowing users to generate multiple receiving addresses without exposing private keys. This capability is especially valuable for merchants using non-custodial crypto payment gateways like **Paymento**, where privacy and control over funds are paramount.

**Note:**

* For UTXO-based blockchains like Bitcoin, Dogecoin, Litecoin, and others, you must provide your **xPub** to integrate with Paymento.
* For account-based blockchains such as Ethereum, Tron, and other EVM-compatible networks, you only need to provide your **wallet address**.

Below are step-by-step guides to help you export your xPub key from various popular wallets.

**Exodus Wallet**

* Open Exodus on your desktop.
* Navigate to the wallet for the cryptocurrency (e.g., Bitcoin).
* Click the three-dot menu in the top-right corner.
* Select "Export xPub."
* Locate your xPub key in the exported file stored in the `exodus-exports` folder on your desktop.

<figure><img src="/files/mWJwyfS2XTatknsXHHi1" alt=""><figcaption><p><a href="https://www.exodus.com/support/en/articles/8598696-how-do-i-export-my-xpub-or-zpub">Read the full article on Exodus</a></p></figcaption></figure>

**Electrum Wallet**

* Open the Electrum wallet.
* Go to the wallet section for the desired cryptocurrency.
* Click on "Wallet" in the top menu, then select "Information."
* Copy the xPub displayed in the wallet details window.

<figure><img src="/files/6FrCytnJWuBjm9N5sIMI" alt=""><figcaption></figcaption></figure>

**Ledger Live**

* Open Ledger Live and navigate to the desired account.
* Click the wrench icon (Edit Account).
* Go to the "Advanced log" tab.
* Locate and copy your xPub key.

<figure><img src="/files/MhUBemBl1c5fQELw1Agx" alt=""><figcaption><p><a href="https://support.ledger.com/article/360011069619-zd">Read the Full Article on Ledger</a></p></figcaption></figure>

**Trezor Suite**

* Open Trezor Suite and connect your Trezor device.
* Navigate to the account.
* Click the account name to access details.
* Locate and copy the xPub key displayed in the details section.

<figure><img src="/files/Moe4tkb5Y4ZhNbagmllP" alt=""><figcaption><p><a href="https://trezor.io/learn/a/what-is-a-public-key-xpub">Read the full article on Trezor</a></p></figcaption></figure>

**Blockchain.com Wallet**

* Log in to your Blockchain.com wallet.
* Navigate to Settings > Wallets & Addresses.
* Select the wallet and click "Manage."
* Click "Show xPub" to view your extended public key.<br>

<figure><img src="/files/8qh0kF9MztHpO4rxDJ1I" alt=""><figcaption><p><a href="https://support.blockchain.com/hc/en-us/articles/9012572718108-What-is-xPub-and-how-do-I-get-it">Read the full article on Blockchain.com</a></p></figcaption></figure>

\
**MetaMask** \
MetaMask does not support xPub key export because it focuses on Ethereum and other EVM-compatible networks. For these networks, you only need your account address to integrate with Paymento.<br>

**Mycelium**

* Open Mycelium.
* Select the account you want to retrieve the xPub for.
* Tap the three-dot menu and choose "Account Details."
* Locate and copy your xPub key.

**Green Wallet (Blockstream)**

* Open Green Wallet.
* Access the wallet settings for the relevant account.
* Click "Export xPub" to display and copy the key.<br>

**Wasabi Wallet**

* Launch Wasabi Wallet.
* Right-click the desired wallet and select "View xPub."
* The xPub key will appear in a new window.<br>

**Prokey Wallet**

* Launch Prokey Wallet
* Select a cryptocurrency like Bitcoin&#x20;
* Navigate to Settings >> Advance Settings and click on Show XPUB.

**Coinomi**

* Launch the Coinomi app on your device.&#x20;
* Navigate to the cryptocurrency account (e.g., Bitcoin) for which you need the xPub.
* Tap on the three-dot menu or settings option for the selected cryptocurrency.&#x20;
* Look for an option like "Export xPub" or "Show xPub".

### **Alternative Method for Deriving xPub**

If your wallet does not support direct xPub export:

1. Use your recovery phrase on iancoleman.io/bip39 **(offline mode recommended).**
2. Select the coin type and derivation path:
   * BIP44 for Legacy (xPub)
   * BIP49 for SegWit (yPub)
   * BIP84 for Native SegWit (zPub)
3. Copy the derived xPub key from the output.

*Ensure you only use this method with proper security protocols.*

### **Conclusion**

Exporting your xPub is essential for UTXO-based blockchain payment integrations. Meanwhile, for account-based blockchains, providing your wallet address suffices. Understanding your wallet's specific process for accessing xPub keys ensures seamless and secure integration for accepting crypto payments.


# Payment Integration

With your account set up and your store added to Paymento, you're now ready to integrate cryptocurrency payments into your website.&#x20;

You have three options to integrate Paymento with your website:

### No Code eCommerce Plugins

Paymento supports a variety of e-commerce platforms through ready-to-use plugins. Find [the plugin compatible ](/accept-crypto-payments/prebuilt-payment-plugins)with your platform in our knowledge base and follow the installation instructions for a hassle-free setup.

### Custom Checkout

If you are not using e-commerce platforms, you can still add Paymento into your website by adding a few lines of code.  Detailed steps and code snippets are available in [our integration guide and API documentation.](/api-documention/api-overview)

### No Code, No Website

If you're looking for a **no-code solution without a website**, try [**Payment Links**](/payment-links/payment-link-overview). You can instantly accept crypto payments by sharing a simple link or QR code, perfect for creators, communities, and small businesses. No integration, no coding, and no callback needed. Just create, share, and get paid.

### 🤖 AI Integration (Beta)

If you’re using AI coding assistants like **Cursor**, you can integrate Paymento with your app in just one prompt.\
\
We provide a **Product Requirement Document (PRD)** that contains the full flow, API rules, and sample code. Cursor (or any AI agent) will read this PRD and implement Paymento as your crypto payment gateway automatically.

👉 [View the AI Integration Guide on GitHub](https://github.com/paymento/paymento-integration-guide)<br>


# Prebuilt Payment Plugins

To help you integrate cryptocurrency payments into your business effortlessly, we are developing a range of prebuilt plugins tailored for various popular e-commerce platforms.

### Availability&#x20;

We are constantly developing new plugins to provide robust solutions that will enable you to start accepting cryptocurrencies quickly and securely right from your existing online store platforms.

### Supported Platforms&#x20;

\
We understand the diversity of e-commerce ecosystems and strive to support a broad range of platforms. at this time, we have developed plugins for the following e-commerce solutions:

* [WooCommerce](https://wordpress.org/plugins/paymento-crypto-gateway/)
* [OpenCart](https://www.opencart.com/index.php?route=marketplace/extension/info\&extension_id=46974\&filter_search=R)
* [WHMCS](https://marketplace.whmcs.com/group/paymento-crypto-gateway)

And we are currently developing plugins for the following e-commerce solutions:

* Shopify
* Magento
* BigCommerce

Each plugin is being designed with ease of installation and use in mind, ensuring you can integrate Paymento’s capabilities into your platform without needing extensive technical knowledge.

### Upcoming Features&#x20;

Your feedback is invaluable to us. If there are other e-commerce platforms for which you would like to see a Paymento payment plugin developed, please let us know. Join our community on Telegram and share your thoughts and preferences. Your input will help us prioritize and expand our plugin development efforts to better meet your needs.

### Stay Updated

As we continue to test and refine our plugins on the testnet, we encourage you to stay tuned for updates and announcements regarding our main net launch. Your preparation now will ensure a smooth transition to accepting cryptocurrencies as soon as our plugins go live.


# Shopping Test Experience

After creating your store and obtaining your API key, you can test the payment gateway functionality to ensure everything works smoothly. Follow these steps to make a test payment and experience the process firsthand:

#### Testing the Payment Gateway

**Using Shopdemo**

If you have not implemented Paymento with your software to test the Paymento gateway, use our demo shopping cart:

* **Demo URL**: [shopdemo.paymento.io](https://shopdemo.paymento.io)

Shopdemo allows you to test the payment gateway using Bitcoin Testnet and Ethereum Testnet.

#### Getting Testnet Funds

Before you can make test payments, you need to obtain testnet funds. Use the following faucets to get testnet Bitcoin and Ethereum:

* **Bitcoin Testnet Faucet**: [TestnetBTC](https://testnetbc.info/)
* **Ethereum Testnet Faucet** : [Alchemy Faucet](https://www.alchemy.com/faucets/ethereum-sepolia)

**Testing the Payment Process**

1. **Obtain Testnet Funds**: Get testnet funds from the faucets listed above or any other faucets.
2. **Visit Shopdemo**: Go to [shopdemo.paymento.io](https://shopdemo.paymento.io).
3. **Select a Product**: Choose a product from the demo store.
4. **Redirect to Payment Gateway**: You will be redirected to the Paymento payment gateway page.

**For All Transactions:**

1. **Enter Email**: Enter your email address to receive payment notifications.
2. **Select Cryptocurrency**: Choose the cryptocurrency you want to use for the payment (Bitcoin Testnet or Ethereum Testnet).

**For UTXO-Based Blockchains (e.g., Bitcoin):**

1. **QR Code/Address**: You will receive a QR code or address and the amount to be paid.
2. **Make Payment**: Use your wallet to make the payment.
3. **Transaction Confirmation**: Once the transaction is confirmed, you will be redirected back to the demo shop.

**For EVM-Based Blockchains (e.g., Ethereum):**

1. **Connect Wallet**: Connect your wallet to the Paymento gateway.
2. **Sign Transaction**: Sign the transaction in your wallet.
3. **Transaction Confirmation**: Once the transaction is confirmed, you will be redirected back to the demo shop.

By following these steps, you can ensure that the Paymento gateway is functioning correctly and provides a seamless payment experience for your customers.


# Testing and Simulation

Step-by-Step Guide for Testnet Usage

Testing your Paymento integration on test networks ensures your system operates seamlessly before going live. This guide covers how to set up wallets, acquire testnet assets, and simulate transactions for Bitcoin(Testnet), Ethereum (Sepolia), and Tron (Shasta).

1. [Create a Testnet Wallet](/accept-crypto-payments/testing-and-simulation/creating-a-testnet-wallet)
2. [Accquire Testnet Assets](/accept-crypto-payments/testing-and-simulation/accquire-testnet-assets)
3. [Making Transaction](/accept-crypto-payments/testing-and-simulation/creating-transactions)


# Creating a Testnet Wallet

### **List of Bitcoin Testnet Wallets**

1. **Bitcoin Core in Prune Mode with `-testnet` Flag**:
   * Download and install Bitcoin Core from the [official website](https://bitcoin.org/en/download).
   * Go to the installation folder and open command prompt
   * Run the following command to start Bitcoin Core in testnet mode:

```
.\bitcoin-qt.exe -testnet -prune=550
```

* This setup minimizes disk usage while allowing you to connect to the Testnet blockchain. <br>

1. **OKX Wallet**:
   * [Download](https://www.okx.com/download) the OKX Wallet extension or mobile app.
   * Go to **Network Settings** and select the Bitcoin Testnet.
   * Generate testnet addresses for your testing needs.<br>
2. **Electrum**:
   * Download Electrum from the [official site](https://electrum.org/).
   * Go to installation folder and open command prompt.
   * Run the following command to start Bitcoin core in testnet mode:

```
.\electrum-4.0.6.exe --testnet
```

* Create te a wallet and use it to send/receive test Bitcoin.

### **Ethereum Testnet (Sepolia)**

1. **MetaMask on Sepolia**:
   * Install the MetaMask browser extension or mobile app.
   * Navigate to **Settings > Networks**.
   * Add the Sepolia Testnet manually if does not exist with the following details:
     * **Network Name**: Sepolia Testnet
     * **RPC URL**: `https://rpc.sepolia.org`
     * **Chain ID**: 11155111
     * **Currency Symbol**: ETH
   * Save the network and switch to it in the MetaMask dropdown.

### **Tron Testnet (Shasta)**

1. **TronLink Wallet**:
   * Install the TronLink Wallet extension or app.
   * Open the wallet, click the settings icon, and select **Shasta Testnet**.
   * Generate a wallet address for your testing activities.


# Accquire Testnet Assets

To test your integration, you’ll need testnet assets. Faucets provide free tokens for this purpose.

1. **Bitcoin Testnet**:
   * Use a reliable Bitcoin Testnet3 faucet, such as <https://coinfaucet.eu/en/btc-testnet/>
   * Input your testnet wallet address to receive test BTC.
2. **Ethereum Sepolia Testnet**:
   * Visit a Sepolia ETH faucet like [Google Faucet ](https://cloud.google.com/application/web3/faucet/ethereum/sepolia)or [Sepolia Faucet](https://sepoliafaucet.com/) or [Alchemy Faucet](https://www.alchemy.com/faucets/ethereum-sepolia)
   * Paste your Sepolia wallet address from MetaMask to get free test ETH.
3. **Tron Shasta Testnet**:
   * Access the official [Shasta Faucet.](https://shasta.tronex.io)
   * Log in with your TronLink wallet and request testnet TRX.


# Creating Transactions

After receiving testnet assets, You will be able to create a transaction and transfer testnet asset to your integrated store:

* Generate a payment request using the Paymento API, your integrated software or Payment Link.
* Use your testnet wallet to send a test transaction to the generated address.
* Monitor the transaction status on blockchain explorers.

**Confirming Transactions**

* Verify transaction confirmations on the blockchain explorer.
* Ensure that the test payment reflects in the Paymento dashboard and API callback response.

By following these steps, you can thoroughly test and validate your Paymento integration, ensuring a reliable, secure, and user-friendly experience before going live on the mainnet


# API Overview

Integrate thousands of cryptocurrencies in 5 easy steps

To integrate with Paymento, you'll first need to create a merchant account at [https://app.paymento.io](https://app.paymento.io/) and obtain an API Key. This key is essential for all API calls, enabling your application to communicate with Paymento's services.

The figure below shows how stores connect with Paymento through APIs.

<figure><img src="/files/6754jSS6xiS6SEJS0cKC" alt=""><figcaption></figcaption></figure>

1\) To initiate a payment, your online store must send a payment request to the Paymento API.&#x20;

2\) A successful request will create an order for the transaction and return a token in the response. This token is used to redirect the user to the payment page.

3\) With the token received from creating the payment request, redirect the user to the Paymento payment page where they can choose from the allowed cryptocurrencies to complete the payment.

* **Payment URL:** `https://app.paymento.io/gateway?token=TOKEN_HERE`

Replace `TOKEN_HERE` with the token you received in the previous step.<br>

4\) After the payment is made, Paymento sends the payment status and details to the callback URL you've specified. Also, the end user will be redirected back to your site.

5\) It's crucial to verify the payment to finalize the order on your end. Upon receiving the payment notification, make an API call to confirm the payment status with the token you received.

<br>


# Payment Request

How to create a payment request and get a token for redirecting customer to paymento gateway.

## Request a new payment

<mark style="color:green;">`POST`</mark> <https://api.paymento.io/v1/payment/request>

**Headers**

| Name         | Value                 |
| ------------ | --------------------- |
| Api-key      | Your Merchant API Key |
| Content Type | `application/json`    |
| Accept       | `text/plain`          |

**Body**

<table><thead><tr><th width="185">Name</th><th width="132">Type</th><th>Nullable</th><th>Description</th></tr></thead><tbody><tr><td><code>fiatAmount</code></td><td>string</td><td>true</td><td></td></tr><tr><td><code>fiatCurrency</code></td><td>string</td><td>true</td><td>(e.g.) USD or EUR</td></tr><tr><td><code>ReturnUrl</code></td><td>string</td><td>true</td><td></td></tr><tr><td><code>orderId</code></td><td>string</td><td>true</td><td>Your online store order ID</td></tr><tr><td><code>Speed</code></td><td>int</td><td>false</td><td><p> 0 = High</p><p>(Accept crypto transactions on mempool and complete order.</p><p>)</p><p>1 = Low</p><p>(Accept crypto transactions when specific number of blocks came (known as confirmed like 3 as 3) and complete order. </p><p>)</p></td></tr><tr><td><code>cryptoAmount</code></td><td>Json Object</td><td>true</td><td><p><code>[ { "coinName": "Bitcoin", "amount": "0.01854793" }, { "coinName": "Ethereum", "amount":</code> </p><p><code>"1.54848465" } ]</code></p></td></tr><tr><td><code>additionalData</code></td><td>Json Object</td><td>true</td><td><code>[ { "key": "invoice-number", "value": "A-578" }, { "key": "param2", "value": "value2" } ]</code></td></tr><tr><td><code>EmailAddress</code></td><td>string</td><td>true</td><td>Email address of the user</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "message": "",
  "body": " 3256e147c6fe4d36a9341a5112ed2214"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

Now you can use the received token in body section and redirect your customer to&#x20;

* **Payment URL:** `https://app.paymento.io/gateway?token=TOKEN_HERE`

Replace `TOKEN_HERE` with the token you received.


# Payment Callback

After a payment request is made and the user navigates to the Paymento gateway to complete the payment, the user is redirected back to the merchant's Return URL (Given in Payment Request) with a specific status. This allows the merchant to update the order status in their interface. However, it is crucial for merchants to use the [Set Payment Settings API](/api-documention/additional-apis/manage-payment-settings) to define the IPN URL for receiving payment statuses and to verify the payment using the Verify Payment API.

### Redirect and Callback Data

Paymento returns the following variables in the Callback (to Return URL and IPN URL):

#### HTTP Headers

<table><thead><tr><th>Name</th><th>Value</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>X-HMAC-SHA256-SIGNATURE</strong></td><td>“Signature hash…”</td><td></td></tr></tbody></table>

#### Body Patameters&#x20;

| Name               | Description                                              |
| ------------------ | -------------------------------------------------------- |
| **Token**          | Token of the payment order.                              |
| **PaymentId**      | The order ID in Paymento (Payment ID, as a long number). |
| **OrderId**        | The order ID from the online store (as a string).        |
| **OrderStatus**    | The order status (explained in next paragraph)           |
| **AdditionalData** | The payment request's additional data.                   |

### Order Statuses

When the user completes or cancels the payment, Paymento redirects them to the specified callback URL with one of the following statuses:

* **Initialize (0)**: Payment request accepted by the API.
* **Pending (1)**: User has chosen a coin to pay.
* **PartialPaid (2)**: User paid less than the order amount.
* **WaitingToConfirm (3)**: User's transaction received in the blockchain network (in mempool or block).
* **Timeout (4)**: Payment deadline expired.
* **UserCanceled (5)**: User clicked on the cancel button at the gateway.
* **Paid (7)**: User's transaction confirmed in the blockchain network.
* **Approve (8)**: Payment verified by the store.
* **Reject (9)**: Address assigned for the user's payment is no longer monitored, or payment not verified by the store.

### HMAC Signature Verification

To ensure the integrity and authenticity of callbacks from Paymento, we use HMAC-SHA256 signatures. For each callback, Paymento includes a signature in the `X-Hmac-Sha256-Signature` header. To verify this signature:

1. Obtain the raw payload of the callback (the entire body of the POST request).
2. Use your secret key (Provided in your Paymento dashboard).
3. Calculate the HMAC-SHA256 hash of the payload using your secret key.
4. Convert the resulting hash to uppercase hexadecimal format.
5. Compare this calculated signature with the one received in the `X-Hmac-Sha256-Signature` header.

```
// The signatures should match exactly. Here's a pseudo-code example:

receivedSignature = headers['X-HMAC-SHA256-SIGNATURE']
payload = request.rawBody
secretKey = "Your-Secret-Key-From-Paymento-Dashboard"
calculatedSignature = uppercase(hmac_sha256(payload, secretKey))
isValid = (calculatedSignature == receivedSignature)

```

### Important notes

**Do Not Rely Solely on Redirect to Return URL**: Merchants must use the IPN URL set in the "Set Payment Settings API" to receive real-time payment status updates.

**Always Verify Payments**: Even after receiving a "Paid" status, always verify the payment [using the Verify Payment API](/api-documention/payment-verify) to ensure the transaction is confirmed on the blockchain and status update came from Paymento.

#### Call Back Example

```
curl 
-X POST https://yoursite.com/shop/payment-result 
-H 'Accept: application/json' 
-H 'HMAC_SHA256_SIGNATURE: 42FBF2A14FEF5E9D89B92731F4F12B9153438C8F06F60D62AA8A8D0ADD551E7B' 
-H 'Content-Type: application/json' 
-d '{"Token":"d1179e54e58d4e51a285a5c659a2b7ef","PaymentId":20016,"OrderId":"etp-3900","OrderStatus":3,"AdditionalData":[]}'  
```


# Payment Verify

After you receive a payment notification (callback or redirect), call **Payment Verify** to confirm status for your store and, when you need it, to read **on-chain settlement data** for that payment in one response.

You do **not** need a separate blockchain API for reconciliation: transaction hashes, explorer links, confirmations, deposit address, asset/network metadata, and credited amounts are returned in the **`settlement`** object (for valid, authorized requests).

### Verify a Payment

<mark style="color:green;">`POST`</mark> <https://api.paymento.io/v1/payment/verify>

#### Headers

| Name         | Value                 |
| ------------ | --------------------- |
| Api-key      | Your Merchant API Key |
| Content-Type | `application/json`    |
| Accept       | `application/json`    |

The API key must belong to the **same merchant** that owns the payment. If the token is unknown or belongs to another store, the response is **`success: false`** with **`message: "Invalid Token"`** (same as an invalid token).

#### Body

| Name    | Type   | Nullable | Description                             |
| ------- | ------ | -------- | --------------------------------------- |
| `token` | string | false    | Payment token from the payment request. |

#### Response envelope

| Field     | Type    | Description                                                                            |
| --------- | ------- | -------------------------------------------------------------------------------------- |
| `success` | boolean | **`true` only** when the order is in **`Approve`** status after this call (see below). |
| `message` | string  | Error or auxiliary text (e.g. `"Invalid Token"`).                                      |
| `body`    | object  | Payment details and optional **`settlement`**.                                         |

#### `body` fields

| Field            | Type   | Description                                                                                                                |
| ---------------- | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| `token`          | string | Payment token.                                                                                                             |
| `orderId`        | string | Your reference from `additionalData` with key **`OrderId`** (removed from `additionalData` in the response).               |
| `orderStatus`    | string | Current payment status (see Order status).                                                                                 |
| `additionalData` | array  | Remaining `{ key, value }` pairs from the order.                                                                           |
| `settlement`     | object | On-chain / settlement context. Present for every **authorized** verify; omitted when the token is invalid or unauthorized. |

### On-chain data (`settlement`)

Use **`settlement`** when you need blockchain context without calling your own node or explorer APIs.

| Field                  | Type   | Description                                                                                                      |
| ---------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| `expectedCryptoAmount` | number | Amount the customer was asked to pay (crypto).                                                                   |
| `requestedFiatAmount`  | number | Fiat amount quoted for the order, if set.                                                                        |
| `receivedCryptoAmount` | number | Sum of normalized amounts already credited (`Mempool`, `InBlock`, `Completed` transactions).                     |
| `pendingTxHash`        | string | Expected transaction hash before any tx is persisted (wallet-signed flow). Not duplicated inside `transactions`. |
| `toAddress`            | string | Deposit address for this payment.                                                                                |
| `asset`                | string | Asset symbol (e.g. `USDT`, `ETH`).                                                                               |
| `network`              | string | Network name when configured.                                                                                    |
| `standard`             | string | Token standard: `Native`, `ERC20`, `TRC20`, `SPL`, etc.                                                          |
| `contractAddress`      | string | Token contract address when applicable.                                                                          |
| `transactions`         | array  | Persisted on-chain transactions for this order (may be empty).                                                   |

#### `settlement.transactions[]`

| Field                   | Type   | Description                                                                 |
| ----------------------- | ------ | --------------------------------------------------------------------------- |
| `txHash`                | string | On-chain transaction id.                                                    |
| `explorerUrl`           | string | Block explorer link when configured.                                        |
| `amount`                | number | Normalized amount credited for this transaction.                            |
| `confirmations`         | number | Confirmations vs chain tip when height data is available; otherwise `null`. |
| `requiredConfirmations` | number | Confirmations required for this asset.                                      |
| `status`                | string | `Pending`, `Mempool`, `InBlock`, `Completed`, or `Revert`.                  |
| `blockHeight`           | number | Block height when known.                                                    |
| `detectedAt`            | string | When Paymento first detected the transaction (ISO 8601).                    |
| `confirmedAt`           | string | When the transaction reached `Completed`, if known.                         |
| `fromAddresses`         | string | Sender address(es) as stored.                                               |
| `toAddress`             | string | Recipient / deposit address for this tx.                                    |

Fields may be `null` when the underlying data is not available. Paymento does not invent chain data.

### `success` vs `orderStatus`

| Situation                                                               | `success` | What to do                                                                                                                              |
| ----------------------------------------------------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Order is **`Approve`** (verified by your store)                         | `true`    | Fulfill the order.                                                                                                                      |
| Order is **`Paid`** but not yet verified                                | `false`   | Check `orderStatus`; call verify again after you are ready to mark verified (first successful verify moves **`Paid`** → **`Approve`**). |
| Order is **`WaitingToConfirm`**, **`PartialPaid`**, **`Pending`**, etc. | `false`   | Valid token; wait or show status using `orderStatus` and `settlement`.                                                                  |
| Invalid or unauthorized token                                           | `false`   | `message` is **`Invalid Token`**; `settlement` is omitted.                                                                              |

**Important:** `success: false` does **not** always mean a bad token. Always read **`body.orderStatus`** and **`settlement`**.

### Order status

Common `orderStatus` values:

| Value              | Meaning                                                 |
| ------------------ | ------------------------------------------------------- |
| `Initialize`       | Payment request created.                                |
| `Pending`          | Customer selected a coin.                               |
| `PartialPaid`      | Paid less than the order amount.                        |
| `WaitingToConfirm` | Transaction seen on-chain; awaiting confirmations.      |
| `Paid`             | Required confirmations reached.                         |
| `Approve`          | Verified by merchant (verify returned `success: true`). |
| `Timeout`          | Payment window expired.                                 |
| `UserCanceled`     | Customer canceled at checkout.                          |
| `Reject`           | Payment rejected / no longer monitored.                 |
| `Revert`           | Chain reorg or reversal (when applicable).              |

### Examples

{% tabs %}
{% tab title="200 — Approved" %}

```json
{
  "success": true,
  "message": "",
  "body": {
    "token": "3256e147c6fe4d36a9341a5112ed2214",
    "orderId": "5855",
    "orderStatus": "Approve",
    "additionalData": [
      { "key": "invoice-number", "value": "A-578" }
    ],
    "settlement": {
      "expectedCryptoAmount": 0.015,
      "requestedFiatAmount": 42.50,
      "receivedCryptoAmount": 0.015,
      "pendingTxHash": null,
      "toAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
      "asset": "ETH",
      "network": "Ethereum",
      "standard": "Native",
      "contractAddress": null,
      "transactions": [
        {
          "txHash": "0xabc123...",
          "explorerUrl": "https://etherscan.io/tx/0xabc123...",
          "amount": 0.015,
          "confirmations": 12,
          "requiredConfirmations": 3,
          "status": "Completed",
          "blockHeight": 19234567,
          "detectedAt": "2026-05-19T10:22:11Z",
          "confirmedAt": "2026-05-19T10:28:44Z",
          "fromAddresses": "[\"0xsender...\"]",
          "toAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
        }
      ]
    }
  }
}
```

{% endtab %}

{% tab title="200 — Waiting to confirm" %}

```json
{
  "success": false,
  "message": "",
  "body": {
    "token": "3256e147c6fe4d36a9341a5112ed2214",
    "orderId": "5855",
    "orderStatus": "WaitingToConfirm",
    "additionalData": [],
    "settlement": {
      "expectedCryptoAmount": 100.0,
      "requestedFiatAmount": 100.0,
      "receivedCryptoAmount": 100.0,
      "pendingTxHash": null,
      "toAddress": "TXyz...",
      "asset": "USDT",
      "network": "Tron",
      "standard": "TRC20",
      "contractAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
      "transactions": [
        {
          "txHash": "a1b2c3...",
          "explorerUrl": "https://tronscan.org/#/transaction/a1b2c3...",
          "amount": 100.0,
          "confirmations": 1,
          "requiredConfirmations": 19,
          "status": "InBlock",
          "blockHeight": 61234567,
          "detectedAt": "2026-05-19T11:05:00Z",
          "confirmedAt": null,
          "fromAddresses": null,
          "toAddress": "TXyz..."
        }
      ]
    }
  }
}
```

{% endtab %}

{% tab title="200 — Invalid token" %}

```json
{
  "success": false,
  "message": "Invalid Token",
  "body": {
    "token": "",
    "orderId": "",
    "orderStatus": "Initialize",
    "additionalData": []
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

### Integration notes

1. **Callbacks + verify:** Use webhooks or redirect for real-time events; call verify when you need authoritative status and on-chain details for fulfillment.
2. **Idempotent verify:** Calling verify again on an already **`Approve`** order still returns `success: true`.
3. **Backward compatible:** Older clients can ignore `settlement` and `orderStatus`; new clients should use them for reconciliation and UX.
4. **Amounts:** Use `expectedCryptoAmount`, `requestedFiatAmount`, and `receivedCryptoAmount` at order level; use each transaction’s `amount` for per-tx credited value.

Upon receiving the payment notification, make an API call to confirm the payment status with the token you received.


# Additional APIs

Let's expands on the main Paymento Gateway API Documentation to cover additional APIs that you may find useful for managing your online store's payment processing capabilities. These APIs provide functionality for retrieving a list of accepted cryptocurrencies and configuring payment settings, including callback URLs and HTTP methods for callbacks.


# Manage Payment Settings

This set of APIs allows you to get or set your payment settings, including the callback URL and the HTTP method to be used when Paymento sends payment status updates to your server.

> This IPN (callback) URL only needs to be set once, It is a persistent store-level configuration. You do not need to set it every time you request a payment token. Once configured, it remains active for all subsequent payments created under that store.

### Set Payment Settings API

<mark style="color:green;">`POST`</mark> <https://api.paymento.io/v1/payment/settings> \<Description of the endpoint>

**Headers**

<table><thead><tr><th width="301">Name</th><th>Value</th></tr></thead><tbody><tr><td>Api-Key</td><td>Your Merchant API Key</td></tr><tr><td>Content Type</td><td><code>application/json</code></td></tr><tr><td>Accept</td><td><code>text/plain</code></td></tr></tbody></table>

**Body**

| Name                                | Type   | Nullable | Description                           |
| ----------------------------------- | ------ | -------- | ------------------------------------- |
| [`IPN_Url`](#user-content-fn-1)[^1] | string | false    |                                       |
| IPN\_`Method`                       | int    | false    | <p>HttpPost = 1</p><p>HttpPut = 2</p> |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "message": "",
  "body": {
    "IPN_Url ": "https://yoursite.com/api/paymento/payment-status",
    "ipN_Method": 1
  }
}

```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

## Get Payment Settings API

<mark style="color:green;">`GET`</mark> <https://api.paymento.io/v1/payment/settings&#x20>;

**Headers**

| Name         | Value                 |
| ------------ | --------------------- |
| Api-Key      | Your Merchant API Key |
| Content Type | `application/json`    |
| Accept       | `text/plain`          |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "message": "",
  "body": {
    "IPN_URL": "https://yoursite.com/api/paymento/payment-status",
    "IPN_Method": 1
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

[^1]:


# Get List of Accepted Coins

This API allows you to retrieve a list of cryptocurrencies that your merchant account is currently set up to accept. This can be particularly useful for dynamically updating your payment options based on your current Paymento settings.

## Create a new user

<mark style="color:green;">`GET`</mark> <https://api.paymento.io/v1/payment/coins&#x20>;

**Headers**

| Name         | Value                 |
| ------------ | --------------------- |
| Api-Key      | Your Merchant API Key |
| Content Type | `application/json`    |
| Accept       | `text/plain`          |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "message": "",
  "body": [{
    "name": "bitcoin",
    "shortcut":  "btc"
  },
  {
    "name": "ethereum",
    "shortcut":  "eth"
  }]
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}


# Payment Link Overview

Payment Links let you accept crypto payments instantly without the need for a website, API integration, or coding.

You can generate a unique link for any product, service, subscription, or donation and share it via social media, email, or chat apps like Telegram and Discord.

#### ✅ Key Features

* **No Website Needed**\
  Create a link and start accepting payments instantly.
* **Fixed or Custom Amount**\
  Set a price or let users choose how much to pay (tips/donations).
* **One-Time or Recurring**\
  Accept one-off payments or set flexible billing cycles (weekly, monthly, etc.).
* **Multiple Assets, Multiple Networks**\
  Accept any supported crypto on chains like Ethereum, Solana, Bitcoin, Tron, and more.
* **Live Previews**\
  See how the link will look before you launch.

#### ⚙️ Advanced Capabilities

* **Webhooks & Integrations**\
  Trigger actions like granting access to Telegram groups or Discord roles.
* **Email or Telegram Notifications**\
  Send reminders, receipts, and alerts to users via email or directly on Telegram.
* **Payment Link Analytics**\
  Track views, payments, and conversion rates in your dashboard.

#### 🧑‍💻 Who Can Use It?

* Content Creators
* Freelancers
* Communities
* SaaS Platforms
* Membership-based businesses
* Anyone who wants crypto payments without technical complexity

#### 🔐 How It Works

1. **Create a Link** - define pricing, duration, assets, etc.
2. **Share the Link** - copy the link or QR code and distribute it anywhere.
3. **Get Paid** - receive payments directly into your wallet.
4. *(Optional)* Automate access, send alerts, or connect to your own systems.

🚀 Start from the "Create & Configure Payment Links" guide next.


# Create Payment Links

sell products, service, collect donations, offer subscriptions, or gate access to Telegram groups—all through a simple link.

#### Step 1: Invoice Details

Fill out the basics:

* **Payment Name**: What the customer sees (e.g., "VIP Telegram Access").
* **Description (Optional)**: Add extra details.
* **Advanced Options**:
  * Upload an image
  * Collect email address
  * Set an expiration time
  * Limit number of payments

➡️ Switch between "Payment" or "After Payment" setup at the top.

#### Step 2: Payment Details

Define how much and how often:

* **Pricing Option**: Fixed or Custom
* **Amount**: Choose currency
* **Payment Type**: One-time or Recurring
  * If Recurring:
    * Billing Interval (weekly/monthly/etc.)
    * Reminder + Grace Period
* **Accepted Cryptocurrencies**: Select from supported assets

#### Step 3: Advanced Options

You can connect your link to external systems:

* **Telegram Integration**: Gate access to Telegram groups
* **Custom Webhooks**: Trigger external APIs on payment
* **Custom Fields**: Collect extra info (e.g., username, billing address)

#### Step 4: Review & Generate

* Choose **Call to Action**: Pay, Book, or Donate
* Review your link preview
* Customize the post-payment experience (optional):
  * Show confirmation page
  * Replace with a custom message
* Click **Generate Payment Link**

🎉 Done! You’ll receive a sharable payment link and preview.


# Telegram Group Access

🚀 Gate Telegram Access with Paymento App Bot

Easily sell access to your Telegram groups or channels using crypto payment links. Whether you're offering one-time access or recurring subscriptions, Paymento automates everything from joining users to groups, to removing expired members, and even sending payment reminders via Telegram.

#### ✅ What You Can Do:

* Sell access to private Telegram groups using Payment Links
* Support both **one-time** and **recurring** payments
* Automatically invite or remove users based on payment status
* Link **multiple payment links** to a single group
* Choose to notify users via **Telegram**, or both **Telegram + Email**

### 🔧 Pre-Requisites

#### 1. Start Telegram Bot

Just send a start command by the administrator telegram account to [@PaymentoAppBot](https://telegram.me/PaymentoAppBot)

#### 2. Add Paymento Telegram Bot to the Group

Simply go to group members and add @PaymentoAppBot to your group.

<figure><img src="/files/K7KF8sP69uyBxfere1cI" alt=""><figcaption></figcaption></figure>

#### 3. Convert Your Group(s) into a Supergroup

Telegram group access control works best with **supergroups**.

To convert your group:

* Open manage group settings
* Enable **“Chat History for New Members”**
* Telegram will automatically convert it to a supergroup

<figure><img src="/files/1GqMmYuGc1BBnAy6Pfr6" alt=""><figcaption></figcaption></figure>

#### 4. Invite the Bot & Make It Admin

Invite **@PaymentoAppBot** to your Telegram group and promote it to admin:

* Open group settings
* Tap **“Add Members”** → invite `@PaymentoAppBot`
* Right Click to **“PaymentoAppBot”** → **Promote as Admin**
* Select the bot and grant **permission to add & remove members**

<figure><img src="/files/DVXajABngBR1k8Oa0N4e" alt=""><figcaption></figcaption></figure>

#### 3. Retrieve Group Chat ID

Inside each group, type:

```
/chat_id
```

PaymentoAppBot will reply with the **group’s chat ID** (e.g., `-1001234567890`).\
Make note of:

* Group Name
* Group ID

You’ll need both for the setup.

> ℹ️ Group IDs must start with `-100` to confirm it’s a supergroup.

### ⚙️ Setup in Paymento Dashboard

#### Step 1: Configure Group Access in Payment Link

* Go to the **Payment Link Settings**
* Navigate to the **Advanced Integration** step
* Add your **Group Names** and **Chat IDs**&#x20;

<figure><img src="/files/7FOTFqwN5CHUgxGgWf43" alt=""><figcaption></figcaption></figure>

#### Step 2: Choose Notification Method

Decide how your users should receive updates:

* 🔘 Telegram only (recommended)
* 🔘 Telegram + Email (if you collect email)

> Paymento will handle payment reminders and renewals through Telegram.

#### Step 3: Share Telegram Bot Link with Your Customers

Once Telegram integration is active, Paymento generates a bot link like:

```
https://t.me/PaymentoAppBot?start=groupid-<chat_id>
```

When users click the link:

1. They start the bot
2. The bot detects the group and shows available payment options
3. After successful payment, they're invited to the group automatically
4. If using a subscription, they’ll get reminders via Telegram and be removed automatically if they don’t renew

<figure><img src="/files/fLaQM9F0HIxpLlDAdEbo" alt=""><figcaption></figcaption></figure>

### ✅ Done!

Your Telegram group is now fully gated using crypto payments! no manual approvals, no spreadsheets, no headaches.


# Discord Role Automation (coming soon)

Discord Integration is coming Soon

We’re working on a powerful integration to let you gate access to your **Discord servers** using Paymento payment links.\
\
Users will be able to **pay with crypto** and get automatic **role assignments**, renewal reminders, and removal if payments lapse, all handled by our Discord bot.

Stay tuned — full documentation and setup guide launching soon!


# Webhooks (for Payment Links)

Paymento supports webhooks for Payment Links, Developers can automate actions like granting access, updating external systems, or triggering custom flows when a payment event occurs.

{% hint style="info" %}
🔐 These webhooks are **specific to Payment Links only.** \
For gateway-level or API-triggered webhooks, please refer to the [API Documentation.](/api-documention/api-overview)
{% endhint %}

#### ✅ What Are Webhooks?

Webhooks are **HTTP callbacks** that Paymento sends to your backend when a payment-related event occurs. Paymento webhooks allow you to receive real-time notifications about events that happen in your payment links. When an event occurs, Paymento sends an HTTP POST request to the webhook URL you configured for your payment link.


# Quick Integration Guide

For developers to automatePayment Link  actions

#### ✅ Step 1: Add Webhook URL to Your Payment Link

When creating a Payment Link:

* Go to **Step 3: Advanced >> Select Webhook**
* Paste your backend URL (e.g., `https://yourdomain.com/webhook`)
* Choose which events you want to receive

#### ✅ Step 2: Verify Signature of Incoming Webhook Request

When a payment occurred, Paymento sends a `POST` request to your endpoint with:

* `Content-Type: application/json`
* `x-signature: <HMAC signature>`

To secure your endpoint:

* Get your `webhook secretkey` from Paymento settings
* Generate HMAC-SHA256 hash of the raw body
* Compare it to the `x-signature` header

**Node.js Example:**

```javascript
const crypto = require('crypto');

const signature = req.headers['x-paymento-signature'];
const secretKey = 'YOUR_MERCHANT_SECRET_KEY'; // From Paymento dashboard

const computed = crypto
  .createHmac('sha256', secretKey)
  .update(req.rawBody)
  .digest('hex');

if (signature !== computed) {
  return res.status(401).send('Invalid signature');
}
```

#### ✅ Step 3: Handle Events

#### Use Events to Automate Logic

Example use cases:

* `payment_link.paid`: Subscribe user to your service
* `subscription.renewed`: Extend subscription
* `subscription.grace_expired`: Revoke access
* `payment_link.failed`: Alert user or retry flow

**Node.js Example:**

```javascript
const event = req.body;

switch (event.event.type) {
  case 'payment_link.paid':
    // Customer paid successfully
    activateSubscription(event.customer.email);
    break;
    
  case 'payment_link.deferred':
    // Payment was not made on time
    suspendSubscription(event.customer.email);
    break;
}

res.status(200).json({ received: true });
```

### Checklist ✅

Before going live, Make sure:

* [ ] &#x20;Endpoint uses HTTPS
* [ ] &#x20;Signature verification implemented
* [ ] &#x20;Returns 200 OK within 5 seconds
* [ ] &#x20;Handles idempotency (checks `event.id`)
* [ ] &#x20;Logs all webhook requests
* [ ] &#x20;Secret key stored securely (environment variable)
* [ ] &#x20;Error handling implemented
* [ ] &#x20;Tested with Paymento test webhook feature<br>

#### Headers Reference

```http
X-Paymento-Signature: <hmac-sha256-hex>
X-Paymento-Timestamp: <unix-timestamp>
X-Paymento-Event-Id: evt_<unique-id>
X-Paymento-Event-Type: payment_link.paid
```

### Body Structure

```json
{
  "event": {
    "id": "evt_...",
    "type": "payment_link.paid | payment_link.deferred",
    "createdAt": "ISO-8601",
    "apiVersion": "v1"
  },
  "paymentLink": {
    "id": "pl_...",
    "title": "string",
    "description": "string",
    "status": "paid | deferred",
    "type": "one_time | scheduled",
    "createdAt": "ISO-8601",
    "paidAt": "ISO-8601 | null",
    "url": "string"
  },
  "customer": {
    "email": "string",
    "name": "string",
    "metadata": {
      "order_id": "string?",
      "payment_id": "string?"
    }
  },
  "merchant": {
    "id": "string",
    "name": "string"
  }
}
```

#### 🔍 Available Events

| Event                        | Description                       |
| ---------------------------- | --------------------------------- |
| `payment_link.paid`          | Payment completed                 |
| `payment_link.failed`        | Payment failed                    |
| `payment_link.expired`       | Link expired without payment      |
| `subscription.renewed`       | Subscription renewed by user      |
| `subscription.reminder_sent` | Reminder sent (email or Telegram) |
| `subscription.grace_expired` | User did not pay, grace ended     |

### Signature Verification (Code Samples)

#### Node.js

```javascript
const crypto = require('crypto');
const signature = crypto
  .createHmac('sha256', secretKey)
  .update(rawBody)
  .digest('hex');
```

#### Python

```python
import hmac
import hashlib
signature = hmac.new(
    secret_key.encode('utf-8'),
    raw_body.encode('utf-8'),
    hashlib.sha256
).hexdigest()
```

#### PHP

```php
$signature = hash_hmac('sha256', $rawBody, $secretKey);
```

#### C\#

```csharp
using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(secretKey));
var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(rawBody));
var signature = BitConverter.ToString(hash).Replace("-", "").ToLower();
```

#### Ruby

```ruby
require 'openssl'
signature = OpenSSL::HMAC.hexdigest('sha256', secret_key, raw_body)
```

#### Go

```go
import "crypto/hmac"
import "crypto/sha256"
import "encoding/hex"

mac := hmac.New(sha256.New, []byte(secretKey))
mac.Write([]byte(rawBody))
signature := hex.EncodeToString(mac.Sum(nil))
```

#### Java

```java
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.codec.binary.Hex;

Mac mac = Mac.getInstance("HmacSHA256");
SecretKeySpec secretKeySpec = new SecretKeySpec(secretKey.getBytes(), "HmacSHA256");
mac.init(secretKeySpec);
byte[] hash = mac.doFinal(rawBody.getBytes());
String signature = Hex.encodeHexString(hash);
```


# Integration Reference

#### HTTP Headers

Every webhook request includes the following headers for authentication and tracking:

{% code expandable="true" %}

```http
POST /your-webhook-endpoint HTTP/1.1
Host: your-server.com
Content-Type: application/json
X-Paymento-Signature: 9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b
X-Paymento-Timestamp: 1699564800
X-Paymento-Event-Id: evt_a1b2c3d4e5f6g7h8i9j0
X-Paymento-Event-Type: payment_link.paid
```

{% endcode %}

#### **Header Descriptions**

| Header Name             | Type      | Description                                            |
| ----------------------- | --------- | ------------------------------------------------------ |
| `X-Paymento-Signature`  | `string`  | HMAC-SHA256 signature of the request body (hex string) |
| `X-Paymento-Timestamp`  | `integer` | Unix timestamp when the webhook was sent               |
| `X-Paymento-Event-Id`   | `string`  | Unique identifier for this webhook event               |
| `X-Paymento-Event-Type` | `string`  | Type of event (see Event Types section)                |

#### Request Body

The webhook request body is a JSON object with the following structure:

{% code expandable="true" %}

```json
{
  "event": {
    "id": "evt_a1b2c3d4e5f6g7h8i9j0",
    "type": "payment_link.paid",
    "createdAt": "2024-11-09T14:30:00Z",
    "apiVersion": "v1"
  },
  "paymentLink": {
    "id": "pl_9z8y7x6w5v4u3t2s1r0q",
    "title": "Monthly Subscription",
    "description": "Premium Plan - November 2024",
    "status": "paid",
    "type": "scheduled",
    "createdAt": "2024-10-01T10:00:00Z",
    "paidAt": "2024-11-09T14:30:00Z",
    "url": "https://app.paymento.com/pl_9z8y7x6w5v4u3t2s1r0q"
  },
  "customer": {
    "email": "customer@example.com",
    "name": "John Doe",
    "metadata": {
      "order_id": "12345",
      "payment_id": "pay_abcdefghijk"
    }
  },
  "merchant": {
    "id": "mrc_xyz123",
    "name": "Your Store Name"
  }
}
```

{% endcode %}

#### **Object Descriptions**

**`event` Object**

| Field        | Type     | Description                                        |
| ------------ | -------- | -------------------------------------------------- |
| `id`         | `string` | Unique identifier for this event (format: `evt_*`) |
| `type`       | `string` | Event type (see Event Types)                       |
| `createdAt`  | `string` | ISO 8601 timestamp when the event was created      |
| `apiVersion` | `string` | Paymento API version used                          |

**`paymentLink` Object**

| Field                 | Type      | Description                                                                      |
| --------------------- | --------- | -------------------------------------------------------------------------------- |
| `id`                  | `string`  | Unique payment link identifier                                                   |
| `title`               | `string`  | Payment link title                                                               |
| `description`         | `string`  | Payment link description                                                         |
| `status`              | `string`  | Current status: `"paid"`, `"deferred"`, or `"scheduled"`                         |
| `type`                | `string`  | Payment type: `"one_time"` or `"scheduled"`                                      |
| `createdAt`           | `string`  | ISO 8601 timestamp when payment link was created                                 |
| `paidAt`              | `string?` | ISO 8601 timestamp when payment was completed (null if not paid)                 |
| `url`                 | `string`  | Public URL of the payment link                                                   |
| `integrationMetadata` | `object`  | Integration metadata for external platforms (Telegram, Discord, etc.) - optional |

**`customer` Object**

| Field                        | Type      | Description                                                  |
| ---------------------------- | --------- | ------------------------------------------------------------ |
| `email`                      | `string`  | Customer email address                                       |
| `name`                       | `string`  | Customer name                                                |
| `metadata`                   | `object`  | Additional customer metadata (optional)                      |
| `metadata.order_id`          | `string?` | Order ID if available                                        |
| `metadata.payment_id`        | `string?` | Payment transaction ID if available                          |
| `metadata.scheduled_token`   | `string?` | Scheduled payment token (for reminder/deferred events)       |
| `metadata.payment_link_url`  | `string?` | Payment link URL (for reminder events)                       |
| `metadata.due_date`          | `string?` | Due date in YYYY-MM-DD format (for scheduled payments)       |
| `metadata.grace_date`        | `string?` | Grace period end date in YYYY-MM-DD format (if applicable)   |
| `metadata.telegram_username` | `string?` | Customer's Telegram username (if available)                  |
| `metadata.telegram_user_id`  | `string?` | Customer's Telegram user ID (only for Telegram integrations) |

**`merchant` Object**

| Field  | Type     | Description            |
| ------ | -------- | ---------------------- |
| `id`   | `string` | Your merchant/store ID |
| `name` | `string` | Your store name        |


# Telegram Metadata Fields

These fields appear in webhook payloads for Telegram-integrated payment links:

| Field                                                      | Description                                                                                |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `customer.metadata.payment_link_url`                       | Direct link for the customer to complete payment.                                          |
| `customer.metadata.due_date`                               | Due date for upcoming or unpaid subscription.                                              |
| `customer.metadata.telegram_username`                      | Customer's Telegram username (e.g. `@johndoe`).                                            |
| `customer.metadata.telegram_user_id`                       | Telegram user ID (for bots to DM users). Only included if Telegram integration is enabled. |
| `paymentLink.integrationMetadata.telegram_group_id`        | Group ID of the connected Telegram group.                                                  |
| `paymentLink.integrationMetadata.telegram_group_name`      | Name of the Telegram group.                                                                |
| `paymentLink.integrationMetadata.telegram_welcome_message` | Welcome message displayed after successful payment                                         |


# Best Practices

#### 1. **Always Verify Signatures**

Never skip signature verification. This is your primary defense against fraudulent webhooks.

#### 2. **Use HTTPS Endpoints Only**

Paymento only sends webhooks to HTTPS URLs to ensure data security in transit.

#### 3. **Respond Quickly**

Your webhook endpoint should respond with a `200 OK` status code within 5 seconds. Do heavy processing asynchronously.

#### 4. **Handle Idempotency**

Webhooks might be delivered more than once. Use the `event.id` to track processed events and avoid duplicate processing.

#### 5. **Log Everything**

Keep detailed logs of all webhook requests for debugging and auditing.

#### 6. **Test Your Endpoint**

Use the "Test Webhook" feature in the Paymento dashboard to verify your endpoint is working correctly before going live.

#### 7. **Use Environment Variables**

Never hardcode your secret key. Use environment variables or secure configuration management.

#### 8. **Handle Errors Gracefully**

If your endpoint fails, return appropriate HTTP status codes:

* `200` - Successfully received and processed
* `401` - Invalid signature
* `500` - Internal server error (Paymento will retry)


# Troubleshooting

Common issues and solutions

#### Common Issues

**1. Signature Verification Fails**

**Problem:** The computed signature doesn't match the received signature.

**Solutions:**

* ✅ Ensure you're using the **raw request body** (not parsed JSON)
* ✅ Verify you're using the correct **Secret Key** from your merchant settings
* ✅ Check that you're computing **HMAC-SHA256** (not SHA256)
* ✅ Ensure the output is a **lowercase hex string**
* ✅ Remove any whitespace/line breaks from the secret key

{% code expandable="true" %}

```javascript
// ❌ Wrong - Using parsed JSON
const signature = crypto
  .createHmac('sha256', secretKey)
  .update(JSON.stringify(req.body))  // ❌ Don't stringify
  .digest('hex');

// ✅ Correct - Using raw body
const signature = crypto
  .createHmac('sha256', secretKey)
  .update(req.rawBody)  // ✅ Use raw body
  .digest('hex');
```

{% endcode %}

**2. Webhooks Not Being Received**

**Checklist:**

* ✅ Is your endpoint publicly accessible?
* ✅ Is it using HTTPS?
* ✅ Is there a firewall blocking Paymento's servers?
* ✅ Is the webhook URL correctly configured in the payment link?
* ✅ Are you returning a `200` status code quickly?

**3. Receiving Duplicate Webhooks**\
**Solution:** This is expected behavior. Implement idempotency using `event.id` ([see Best Practices #4](/payment-links/webhooks-for-payment-links/best-practices)).

**4. Timeout Errors**

**Problem:** Your endpoint takes too long to respond.\
**Solution:** Move heavy processing to background jobs and respond immediately.


# Scheduled & Recurring Payments

create recurring payment links that automatically bill users at set intervals. This is perfect for memberships, subscriptions, services, or any recurring billing scenario.

#### 🔄 Billing Interval

Choose how often you want to charge your customer:

* **Daily**
* **Weekly**
* **Monthly**
* **Yearly**

#### ⏰ Reminder (Renewal Notification)

You can optionally send users a **reminder email** before the next payment is due. Choose how early the reminder should be sent (e.g., 3 days before). This email includes the payment link and details so users can pay in advance.

#### 🕊️ Grace Period

Set a **grace period** to give users extra time to complete the payment after the billing date. During this time, users still have access. If the payment isn’t made by the end of the grace period, their subscription may be cancelled or access removed (e.g., from a Telegram group).

***

#### 📩 How It Works

1. On the **reminder date**, the user receives an email (and Telegram message if integrated) with a payment link.
2. The user must pay **before the grace period ends** to avoid interruption.
3. If payment is completed, access continues as usual.
4. If not, access is revoked automatically after the grace period.


# Fee & Pricing

{% hint style="info" %}
The PMO token has not been launched yet. For transaction fees, we currently accept Bitcoin (BTC), Ethereum (ETH), and Tether (USDT).&#x20;
{% endhint %}

Below is a detailed outline of our fees and pricing.

### Initial Free Usage&#x20;

* **Free Transaction Limit:** Upon joining, each merchant can process up to $3,000 USD worth of cryptocurrency transactions without any fees.
* **Fee Threshold:** Once you exceed this limit, a fee structure applies for further transactions.&#x20;

### Standard Transaction Fees

* **Fee Rate:** Paymento charges a standard transaction fee of 0.5% on each transaction processed through our platform.

### Top-Up Options

Merchants can top up their merchant accounts using the following cryptocurrencies:

* USDT (Tether)
* ETH (Ethereum)&#x20;
* BTC (Bitcoin)
* PMO (Paymento Token)

### Discount for Using PMO Token

* **Discount Rate:** Merchants who top up their accounts using Paymento's native PMO token will receive a 20% discount on transaction fees.&#x20;
* **Discounted Fee Rate:** With the PMO discount, the transaction fee is reduced to 0.4% per transaction.&#x20;

### Pricing Table&#x20;

<table><thead><tr><th width="252">Transaction Amount(USD)</th><th>Fee Without PMO</th><th>Fee With PMO</th><th>Top-up Method</th></tr></thead><tbody><tr><td>Up to 3,000</td><td>Free</td><td>Free</td><td>Not Applicable</td></tr><tr><td>Above 3,000</td><td>0.5%</td><td>0.4%</td><td>ETH, USDT, BTC, PMO</td></tr></tbody></table>

### Additional Information

**Top-up Process:** Merchants can top up their accounts at any time through their Paymento dashboard. Follow the simple steps provided in the dashboard to complete your top-up.&#x20;

**Transaction Fee Application:** Transaction fees are automatically deducted from the processed payments, ensuring seamless transactions without manual fee payments.&#x20;

Feel free to contact us if you need assistance regarding fees and pricing.


# Ledger live XPUB Mismatch

## Recovering BTC Sent to Legacy Address Due to Ledger XPUB Mismatch

#### Overview

Some users may encounter an issue where BTC received via Paymento does not appear in their Ledger wallet. This is often caused by a mismatch between the XPUB derivation path and the address type expected by Ledger Live. This article explains what causes the issue, how to identify it, and how to recover your funds.

***

#### The Root Cause: Ledger XPUB Mismatch

When you add a Bitcoin account in **Ledger Live**, it generates the account using **BIP84** (Native SegWit: `bc1...`) but exports an **XPUB** with the **`xpub...` prefix**, which traditionally indicates a **BIP44 (Legacy)** wallet.

> **This is a design mistake in Ledger Live.** The wallet operates using **BIP84**, but provides an XPUB formatted as `xpub`, misleading external platforms into treating it as **BIP44**.

Platforms like **Paymento interpret `xpub` as BIP44** (Legacy: `1...`), and therefore generate addresses under the BIP44 tree.

> **Result:** BTC is sent to a Legacy address derived from a BIP84 XPUB, which Ledger Live does not recognize — creating the appearance that the funds are missing.

***

#### How to Identify the Issue

* You used **Ledger Live** to export an XPUB.
* You added that XPUB to **Paymento**.
* Paymento generated a **Legacy `1...` address**.
* You received BTC at that address.
* The address and transaction **do not show up in Ledger Live**.

***

#### Why Ledger Can’t See It

Ledger Live expects all transactions for a Native SegWit account to appear under BIP84 (path: `m/84'/0'/0'`). It does not scan or track BIP44 legacy addresses unless you explicitly create a legacy account.

Even though the **seed is the same**, the **XPUB and derived addresses are completely different** between BIP44 and BIP84.

This issue occurs **because Ledger provided an XPUB format (`xpub`) that misrepresents the actual path and address format**. Ideally, Ledger should export a proper `zpub` for BIP84, or indicate the derivation path more clearly.

***

#### How to Recover Your Funds (Using Ledger)

1. Open **Ledger Wallet.**
2. Go to **Accounts**.
3. Click **+ Add account**.
4. Select **Bitcoin** and click **Continue**.
5. Connect and unlock your Ledger device to your PC.
6. Open the Bitcoin app on your Ledger device.
7. Wait until all accounts will be scanned.
8. Click on a toggle next to **Show all address types and select Legacy.**
9. Select accounts with the address format you need.
10. Click Add account.

<figure><img src="/files/6ZuOxiS8YCXiP143LyxU" alt=""><figcaption></figcaption></figure>

#### How to Recover Your Funds (Using Electrum)

You can recover your funds safely using your **Ledger hardware wallet** and **Electrum**, as Electrum allows custom script types and derivation paths.

**Step-by-Step Recovery:**

1. Open **Electrum** and choose **Standard Wallet**
2. Select **Use a hardware device**
3. Connect and unlock your **Ledger device**
4. Choose your Ledger from the device list
5. On the next screen:
   * **Select "Legacy (p2pkh)"** as the address type
   * **Manually set the derivation path** to:\
     `m/84'/0'/0'`
6. Click **Next**, and Electrum will generate addresses
7. You should now see your Legacy address with the funds (e.g., `1A...`)
8. Transfer the funds to a properly configured account if needed

> ⚠️ This mismatch (Legacy address type + BIP84 derivation path) is required **only because of how Ledger exported the XPUB**.

***

#### Best Practices Going Forward

* If you're using **Paymento**, make sure the wallet you use can:
  * Export an XPUB in the correct format
  * Match the address type expected by the XPUB
* Use **Sparrow Wallet** or **Electrum** with Ledger if you need full control over derivation paths and address formats
* Avoid pasting XPUBs from Ledger Live without knowing the path they were derived from

***

#### Recommendation for Ledger Team

We recommend that **Ledger addresses this inconsistency** in their platform by:

* Exporting **correct XPUB prefixes** (`zpub`, `ypub`, etc.) according to the derivation path used
* Clearly labeling which BIP standard the account is using when displaying or exporting XPUBs

This small change would greatly improve compatibility with external non-custodial tools like Paymento and prevent users from unknowingly misrouting funds.

***

#### Summary

If you received BTC on a legacy address that your Ledger Live account doesn’t recognize, it’s likely due to a **derivation mismatch** caused by Ledger exporting a misleading XPUB. By connecting your Ledger to **Electrum** with the right script type and path, you can safely recover your funds.

Always double-check derivation paths and address types when integrating with non-custodial platforms like Paymento.


# Callback Issues with LiteSpeed

## Troubleshooting Callback Issues with LiteSpeed and HMAC Verification

#### Overview

Some merchants using **LiteSpeed web servers** have reported that they are **not receiving payment callback requests** from Paymento, even though the transactions are processed successfully on-chain. This issue is typically caused by **LiteSpeed blocking or modifying HTTP headers**, which interferes with Paymento's **HMAC signature verification**.

***

#### Root Cause

Paymento signs each callback using an **HMAC-SHA256 signature**, included in the `X-Paymento-HMAC` HTTP header. This ensures that the callback is:

* Authenticated
* Untampered
* From a trusted source (Paymento)

However, **LiteSpeed server configurations may block or strip custom HTTP headers by default**, especially those starting with `X-`. As a result, your server never receives the `X-Paymento-HMAC` header, and your backend cannot verify the request.

***

#### Symptoms

* Payment is confirmed on the blockchain
* Transaction is visible in the Paymento dashboard
* Your WHMCS or platform shows the invoice as **unpaid or pending**
* No logs or failed attempts are seen in your server

***

#### How to Fix It

**✅ Step 1: Check if the `X-Paymento-HMAC` header is reaching your app**

Use a request logger or write a simple endpoint to dump all incoming headers and see if `X-Paymento-HMAC` is present.

**✅ Step 2: Whitelist or allow custom headers in LiteSpeed**

You may need to modify your **`.htaccess`** file or **LiteSpeed Web Admin settings** to allow custom headers.

Add this to your `.htaccess`:

```
RewriteEngine On
RewriteCond %{HTTP:X-Paymento-HMAC} ^(.+)$
RewriteRule .* - [E=HTTP_X_PAYMENTO_HMAC:%1]
```

Or ensure your LiteSpeed is not blocking headers by default in:

* LiteSpeed WebAdmin Console → Configuration → Server → Security

Also, make sure you’re **not behind a firewall or WAF** (e.g., ModSecurity) that strips unknown headers.

**✅ Step 3: Test Again**

After making these changes, reinitiate a test payment. The `X-Paymento-HMAC` header should now be passed through to your application, and the transaction should update correctly.

***

#### Summary

If you're using LiteSpeed and experiencing callback issues, there's a high chance the `X-Paymento-HMAC` header is being blocked. Allowing custom headers or explicitly whitelisting `X-Paymento-HMAC` resolves the problem and ensures secure callback verification.

For further help, contact our support team and let us know you're using LiteSpeed — we’ll help you validate your setup.


