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 history (GET)

PreviousNFT - Get invoice infos (GET)NextIII- INTEGRATION

Last updated 11 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

status

PAID

status :

● PAID for all paid invoices ● UNPAID for all unpaid invoices

● WAITING for all waiting approval invoices

● ALL for all invoices

from

2023-06-01

start date filter

to

2023-06-19

end date filter

order

ASC

● ASC : ascending order by date

● DESC : descending order with respect to dates

page

2

Each page contains a maximum of 50 records


RESPONSE

Our service will return a JSON object.

For errors
  • 50001 : API-KEY required

  • 50007 : Invalid API-KEY

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

  • 50006 : You can not use this API from this IP address

  • 50012 : Invalid order. order must be ASC or DESC

Example :

{ “errorCode”: 50002, “errorMessage” : “id required” }
Success response
  • 0

    • { "errorCode":0, "status":"PAID", "from":"2023-06-01", "to":"2023-06-19", "page":2, "order":"DESC", "list":[ { "id":"1932", "email":"email@gmail.com", "status":"PAID","amount":"1.00", "symbol":”USD”, "create_date":"2023-06-15 10:39:34", "status_date":"2023-06-15 10:40:38", "tx_hash": "0xda4fd344e6310738db73dabdb42a213a38f14d2379b13c27fe86f8452002d4c5", "exchange_currency_symbol":"USDC", "paid_amount":"1.00", "merchant_amount":"0.900", "fee_amount":"0.100", "ip":"102.117.124.254", "country":"United Arab Emirates", "success_url":null, "pending_url":null, "cancel_url":null} ], ,"total":"51" }

Example :

{
   "errorCode":0,
   "status":"PAID",
   "from":"2023-06-01",
   "to":"2023-06-19",
   "page":2,
   "order":"DESC",
   "list":[
      {
         "id":"1932",
         "email":"email@gmail.com",
         "status":"PAID",
         "amount":"1.00",
         "symbol":"”USD”",
         "create_date":"2023-06-15 10:39:34",
         "status_date":"2023-06-15 10:40:38",
         "tx_hash":"0xda4fd344e6310738db73dabdb42a213a38f14d2379b13c27fe86f8452002d4c5",
         "exchange_currency_symbol":"USDC",
         "paid_amount":"1.00",
         "merchant_amount":"0.900",
         "fee_amount":"0.100",
         "ip":"102.177.124.254",
         "country":"United Arab Emirates",
         "success_url":null,
         "pending_url":null,
         "cancel_url":null,
         "nft_image_urls":null,
         "ipfs_meta_data":null
      }
   ],
   "total":"51"
}

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/invoices/history/';
    /*

    * Data to POST
    */
    $data = [
     'status' => 'PAID',
     'from' => '2023-06-01',
     'to' => '2023-06-19',
     'order' => 'ASC',
     'page' => 2,
    ];
    $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,
             "status":"PAID",
             "from":"2023-06-01",
             "to":"2023-06-19",
             "page":2,
             "order":"DESC",
             "list":[
             {
             "id":"1932",
             "email":"email@gmail.com",
             "status":"PAID","amount":"1.00",
             "symbol":”USD”,
             "create_date":"2023-06-15 10:39:34",
             "status_date":"2023-06-15 10:40:38",
             "tx_hash":
            "0xda4fd344e6310738db73dabdb42a213a38f14d2379b13c27fe86f8452002d4c5",
             "exchange_currency_symbol":"USDC",
             "paid_amount":"1.00",
             "merchant_amount":"0.900",
             "fee_amount":"0.100",
             "ip":"102.117.124.254",
             "country":"United Arab Emirates",
             "success_url":null,
             "pending_url":null,
             "cancel_url":null,
             "nft_image_urls":null,
             "ipfs_meta_data":null
             }
             ],
            ,"total":"51"
            }
             */
        }else{
            var_dump( $curl->response);
         /*
         Response example :
         {“errorCode”:50007, “errorMessage”: “invalid API-KEY”}
         */
        }
    }   
https://usdc.nonstopay.net/api/invoices/history/