# Resmic SDK

Scale Secure Decentralise

**Welcome to Resmic**, the future of decentralised payment infrastructure. Designed to break down barriers and open up new opportunities, Resmic brings the power of blockchain technology to businesses and individuals alike. With Resmic, you can easily accept payments in Bitcoin, Ethereum, and many other cryptocurrencies, giving your customers more flexibility and convenience.

Let's explore what Resmic has to offer.


# Introduction

Decentralise Payment Infrastructure

Resmic is a cutting-edge decentralised payment platform leveraging blockchain technology to provide an efficient and streamlined payment solution. By supporting various cryptocurrencies across multiple blockchains, it offers a 100% decentralised, non-custodial business model. With zero downtime, minimal fees, and no need for third-party interventions or approvals, Resmic democratises the financial ecosystem.

<figure><img src="/files/pKsfP2YwcTHyvVc2RKSL" alt=""><figcaption><p>Resmic SDK</p></figcaption></figure>

{% content-ref url="/pages/AWvd3QMPlnK39SYPc1XL" %}
[Demo](/resmic-sdk/demo)
{% endcontent-ref %}

<br>


# Overview

Key features

**A. Decentralised System:** Resmic is built on a decentralised architecture that ensures complete autonomy and independence from any centralised entity. By distributing the control across various nodes, the risk of manipulation and fraud is significantly reduced. This decentralized system fosters trust and transparency, giving businesses and individuals full control and ownership of their funds.

**B. Multi-Currency Support:** Resmic supports an extensive variety of cryptocurrencies across various blockchains. From well-established cryptocurrencies like Bitcoin and Ethereum to emerging altcoins, Resmic's wide support ensures that businesses can accept payments in the currency of their choice. This extensive compatibility fosters inclusiveness and accessibility to all users, irrespective of their preferred crypto.

**C. Zero Downtime:** Understanding the critical nature of payment systems, Resmic guarantees zero downtime. Built on resilient, fault-tolerant architecture, the system ensures uninterrupted service. Whether it's peak transaction time or a regular day, Resmic's robust infrastructure maintains a smooth experience, enabling businesses to operate without any hindrance.

**D. 0 Fees:** One of Resmic's standout features is its commitment to affordability. With 0 transaction fees, businesses can enjoy significant cost savings, while still benefiting from all the robust features.

**E. No Approvals Required:** Resmic is designed with user convenience in mind. There's no need to navigate bureaucratic hurdles or wait for cumbersome approvals. With a straightforward download of the necessary packages into your site, you can begin accepting crypto payments instantly. It's seamless, efficient, and user-friendly.

**F. Non-Custodial Business Model:** With Resmic's non-custodial business model, users have absolute ownership of their assets at all times. Unlike traditional banking systems, there's no third party holding your funds. Your funds remain entirely in your control, secured by private keys only you possess.

**G. No API Key Management:** Resmic simplifies integration by eliminating the need for API key management. Developers and "non-tech-savvy" users alike can effortlessly integrate Resmic into their systems. This ease of integration accelerates the adoption of crypto payments, making it accessible to a broader audience.

**H. Customizable UI**.: Customise the component with your own input css.


# Getting Started


# Installation

Component installation

Install Resmic from NPM

```bash

npm install resmic

```

### The Gist

{% code fullWidth="false" %}

```jsx

import {CryptoPayment, Tokens, Chains} from 'resmic'

function App() {

  return (
      <div>
        <CryptoPayment 
             Address={{EVM:"YOUR_WALLET_ADDRESS", STARKNET:"YOUR_WALLET_ADDRESS"}} // Wallet Address to receive Funds.
             Chains={[ Chains.Ethereum, Chains.Polygon, Chains.Starknet, Chains.Sepolia ]}
             Tokens ={[Tokens.STARK, Tokens.ETH, Tokens.USDT ]} 
             Amount={100} // Amount in USD
        />
        
      </div>
  )
}

```

{% endcode %}

{% hint style="info" %}
**Important**

Visit list of [supported](/resmic-sdk/support) tokens and blockchains for more details.
{% endhint %}


# Usage


# CryptoPayment

## Usage

{% code fullWidth="false" %}

```javascript
import { useState } from 'react';
import { CryptoPayment, Tokens, Chains } from 'resmic'

function App() {

	const [paymentStatus, setPaymentStatus] = useState(false) // Returns bool after the payment
	
	// Your code...

  return (
        <div>
            <CryptoPayment 
                      Address={ {EVM:"0x056397760b973BfB921Bc10Be9DA5034B1e921d7", STARKNET:"0x05Ea419aa3Ad67A9f9721dc38257f8Cc1E032b0Ac83ED6b532Aad3e1778c1B9F"}} // Wallet Address to receive Funds.
                      Chains={[ Chains.Ethereum, Chains.Polygon, Chains.Starknet, Chains.Sepolia]}
                      Tokens ={[Tokens.STARK, Tokens.SETH, Tokens.DAI, Tokens.ETH, Tokens.BNB, Tokens.USDC]} 
                      Amount={100} // Amount in USD
                      noOfBlockConformation={2}
                      setPaymentStatus = {setPaymentStatus}
                      Style = {{displayName: "Make Payment", 
                                backgroundColor: "#007bff",
                                color: "#fff",
                                border: "none",
                                padding: "10px 20px",
                                borderRadius: "4px",
                                fontSize: "18px",
                                cursor: "pointer"}} 
            />
	  </div>

  )

}
```

{% endcode %}

```jsx
```

{% hint style="info" %}
**Important**

Visit list of [supported blockchains](/resmic-sdk/support/blockchain) & [supported tokens](/resmic-sdk/support/tokens#evm) for more details.
{% endhint %}


# For Starknet

Resmic Component for Starknet Blockchain

{% hint style="danger" %}
Resmic SDK old version.&#x20;
{% endhint %}

```
npm i resmic@1.0.10
```

## Usage

```jsx

import { useState } from 'react';
import {StarkNetConnect, StarkTokens} from 'resmic'

function App() {

	const [paymentStatus, setPaymentStatus] = useState() // Returns bool after the payment
	
	// Your code...

  return (
    <div>
        <StarkNetConnect Address={"YOUR_WALLET_ADDRESS"} //Wallet address to receive funds
            Tokens ={[StarkTokens.ETH, StarkTokens.Bitcoin, StarkTokens.USDT ]} //Choose the Tokens to accept payments from
            Amount={100} //Amount you want to receive in USD($)
            setPaymentStatus = {setPaymentStatus} 
	    Style = {{displayName: "Make Payment",
                    backgroundColor: "#007bff",
                    color: "#fff",
                    border: "none",
                    padding: "10px 20px",
                    borderRadius: "4px",
                    fontSize: "18px"}}
        />
    </div>
  )
}

```

{% hint style="info" %}
**Important**

Visit list of [supported](/resmic-sdk/support/tokens#starknet-1) tokens for more details.
{% endhint %}


# For EVM

Resmic Component for EVM Compatible Blockchain

{% hint style="danger" %}
Resmic SDK old version.&#x20;
{% endhint %}

```
npm i resmic@1.0.10
```

## Usage

```javascript
import { useState } from 'react';
import {EVMConnect, Tokens, Chains} from 'resmic'

function App() {

	const [paymentStatus, setPaymentStatus] = useState(false) // Returns bool after the payment
	
	// Your code...

  return (
        <div>
            <EVMConnect  Address={"YOUR_WALLET_ADDRESS"} //Wallet address to receive funds
                Chains={[ Chains.Ethereum, Chains.Polygon, Chains.Goerli]} //Choose the blockchains to allow payments from
        	Tokens ={[Tokens.USDT, Tokens.BUSD, Tokens.MATIC, Tokens.ETH]} //Choose the Tokens to accept payments from
                Amount={100} //Amount you want to receive in USD($)
                setPaymentStatus = {setPaymentStatus}
                noOfBlockConformation={5} //No. of blocks to wait for the payment conformation (Optional)
                Style = {{displayName: "Make Payment",
                    backgroundColor: "#007bff",
                    color: "#fff",
                    border: "none",
                    padding: "10px 20px",
                    borderRadius: "4px",
                    fontSize: "18px"}}
            />
	  </div>

  )

}
```

```jsx
```

{% hint style="info" %}
**Important**

Visit list of [supported blockchains](/resmic-sdk/support/blockchain) & [supported tokens](/resmic-sdk/support/tokens#evm) for more details.
{% endhint %}


# Reference

Props for component

## Starknet Reference

<table><thead><tr><th width="232">Props</th><th width="108">Type</th><th width="123">Required</th><th>Description</th></tr></thead><tbody><tr><td>Address</td><td>String </td><td>Yes</td><td>Wallet address to accept crypto funds.</td></tr><tr><td>Tokens</td><td>Array</td><td>Yes</td><td>Array of Tokens that you want to accept payment from Starknet blockchain.</td></tr><tr><td>Amount</td><td>Int</td><td>Yes</td><td>Amount of value in USD ($) you want to accept</td></tr><tr><td>Style</td><td>CSS</td><td>No</td><td><p>CSS styling for the display button</p><p>(Optional)</p></td></tr></tbody></table>

###

## EVM Reference

<table><thead><tr><th width="233">Props</th><th width="108">Type</th><th width="123">Required</th><th>Description</th></tr></thead><tbody><tr><td>Address</td><td>String </td><td>Yes</td><td>Wallet address to accept crypto funds.</td></tr><tr><td>Chains</td><td>Array</td><td>Yes</td><td>Array of Blockchains that you want to accept payments in.</td></tr><tr><td>Tokens</td><td>Array</td><td>Yes</td><td>Array of Tokens that you want to accept payment in.</td></tr><tr><td>Amount</td><td>Int</td><td>Yes</td><td>Amount of value in USD ($) you want to accept</td></tr><tr><td>setPaymentStatus</td><td>bool</td><td>yes</td><td>Returns boolean payment status after the payment by user </td></tr><tr><td>noOfBlockConformation</td><td>Int</td><td>No</td><td>No of blocks to wait for the payment conformation (Optional)</td></tr><tr><td>Style</td><td>CSS</td><td>No</td><td><p>CSS styling for the display button</p><p>(Optional)</p></td></tr></tbody></table>


# Support

Resmic currently supports following Blockchains, Tokens & Wallets


# Blockchain

Supported Blockchains

## List of supported blockchain

* Starknet
* Ethereum
* Polygon
* Binance
* Optimism
* XDC-Network
* Solana
* Sepolia (Testnet)

####

{% hint style="info" %}
&#x20;**Coming soon**

We are actively working to add new blockchains.
{% endhint %}


# Tokens

List of supported tokens

## Starknet

<details>

<summary>StarkNet</summary>

* **Ethereum** (0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7)
* **DAI** (0x0dA114221cb83fa859DBdb4C44bEeaa0BB37C7537ad5ae66Fe5e0efD20E6eB3)
* **USDT** (0x68F5c6a61780768455de69077E07e89787839bf8166dEcfBf92B645209c0fB8)
* **USD** (0x053C91253BC9682c04929cA02ED00b3E423f6710D2ee7e0D5EBB06F3eCF368A8)
* **WBTC** (0x3Fe2b97C1Fd336E750087D68B9b867997Fd64a2661fF3ca5A7C771641e8e7AC)

</details>

##

## EVM Blockchains

<details>

<summary>Ethereum</summary>

* **Ethereum** (Native)
* **USDT** (0xdAC17F958D2ee523a2206206994597C13D831ec7)
* **USDC** (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)
* **DAI** (0x6b175474e89094c44da98b954eedeac495271d0f)
* **BUSD** (0x4fabb145d64652a948d72533023f6e7a623c7c53)
* **Bitcoin** (0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599)
* **Matic** (0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0)
* **BNB** (0xB8c77482e45F1F44dE1745F52C74426C631bDD52)

</details>

<details>

<summary>Polygon</summary>

* **Matic** (Native)
* **USDT** (0xc2132D05D31c914a87C6611C10748AEb04B58e8F)
* **USDC** (0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174)
* **DAI** (0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063)
* **BUSD** (0xdab529f40e671a1d4bf91361c21bf9f0c9712ab7)
* **Bitcoin** (0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6)
* **Ethereum** (0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619)
* **BNB** (0x3BA4c387f786bFEE076A58914F5Bd38d668B42c3)

</details>

<details>

<summary>Binance</summary>

* **BNB** (Native)
* **BSC-USD** (0x55d398326f99059fF775485246999027B3197955)
* **USDC** (0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d)
* **DOGE** (0xbA2aE424d960c26247Dd6c32edC70B295c744C43)
* **DAI** (0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3)
* **BUSD** (0xe9e7cea3dedca5984780bafc599bd69add087d56)
* **Bitcoin** (0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c)
* **Matic** (0xCC42724C6683B7E57334c4E856f4c9965ED682bD)
* **Ethereum** (0x2170Ed0880ac9A755fd29B2688956BD959F933F8)

</details>

<details>

<summary>Optimism</summary>

* **Ethereum** (Native)
* **USDT** (0x94b008aA00579c1307B0EF2c499aD98a8ce58e58)
* **USDC** (0x7F5c764cBc14f9669B88837ca1490cCa17c31607)
* **DAI** (0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1)
* **Bitcoin** (0x68f180fcCe6836688e9084f035309E29Bf0A2095)
* **Optimism** (0x4200000000000000000000000000000000000042)

</details>

<details>

<summary>XDC-Network</summary>

* **XDC** (Native)
* **USDT** (0xd4b5f10d61916bd6e0860144a91ac658de8a1437)

</details>

<details>

<summary>Sepolia (Testnet)</summary>

* **Ethereum** (Native)
* **USDT** (0x65aFADD39029741B3b8f0756952C74678c9cEC93)
* BNB (0x75Ab5AB1Eef154C0352Fc31D2428Cef80C7F8B33)&#x20;

</details>

## Solana

<details>

<summary>Solana</summary>

* **SOL** (Native)
* **USDT** (Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB)
* **USDC** (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v)
* **WETH** (2FPyTwcZLUg1MDrwsyoP4D6s1tM7hAkHYRjkNb5w6Pxk)&#x20;

</details>

{% hint style="info" %}
&#x20;**Comming soon**

We are actively working to add new ERC20 tokens.
{% endhint %}


# Wallets

Supported blockchain by Resmic

* Metamask
* ArgentX
* Braavos
* Phantom

{% hint style="info" %}
&#x20;**Comming soon**

We are actively working to add new Wallet supports.
{% endhint %}


# Demo

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPVMRPJ1ZKPHg3ldfO0U3%2Fuploads%2FOWchCIP1H48tkghocZtu%2FResmic%20Demo.mp4?alt=media&token=14e6ff67-4988-4b24-9056-97e5d62bb830>" %}
Resmic Demo
{% endembed %}


# Sample React app

<figure><img src="/files/pKsfP2YwcTHyvVc2RKSL" alt=""><figcaption><p>Resmic Demo</p></figcaption></figure>

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td></td><td><a data-footnote-ref href="#user-content-fn-1"><strong>Demo App</strong></a></td><td></td></tr></tbody></table>

[^1]:


# Whitepaper

{% file src="/files/RBeFeGsujovGgFKgcrxq" %}


# Github

[Github](https://github.com/0xResmic)


# Contact

Reach us at <support@resmic.com>


# Resmic Pro

Scale Secure Decentralise

**Welcome to Resmic**, the future of decentralised payment infrastructure. Designed to break down barriers and open up new opportunities, Resmic brings the power of blockchain technology to businesses and individuals alike. With Resmic, you can easily accept payments in Bitcoin, Ethereum, and many other cryptocurrencies, giving your customers more flexibility and convenience.

Let's explore what Resmic has to offer.


# Introduction to Resmic Pro

Overview

Resmic Pro is an extended version of the Resmic decentralised payment gateway. It is designed for developers and businesses who need a more advanced and structured payment solution.

Unlike traditional payment gateways that charge a percentage-based fee per transaction, Resmic Pro follows the "Bitcoin model", where transaction fees remain constant regardless of the amount transferred. This provides a predictable cost structure and eliminates hidden charges.

## Features

#### Flat Monthly Subscription

* No per-transaction commission.
* Simple and predictable pricing.

#### Payment Dashboard

* Monitor transactions in real-time.
* Analyse payment trends and generate reports.

#### API Key Management

* Securely generate and manage API keys.
* Easy integration with applications.

#### Webhook Support

* Receive real-time payment notifications.
* Automate workflows based on payment events.

It is suitable for e-commerce platforms, SaaS businesses, freelancers, and enterprises looking for a reliable and decentralised payment gateway.

### Comparison: Resmic SDK vs. Resmic Pro

<table data-full-width="false"><thead><tr><th>Feature</th><th>Resmic SDK (Free)</th><th>Resmic Pro (Paid)</th></tr></thead><tbody><tr><td>API-Based Payments</td><td>No</td><td>Yes</td></tr><tr><td>Payment Dashboard</td><td>No</td><td>Yes</td></tr><tr><td>Webhook Support</td><td>No</td><td>Yes</td></tr><tr><td>Subscription Model</td><td>No (Self-hosted)</td><td>Yes (Flat Fee)</td></tr><tr><td>Transaction Fees</td><td>No Fees</td><td>No Fees</td></tr><tr><td>Coupon Support</td><td>No</td><td>Yes</td></tr><tr><td>AML</td><td>No</td><td>Yes (Beta)</td></tr><tr><td>Support</td><td>No</td><td>Yes</td></tr></tbody></table>

With Resmic Pro, users gain enhanced control, automation, and insights into their payments while maintaining a P2P, fee-free structure.

###


# Getting Started

Getting Started with Resmic Pro

### Quick Start Setup

* **Sign Up & Choose a Plan** (Free trial or paid plan).

* **Generate an API Key** from the Resmic Pro dashboard.

* **Set Up Webhooks** (if needed).

* **Integrate Payments** using the API.

* **Test and Go Live** using the Demo mode.

* API Key creation → [**API Authentication & Security**](/resmic-pro/api-authentications-and-security)

* Payment processing →[ **Payment Integrations**](/resmic-pro/payment-integration)

* Webhooks for payment updates → [**Webhook Integrations**](/resmic-pro/webhooks-and-notifications)

* Blockchins & Tokens →   [**Supported Chains & Tokens**](/resmic-pro/supported-chains-and-tokens)

* Testing the integration → [**Demo**](/resmic-pro/demo)


# API Authentications & Security

Generate APIs & Start accepting Crypto!

### Introduction

Resmic Pro requires an API key for secure access to its payment services. This section explains how to obtain and use your API key while ensuring best security practices.

### Step 1: Subscription Requirement

Before generating an API key, users must have an active subscription. You can either:

* **Buy a plan** from the dashboard.
* **Start a free 20-day trial** to test the service.

### Step 2: Generating an API Key

1. Log in to your Resmic Pro dashboard.
   1. Navigate to the <kbd>**Developer**</kbd> section.
2. If you have an active plan, click on <kbd>**Generate Key**</kbd>.
3. Copy and securely store your <kbd>`API_KEY`</kbd>  & <kbd>`User_id`</kbd> It will only be shown once.

### Step 3: Using Your API Key

Your API key must be included in the `Authorization` header of every request:

{% hint style="warning" %}
Representational, Not an actual endpoint
{% endhint %}

```
curl -X POST "https://api.resmic.com/payments" \
     -H 'x-api-key': <Your_API_KEY>,
        'x-user-id': <Your_User_Id>     
```

### Step 4: Security Best Practices

* **Keep your API key confidential** – Do not expose it in frontend code or public repositories.
* **Rotate API keys periodically** – Generate a new key and update your integrations regularly.
* **Use environment variables** – Store API keys in `.env` files instead of hardcoding them.

### Step 5: Regenerating or Revoking an API Key

1. Go to the **API Keys** section in your dashboard.
2. Click on **Revoke** to disable an existing API key.
3. Generate a new key if needed and update your application accordingly.

### Conclusion

Your <kbd>`API_KEY`</kbd> and <kbd>`User_Id`</kbd>is essential for integrating with Resmic Pro securely. Follow the best practices to protect your key and ensure seamless transactions. For more details, refer to the API Documentation.


# Payment Integration

### Introduction

Integrating Resmic Pro into your application allows you to accept crypto payments seamlessly. This section provides a step-by-step guide on how to set up payment processing.

### Step 1: Generate an API Key

Before initiating payments, ensure you have generated an API key. Refer to the [API Authentication & Security](/resmic-pro/api-authentications-and-security) section for details on obtaining your API key.

### Step 2: Creating a Payment Request

To create a payment request, send a `POST` request to the Resmic Pro API:

#### Request Example

```bash
curl --location 'https://api.resmic.com/api/v1/makepayment' \
--header 'Content-type: application/json' \
--header 'x-api-key: <Your_API_KEY>' \
--header 'x-user-id: <Your_User_Id>' \
--data-raw '{
    "amount":100, 
    "blockchain":["Ethereum", "Polygon","BNB-Chain", "Sepolia"], 
    "token": ["USDT", "USDC", "DAI", "ETH", "PUSH"], 
    "title":"Test title for the session", 
    "description": "This is a detailed description for the payment", 
    "wallet_address": "0x056397760b973BfB921Bc10Be9DA5034B1e921d7", 
    "blockchain_confirmation": 1,
    "redirect_url": "localhost:3000/success-page", 
    "cancel_url":"localhost:3000/payment-failed-page", 
    "webhook_url":"adityakaklij11@gmail.com"
} '
```

#### Response Example

```json

{
    "status":200,
    "success":true,
    "message":"Sessions created successfully",
    "data":{
        "session_id":"bb0425fe-19b0-4a08-89ce-3dc7f2b53711",
        "payment_url":"https://payments.resmic.com/bb0425fe-19b0-4a08-89ce-3dc7f2b53711"
        }
    }
```

### Step 3: Redirecting the User

Once the payment request is created, redirect the user to the `payment_url` where they can complete the transaction.

### Step 4: Handling Payment Status Updates

Resmic Pro will notify your system about payment status changes through webhooks. Ensure you configure your webhook endpoint in the dashboard.

#### Webhook Example

```json
{
  "payment_id": "abc123xyz",
  "status": "confirmed",
  "amount": 100,
  "currency": "USDT"
}
```

### Sample Integration

```javascript

const makePaymentRedirect = async() => {
        try {
            const paymentDetails = {
                amount: 100, // Amount in USD $
                blockchain: ["Ethereum", "Polygon", "BNB-Chain","Sepolia"],
                token: ["USDT", "USDC", "ETH", "DAI"],
                title: "Test title for the session",
                description: "This is a detailed description for the payment",
                wallet_address: "0x056397760b973BfB921Bc10Be9DA5034B1e921d7",
                blockchain_confirmation: 2,
                redirect_url:"https://domain.com/success",
                cancel_url:"https://domain.com/failed",
                webhook_url: "https://webhook-post-endpoint", // Provide webhook endpoint or use email for status updates
            }
            // Initiate the payment session.
            let response = await axios.post(`https://api.resmic.com/api/v1/makepayment`, paymentDetails, {
                headers: {
                    'Content-Type': 'application/json',
                    'x-api-key': 'API_KEY', // Add the API_KEY here
                    'x-user-id': 'USER_ID' // Add the user_id here.
                }
            })
            // Redirection to Payment Page.
            if (response.data?.success){
                let payment_url = response.data?.data?.payment_url
                window.location.assign(payment_url)
            }
            else{
                alert("Unable to generate payment session.")
            }
        } catch (error) {
            console.log("Error: ", error);
        }
    }
```

### Conclusion

By following these steps, you can successfully integrate Resmic Pro for accepting crypto payments. For further customisation, refer to the [Webhooks & Notifications](/resmic-pro/webhooks-and-notifications) section.


# Order Status

Endpoint elaborates on how you can check the Order Status of the payment.

**This API is used to check the payment status:**  This endpoint retrieves the current payment status of a session. Use this to verify if a payment was successful, failed, or is still pending.

> You can get `session_id` form the `redirect_url` or `cancel_url` as parameter
>
> e.g. the redirect url you haved added at the payment endpoint will be&#x20;
>
> `example.com/success?session_id=payment_id`

### Endpoint:

```bash
curl --location 'https://api.resmic.com/api/v1/makepayment/payment-status?session_id=<SESSION_ID>
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'x-user-id: <YOUR_USER_ID>'
```

### Sample Request

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

let session_id = ""// Add the session ID here.
let config = {
  method: 'get',
  url: `https://api.resmic.com/api/v1/makepayment/payment-status?session_id=${session_id}`,
  headers: { 
    'x-api-key': 'API_KEY', // Add the API_KEY here
    'x-user-id': 'USER_ID' // Add the user_id here.
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});


```

### Sample Response

```json
{
    "status": 200,
    "success": true,
    "message": "Session reterived",
    "data": {
        "session_id": "899e9dde-fda9-4386-9620-065756016805",
        "created_at_utc": "2025-02-21T23:00:13.633Z",
        "updated_at": "2025-02-22T04:31:08.132Z",
        "amount": "100",
        "payment_status": "Completed", // 
        "wallet_address": "0x056397760b973BfB921Bc10Be9DA5034B1e921d7", // Payment from address.
        "is_coupon_applied": false
    }
}
```

Possilbe Payment Status values (case sensitive)

1. `Completed`
2. `Failed`
3. `initiated` (User initiated the payment but didn't completed.)


# Transaction Details

Endpoint to get transaction details.

This endpoint retrieves the payment transaction status  and details of a session.

```bash
curl --location 'https://api.resmic.com/api/v1/makepayment/transaction-details?session_id=Session_Id
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'x-user-id: <USER_ID>' \
```

### Sample Request

```javascript
const axios = require('axios');
let session_id = '';

let config = {
  method: 'get',
  url: `https://api.resmic.com/api/v1/makepayment/transaction-details?session_id=${session_id}`,
  headers: { 
    'x-api-key': 'API_KEY', // Add the API_KEY here
    'x-user-id': 'USER_ID' // Add the user_id here.
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

### Sample Response

```json
{
    "status": 200,
    "success": true,
    "message": "Session reterived",
    "data": {
        "session_id": "899e9dde-fda9-4386-9620-065756016805",
        "created_at_utc:": "2025-02-22T10:01:08.132Z",
        "transaction_hash": "0xf85be61c64d788d284c0bd7337742cc31c5bdfbac10d061b24868889caafc944",
        "amount": "100",
        "blockchain": "Sepolia",
        "token": "DAI",
        "coupon_code": null,
        "from_wallet_address": "0x056397760b973bfb921bc10be9da5034b1e921d7",
        "status": "Completed"
    }
}
```

Possible Payment Status values (case sensitive)

1. `Completed`
2. `Failed`


# Webhooks & Notifications

### Introduction

Webhooks allow your application to receive real-time updates about payment statuses from Resmic Pro. This ensures that you are notified immediately when a payment is completed, pending, or failed. You can either provide an endpoint to receive webhook notifications or opt for email updates (not recommended for real-time processing).

### Configuring Webhooks

#### Option 1: Providing a Webhook URL (Recommended)

To receive automatic updates, configure a webhook endpoint in your Resmic Pro dashboard:

1. Just append the <kbd>`web_hook url`</kbd>  while initiating the payment session

Whenever a payment status is updated, Resmic Pro will send a `POST` request to the configured URL.

> You will required Webhook secret to verify the data you received is correct.
>
> To generate the webhook secret visit: <https://dashboard.resmic.com/developer>

**Example Server Webhook Response**

```json
{
    session_id,
    amount, 
    blockchain, 
    token,
    from_wallet_address,
    transaction_hash,
    txTime,
    status:true
}   
```

#### Option 2: Receiving Email Notifications (Not Recommended)

If you prefer, you can opt to receive payment updates via email instead of webhooks.&#x20;

To enable email notifications:

Just add email address at the <kbd>`webhook_url`</kbd> while initiating the payment

Whenever a payment status is updated, you will receive an email notification containing the payment details.

### Handling Webhook Notifications

When you receive a webhook notification, your server should:

1. Parse the JSON payload.
2. Verify the <kbd>`session_id`</kbd> and `status` fields.
3. Update your database accordingly.
4. Respond with a `200 OK` to acknowledge receipt.

### E.g. Success Payment response

\`req.body\`

```json
{
  session_id: '591abe63-aa61-411d-a419-0b546729bbd0',
  amount: '20',
  blockchain: 'Sepolia',
  token: 'DAI',
  from_wallet_address: '0x056397760b973BfB921Bc10Be9DA5034B1e921d7',
  transaction_hash: '0xa43df332c8d376fc14ffc992c4b87e04a5707a3bc7a92ec4eef7b90c66388db2',
  txTime: 'Mar 5, 2025, 03:36',
  status: true
}
```

### Failed Payment response

\`req.body\`

```json
{
        session_id:"session_id",
        txTime:"Tx_time",
        status:false
}
```

### Sample Webhook endpoint

```javascript
const express = require("express");
const crypto = require("crypto");

const app = express();
const port = 3000;

app.use(express.json()); // Middleware to parse JSON request bodies

// Your webhook secret (Get it from Resmic Dashboard)
const WEBHOOK_SECRET = "YOUR_WEBHOOK_SECRET";

// Middleware to verify the webhook signature
const verifyWebhookSignature = async (req, res, next) => {
  const clientSignature = req.headers["x-signature"]; // Get the signature from the request headers
  // Verify the request using HMAC
  const isSignatureValid = await verifyHMAC(req.body, clientSignature, WEBHOOK_SECRET);

  if (!isSignatureValid) {
    return res.status(401).json({ success: false, message: "Unauthorized access" });
  }

  next(); // Proceed to the next middleware or route handler
};

// Root route for testing
app.get("/", (req, res) => {
  res.send("Hello, Webhooks!");
});

// Webhook endpoint for payment updates
app.post("/payment-webhook", verifyWebhookSignature, async (req, res) => {
  const {
    session_id,
    amount,
    blockchain,
    token,
    from_wallet_address,
    transaction_hash,
    txTime,
    status,
  } = req.body;

  console.log("Webhook Received:", req.body);

  if (status) {
    // Handle successful payment logic here (e.g., updating database, sending confirmation emails, etc.)
    console.log("✅ Payment Confirmed for Session:", session_id);
  } else {
    console.log("⚠️ Payment Status:", status);
  }


  // Send a response back to acknowledge receipt of the webhook
  res.status(200).json({
    success: true,
    message: "Webhook processed successfully",
    data: {
      session_id,
      txTime,
      status,
    },
  });
});

// Start the Express server
app.listen(port, () => {
  console.log(`🚀 Webhook listener running on http://localhost:${port}`);
});

// Helper function to verify HMAC signature
function verifyHMAC(payload, signature, secretKey) {
  const data = JSON.stringify(payload);
  const computedSignature = crypto.createHmac("sha256", secretKey).update(data).digest("hex");
  return computedSignature === signature;
}

```

### Conclusion

By configuring webhooks, you can automatically track payment updates in real-time. If webhooks are not an option, email notifications can serve as an alternative.


# Supported Chains & Tokens

### **Overview**

Resmic Pro supports multiple blockchain networks and tokens to ensure seamless and efficient crypto transactions. Below is a list of supported chains and the respective tokens available for payments.

***

### **Supported Blockchains**

Resmic Pro currently supports the following blockchain networks:

* **Polygon (MATIC) \[QR Support]\***
* **Base \[QR Support]\***
* **Ethereum (ETH)**
* BNB-Chain **(BSC)**
* **XDC-Network**
* Optimism
* Ethereum Sepolia (Testnet) **\[QR Support]\***
* *(More chains will be added soon...)*

***

### **Supported Tokens**

For each blockchain, the following tokens are supported for payments:

#### **Ethereum (ETH)**

* **ETH (Ethereum)**
* USDT (Tether)
* USDC (USD Coin)
* DAI (Dai Stablecoin)

#### BNB-Chain **(BSC)**

* **BNB (Binance Coin)**
* BUSD (Binance USD)
* USDT (Tether)
* USDC (USD Coin)

#### **Polygon (MATIC)**

* **MATIC (Polygon)**
* USDT (Tether)
* USDC (USD Coin)

#### **Base**

* **WETH (Ethereum)**
* USDC  (USD Coin)
* DAI  (Dai Stablecoin)
* TRUMP (Official Trump)

#### **XDC-Network**

* XDC
* USDT

**Optimism**

* Ethereum
* USDT
* USDC
* DAI
* Bitcoin

***

**\*\[QR Support]: User can make payment by just scannign the QR code from any wallet of their choice. (Centralise exchanges,wallets, etc.)**

### **Adding More Tokens & Networks**

We are continuously expanding our support for more blockchains and tokens. If you require a specific token or network that is not listed, please reach out to our team at **<support@resmic.com>**.


# iFrame

Easily embed the payment flow in your website using the following iFrame

```html
<iframe
        src="https://app.resmic.com?api_key=User_API_KEY&user_id=USER_ID&amount=100&success_url=https://success-url.com&cancel_url=https://cancel-url.com&wallet_address=0x000&email=name@email.com"
        width="100%"
        height="50%"
        >
</iframe>
```


# Demo

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPVMRPJ1ZKPHg3ldfO0U3%2Fuploads%2FOWchCIP1H48tkghocZtu%2FResmic%20Demo.mp4?alt=media&token=14e6ff67-4988-4b24-9056-97e5d62bb830>" %}
Resmic Demo
{% endembed %}


# Sample React app

<figure><img src="/files/pKsfP2YwcTHyvVc2RKSL" alt=""><figcaption><p>Resmic Demo</p></figcaption></figure>

Visit:  <https://prodemo.resmic.com/>

Git Respo: <https://github.com/0xResmic/DEMO_ResmicPRO>&#x20;


# Failed Transactions & Stuck Payments

If you experience a failed or stuck payment, you can raise a support request, and our team will verify and assist you in resolving the issue.

### **How to Report a Failed Transaction?**

To help us verify and process your request efficiently, please provide the following details:

* **Session ID** (if applicable)
* **From Wallet Address** (Sender's wallet)
* **To Wallet Address** (Receiver's wallet)
* **User ID** (Your Resmic Pro account identifier)
* **Transaction Hash** (TXID of the payment)
* **Amount** (Crypto amount sent)
* **Blockchain** (Ethereum, BSC, Polygon, etc.)
* **Token** (USDT, ETH, BTC, etc.)
* **Issue Description** (Briefly explain the issue, e.g., stuck in pending, transaction failed, incorrect amount, etc.)

#### **Where to Send Your Request?**

Send the above details along with a brief explanation of the issue to our support email:

📩 **<transactions@resmic.com>**

We will review your request and respond as soon as possible.

#### **Important Notes:**

* Ensure you provide the correct transaction hash and wallet details for quick verification.
* If your transaction is still pending on the blockchain, please check the blockchain explorer before reporting.
* Transaction resolution depends on network congestion and blockchain conditions.


# Contact

Reach us at <support@resmic.com>


# Quick Payments

Scale Secure Decentralise

**Welcome to Resmic**, the future of decentralised payment infrastructure. Designed to break down barriers and open up new opportunities, Resmic brings the power of blockchain technology to businesses and individuals alike. With Resmic, you can easily accept payments in Bitcoin, Ethereum, and many other cryptocurrencies, giving your customers more flexibility and convenience.

Let's explore what Resmic has to offer.


# Quick Links

Overview

Resmic **QuickLinks** is a cutting-edge feature designed to simplify crypto payments for individuals and businesses. With Resmic Quick Links, users can create instant links to facilitate fast and secure transactions, making it a seamless experience for both payers and receivers.

### Key Features

* **Fast and Efficient:** Quick Links enable users to receive crypto payments instantly, reducing transaction times.
* **Shareable Anywhere, Anytime:** Share your Quick Links effortlessly, allowing payments from anyone, anywhere in the world.
* **Customisable for Your Needs:** Tailor each Quick Link to specific payment amounts and currencies.


# Getting Started

### Accessing Resmic Quick Links

Visit `pay.resmic.com`

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

### Customise your options

Choose from a variety of supported cryptocurrencies.&#x20;

Choose from a variety of ERC20 tokens.

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

### Share the URL

Copy the generated Quick Link.

Share it with the world!

<figure><img src="/files/2rfySugNMdFQEuFWkn3U" alt=""><figcaption></figcaption></figure>


# Sharing Quick Links

Received URL

Open the URL in the browser (Just ensure, the Crypto wallet is installed!)

### Click on the make payment

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

###

### Choose the blockchain and tokens from the available options

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

### Payment is done!


# Errors

Resmic is aware of the following errors and we are actively working on resolving them to ensure a seamless user experience.

### Error 01.

<div align="left"><figure><img src="/files/aCTdP0MYvlpiQZ8mUyMc" alt="" width="375"><figcaption><p>Error 01 </p></figcaption></figure></div>

If you encounter both errors simultaneously, it must be `MetaMask - RPC Error: Internal JSON-RPC error.` This issue commonly arises due to some updates in Brave or Chrome browsers, while transactions typically proceed without issue on Firefox.&#x20;

The error occurs because Resmic relies on users' MetaMask RPC for transactions, which helps maintain Resmic's decentralisation.


# Invocie


