Get Invoices

Get Invoices API Endpoint

POST https://payid19.com/api/v1/get_invoices

Requests

Parameters to be sent to the service are as follows:

Input Name Type Required Description
public_key String Yes your public key
private_key String Yes your private key
order_id String No, default null ID of order.
status String No, default null If null, only successful invoices are returned, if any value (0 or 1) is sent, all invoices (successful and waiting) are returned.

Response

Parameters to be returned from the service are as follows:

Input Name Type Description
status String success or error
message String error message if status is error or last 100 invoices if not order_id sended

Sample Codes


Get Invoice Sample


<?php
// API URL to send the request to
$url = 'https://payid19.com/api/v1/get_invoices';

// Data to be sent in the POST request
$post = [
    'public_key' => 'your public key',  // Your public key for API access
    'private_key' => 'your private key', // Your private key for API access
    'order_id' => ''  // Order ID (optional, leave blank if not needed)
];

// Initialize a cURL session
$ch = curl_init();

// Set the URL for the cURL request
curl_setopt($ch, CURLOPT_URL, $url);

// Enable SSL certificate verification
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);

// Return the response instead of printing it directly
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Set the POST fields for the request
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));

// Execute the cURL request and store the result
$result = curl_exec($ch);

// Close the cURL session
curl_close($ch);

// Check if the response indicates an error
if (json_decode($result)->status == 'error') {
    // If there's an error, display the full response
    echo json_decode($result);
} else {
    // If the request is successful, display the message
    echo json_decode($result)->message;
}

const axios = require('axios');

// API URL to send the request to
const url = 'https://payid19.com/api/v1/get_invoices';

// Data to be sent in the POST request
const postData = {
    public_key: 'your public key',  // Your public key for API access
    private_key: 'your private key', // Your private key for API access
    order_id: ''  // Order ID (optional, leave blank if not needed)
};

// Function to make the API call
axios.post(url, postData)
    .then(response => {
        const result = response.data;

        // Check if the response indicates an error
        if (result.status === 'error') {
            // If there's an error, log the full response
            console.log(result);
        } else {
            // If the request is successful, display the message
            console.log(result.message);
        }
    })
    .catch(error => {
        // Log any errors encountered during the request
        console.error('Error:', error.message);
    });


import requests

# API URL to send the request to
url = 'https://payid19.com/api/v1/get_invoices'

# Data to be sent in the POST request
post_data = {
    'public_key': 'your public key',  # Your public key for API access
    'private_key': 'your private key', # Your private key for API access
    'order_id': ''  # Order ID (optional, leave blank if not needed)
}

# Make the POST request to the API
response = requests.post(url, data=post_data)

# Parse the JSON response
result = response.json()

# Check if the response indicates an error
if result.get('status') == 'error':
    # If there's an error, print the full response
    print(result)
else:
    # If the request is successful, display the message
    print(result.get('message'))

Are you a developer? Please look at our New Developer Referral Program , Earn %50.