Alinex Pay API Documentation

Secure crypto payment gateway APIs for merchants.

API Reference

The Alinex Pay API enables merchants and platforms to securely accept, verify, and manage digital crypto payments with ease. Designed for reliability and simplicity, the API provides a seamless way to integrate payment functionality into web and mobile applications while maintaining high security standards.
With Alinex Pay, you can:

  • Initiate customer payments in real time
  • Redirect users to a secure checkout experience
  • Verify transaction status programmatically
  • Process refunds efficiently
  • Handle payment workflows with confidence and scalability

All API requests are authenticated using a secret API key and communicate over HTTPS to ensure data protection. The API follows standard REST principles and returns JSON responses, making it easy to integrate with modern frameworks and backend systems. Whether you are building an e-commerce platform, subscription service, or custom payment flow, the Alinex Pay API gives you the tools needed to manage transactions securely and efficiently.

Base Url: https://api.alinexpay.com

Authentication

All API requests must include your api key and api secret in the request body. To get your api credentials first Register here.

Login to your account. From dashboard create an APP by clicking "Create APP".

Goto "Apps & Credentials". Here, you'll find all your apps and credentials.

Remeber to use proper credential based on your preffered api mode - live or sandbox.


            fetch("https://api.alinexpay.com/api/---", {
                method: "--",
                headers: {
                  "Content-Type": "application/json",
                },
                body: JSON.stringify({
                  amount: --,
                  key: YOUR_API_KEY,
                  secrete: YOUR_API_SECRETE,
                  -------
                  -------
                })
              })
            

Initiate Payment

POSThttps://api.alinexpay.com/api/users/create_payment_session
Use key and secrete based on you api mode. You'll find all the credential for both live or sandbox in the "Apps & Credential section."

Body Parameters

  • amount – number : required
  • key – string : required
  • secrete – string : required
  • mode – string : required
    Use "sandbox" or "live" mode.
  • success_url
  • failed_url – string : required
  • cancel_url – string : required
  • merchant_address – string : required
  • from_account_address – string : required

from_account_address will be automatically captured while connecting to your wallet. But your have to pass the parameter with "" empty string.

Your success_url, failed_url, cancel_url should be dynamic to recieve a 'session_id' sent by the response after the checkout.


  fetch("https://api.alinexpay.com/api/users/create_payment_session", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
          amount: amount,
          key: YOUR_API_KEY,
          secrete: YOUR_API_SECRETE,
          mode: "sandbox",
          success_url: "https://example.com/your-succes-url",
          failed_url: "https://example.com/your-failed-url",
          cancel_url: "https://example.com/your-cancel-url",
          merchant_address: "your_merchant_address",
          from_account_address: ""
      }),
    })

You'll get a redirect url to the chekout page in the json response with a session id. Redirect to the checkout page to procedd to the payment process

{
    "exists": true,
    "redirect_url": "https://api.alinexpay.com/checkout/8EXAMPLE3D132-2025SESSION1230085531",
    "session_id": "8EXAMPLE3D132-2025SESSION1230085531"
}

After you successfully complete your payment throug our checkout page. You'll be redirected to the success_url that you provide earlier. Else redirected to failed or cancel url provided by you upor failed payment or canceled payment.

Your success_url, failed_url, cancel_url should be dynamic to recieve a 'session_id' sent by the response after the checkout.

We will send an session_id at the end point of your provided url. The final redirect url will be like below:

 your_provided_url/session_id

Verify Payment

After a payment you can find your payment status or information by verifying your payment. On Your succes/failed/cancel redirect url you will get a session_id

POSThttps://api.alinexpay.com/api/users/check-payment

Body Parameters

  • key – string : required
  • secrete – string : required
  • session_id – string : required
fetch("https://api.alinexpay.com/api/users/check-payment", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      amount: amount,
      key: YOUR_API_KEY,
      secrete: YOUR_API_SECRETE,
      session_id: sessionId,                            
    }),
  })

You'll get the response below with payment_status as "success","failed","pending"

{
    "exists": true,
    "session_id": "8EXAMPLE3D132-2025SESSION1230085531",
    "amount": 0.005,
    "payment_status": "success"
}