E-Invoice
Test IRP Connection
Test connectivity to the Invoice Registration Portal using your saved credentials.
POST
/
v1
/
settings
/
irp
/
test
Test the IRP connection
curl --request POST \
--url https://billing.example.com/v1/settings/irp/test \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/settings/irp/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/settings/irp/test', 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://billing.example.com/v1/settings/irp/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://billing.example.com/v1/settings/irp/test"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://billing.example.com/v1/settings/irp/test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/settings/irp/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}Sends a test authentication request to the IRP using the credentials stored in your current configuration. No request body is required.
Example Request
curl -X POST https://api.recurso.dev/v1/settings/irp/test \
-H "Authorization: Bearer rsk_live_7f3a9b2c1d4e8f0a" \
-H "Content-Type: application/json"
Response (Success)
{
"success": true,
"message": "Successfully authenticated with the IRP. Credentials are valid.",
"environment": "production",
"response_time_ms": 342,
"tested_at": "2026-06-23T16:45:00Z"
}
Response (Failure)
{
"success": false,
"message": "Authentication failed. The client_id or client_secret is invalid.",
"environment": "production",
"response_time_ms": 1205,
"tested_at": "2026-06-23T16:45:00Z"
}
Always test your IRP connection after updating credentials and before enabling auto-submission in production. This avoids failed e-invoice submissions on live invoices.
This endpoint requires an existing IRP configuration. If no configuration has been saved, the request returns a
404 Not Found error. Use the Update IRP Configuration endpoint to set up credentials first.⌘I
Test the IRP connection
curl --request POST \
--url https://billing.example.com/v1/settings/irp/test \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/settings/irp/test"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/settings/irp/test', 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://billing.example.com/v1/settings/irp/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://billing.example.com/v1/settings/irp/test"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://billing.example.com/v1/settings/irp/test")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/settings/irp/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}