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
  1. PAYIN API Documentation

III- INTEGRATION

Please do not call our service from a direct AJAX query, nor any navigator query. Because it will be rejected. Any call from an unknown or forbidden IP will be rejected… If you plan to do a request from a navigator anyway, call a script from your server which will do the request to our server…

HERE IS A PHP SAMPLE CODE FOR A SERVER-TO-SERVER CALL TO OUR SERVICE.

<?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 our redirection-url service. (IP-restricted call)
    $url = 'https://usdc.nonstopay.net/api/btn-create-invoice/get/';
    /*
    * Data to POST
    */
    $data = [
     'email' => "usdc".date('His')."@nocode3.net",
     'amount' => 1,
     'devise ' => 'USD'
    ];
    
    $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:'4 . "\n";
        if( $curl->response->errorCode == 0 ){
            echo 'redirectUrl: ' . $curl->response->redirectUrl . "\n";
            echo 'html: ' . $curl->response->html . "\n";
        }else{
            echo $curl->response->errorMessage . "\n";
        }
    }
PreviousGet crypto payable currencies (GET)NextIV- Webhook notification (callbacks)

Last updated 1 year ago