Mark As Paid Batch Status API
curl --request GET \
--url https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slugimport requests
url = "https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyPayment APIs
Mark As Paid Batch Status API
Poll the progress of an asynchronous mark-as-paid batch
Mark As Paid Batch Status API
curl --request GET \
--url https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slugimport requests
url = "https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pazy.io/v1.0/payment/mark-as-paid/batch/:slug")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAuthentication
All requests require an API key in the request headers. Headers:Authorization: Api-Key YOUR_API_KEY
This endpoint is only relevant for batches submitted to the Mark Invoice as Paid API that exceeded 100 invoices and returned
status: "PENDING" with a bulkActionSlug.Request
Content-Type:application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | The bulkActionSlug returned by an asynchronous Mark Invoice as Paid request |
Code Examples
curl -X GET https://api.pazy.io/v1.0/payment/mark-as-paid/batch/bulk_action_identifier \
-H "Authorization: Api-Key YOUR_API_KEY"
const response = await fetch('https://api.pazy.io/v1.0/payment/mark-as-paid/batch/bulk_action_identifier', {
method: 'GET',
headers: {
'Authorization': 'Api-Key YOUR_API_KEY'
}
});
const result = await response.json();
import requests
url = "https://api.pazy.io/v1.0/payment/mark-as-paid/batch/bulk_action_identifier"
headers = {
"Authorization": "Api-Key YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
result = response.json()
Success Response
HTTP Status:200 OK
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data.slug | string | The batch identifier (same as the bulkActionSlug you polled with) |
data.status | string | Current batch state — see Status Values |
data.totalCount | number | Total number of invoices in the batch |
data.pendingCount | number | Number of invoices not yet processed |
data.discardedCount | number | Number of invoices that were skipped (could not be paid) — see note below |
Status Values
| Value | Meaning |
|---|---|
PROCESSING | The batch is still running |
COMPLETED | The batch finished and every invoice was paid successfully |
PROCESSED | The batch finished, but one or more invoices were skipped (see discardedCount) |
This endpoint reports aggregate counts only — it does not expose which specific invoices were skipped or why. If you need to confirm the outcome for a particular invoice, check its state via the Invoice Details API once
status is COMPLETED or PROCESSED.Response Example — still processing
{
"ok": true,
"data": {
"slug": "bulk_action_identifier",
"status": "PROCESSING",
"totalCount": 250,
"pendingCount": 130,
"discardedCount": 4
}
}
Response Example — completed with some skipped
{
"ok": true,
"data": {
"slug": "bulk_action_identifier",
"status": "PROCESSED",
"totalCount": 250,
"pendingCount": 0,
"discardedCount": 6
}
}
Response Example — completed, all succeeded
{
"ok": true,
"data": {
"slug": "bulk_action_identifier",
"status": "COMPLETED",
"totalCount": 250,
"pendingCount": 0,
"discardedCount": 0
}
}
Error Responses
Batch Not Found
HTTP Status:404 Not Found
{
"ok": false,
"error": {
"code": "BATCH_NOT_FOUND",
"message": "Mark-as-paid batch not found"
}
}
Authentication Errors
HTTP Status:401 Unauthorized
{
"ok": false,
"error": {
"code": "MISSING_CREDENTIALS",
"message": "Missing Credentials"
}
}
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API Key"
}
}
Permission Errors
HTTP Status:403 Forbidden
{
"ok": false,
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "Permission check failed - PERMISSION_CHECK_FAILED"
}
}
Best Practices
- Poll on an interval (e.g. every 10–30 seconds) rather than continuously — batches can take time to process, especially larger ones
- Stop polling once
statusisCOMPLETEDorPROCESSED— both are terminal states - A non-zero
discardedCountdoesn’t indicate a mark-as-paid API failure — it means specific invoices in that batch couldn’t be paid (e.g. no longer inAPPROVEDstate, or amount exceeded the due balance) while the rest of the batch proceeded normally
Was this page helpful?