NONSTOPAY Documentations
DocumentationNonstopay
  • PAYIN API Documentation
    • I-PREREQUISITE
    • II-HOW TO USE THE API
      • Create invoice CREDIT CARD (POST)
      • Create invoice UPI (POST)
      • Create invoice CRYPTO (POST)
      • Get an invoice status (GET)
      • Get invoice infos (GET)
      • Get invoice history (GET)
      • Get crypto payable currencies (GET)
    • III- INTEGRATION
    • IV- Webhook notification (callbacks)
  • PAYIN NFT API Documentation
    • I-PREREQUISITE
    • II-HOW TO USE THE API
      • NFT - Create invoice (POST)
      • NFT - Get an invoice status (GET)
      • NFT - Get invoice infos (GET)
      • NFT - Get invoice history (GET)
    • III- INTEGRATION
    • IV- Webhook notification (callbacks)
  • PAYOUT API Documentation
    • I-PREREQUISITE
    • II- INTEGRATION
    • III-PAYOUT FUNDS
    • IV-PAYOUT PAYMENT
    • V- Webhook notification (callbacks)
  • Guide for Affiliate
    • Registration and login
    • Features
  • Guide to Smart Settlement
    • Registration and login
    • Features
    • Whitelabel
  • Payment Crypto > Payable currencies value list
  • External Links
Powered by GitBook
On this page
  • REQUEST
  • RESPONSE
  • SAMPLE REQUEST CODE
  1. PAYIN NFT API Documentation
  2. II-HOW TO USE THE API

NFT - Get invoice infos (GET)

PreviousNFT - Get an invoice status (GET)NextNFT - Get invoice history (GET)

Last updated 3 months ago

REQUEST

The query is an HTTP GET request where your provided api key will be used as an http header.

API-KEY (Use the api key we’ve sent to you here).

“API-KEY: 0d8d8e89a6cdcd”

Parameter name
Example
Info

id

185

The invoice ID sent through the callback


RESPONSE

Our service will return a JSON object.

For errors
  • 50001 : API-KEY required

  • 50002 : id required

  • 50007 : invalid API-KEY

  • 50010 : No IP is linked to your account. Please enter them in your profile page and API block

  • 50011 : This invoice belongs to another merchant

Example :

{ “errorCode”: 50002, “errorMessage” : “id required” }

On a success response
  • 0 :

    • "merchant_id": "1",

      "invoice_id": "1689",

      "data":

      { "status": "invoice:paid", "id": 1736, "devise": "USD", "amount": 5, "description": "Payment of the invoice has been made successfully", "callbackJson": null, "fiat_amount": 409.71, "fiat_currency": "INR", "totalAmount": 4, “totalCurrency” : “USDC”, "datetime": "2023-04-12 19:09:48" }

Example :

{"errorCode": 0,"merchant_id": "1", "invoice_id": "1689","data": {"status": "invoice:paid","id":
1736,"devise": "USDC","amount": 5,"description": "Payment of the invoice has been made
successfully","callbackJson": null,"fiat_amount": 409.71,"fiat_currency": "INR","totalAmount":
4,“totalCurrency” : “USDC”,"datetime": "2023-04-12 19:09:48"}}


SAMPLE REQUEST CODE

<?php
    // First, please install the php-curl-class library through composer
    // git repository: https://github.com/php-curl-class/php-curl-class
    // Installation: composer require php-curl-class/php-curl-class
    require __DIR__ . '/vendor/autoload.php';
    
    use Curl\Curl;
    
    $API_KEY = ''; // Your API-KEY (We sent it to you)
    
    // URL to get an invoice status (IP-restricted call)
    $url = 'https://usdc.nonstopay.net/api/invoice/status/';
    /*
    * Data to POST
    */
    $data = [
     'id' => 185
    ];
    
    $curl = new Curl();
    $curl->setHeader('Content-Type', 'application/json');
    $curl->setHeader('API-KEY', $API_KEY);
    $curl->post($url, $data);
    if ($curl->error) {
        echo 'Error: ' . $curl->errorMessage . "\n";
    } else {
        echo 'Data server received via POST:' . "\n";
        if( $curl->response->errorCode == 0 ){
            var_dump( $curl->response);
             /*
             Response example :
             {
             “errorCode”:0,
             “merchant_id”: 1,
             “invoice_id”:185,
             “data”:
             ‘{
             "status":"invoice:paid",
            "id":185,
            "devise":"USDC",
            "amount":100,
            "description":"Payment of the invoice has been made
            successfully",",
             "callbackJson":null,
            "fiat_amount":100,
            "fiat_currency":"USD",
            "datetime":"2023-04-16 10:51:22"
             }’
             }
             */
        }else{
            var_dump( $curl->response);
             /*
             Response example :
             {“errorCode”:50007, “errorMessage”: “invalid API-KEY”}
             */
        }
    }
https://usdc.nonstopay.net/api/client-invoice-info/get/