Skip to main content
POST
/
loon
/
rtau
/
inquiry
cURL
curl --request POST \
  --url https://services.sandbox.pagosapi.com/loon/rtau/inquiry \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-merchant-id: <x-merchant-id>' \
  --data '
{
  "requestId": "unique-uuid",
  "network": "visa",
  "account": {
    "accountNumber": "4111111111111111",
    "expiryYear": "2019",
    "expiryMonth": "12",
    "metadata": null
  },
  "subMerchantId": null
}
'
import requests

url = "https://services.sandbox.pagosapi.com/loon/rtau/inquiry"

payload = {
"requestId": "unique-uuid",
"network": "visa",
"account": {
"accountNumber": "4111111111111111",
"expiryYear": "2019",
"expiryMonth": "12",
"metadata": None
},
"subMerchantId": None
}
headers = {
"x-merchant-id": "<x-merchant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-merchant-id': '<x-merchant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
requestId: 'unique-uuid',
network: 'visa',
account: {
accountNumber: '4111111111111111',
expiryYear: '2019',
expiryMonth: '12',
metadata: null
},
subMerchantId: null
})
};

fetch('https://services.sandbox.pagosapi.com/loon/rtau/inquiry', 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://services.sandbox.pagosapi.com/loon/rtau/inquiry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requestId' => 'unique-uuid',
'network' => 'visa',
'account' => [
'accountNumber' => '4111111111111111',
'expiryYear' => '2019',
'expiryMonth' => '12',
'metadata' => null
],
'subMerchantId' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-merchant-id: <x-merchant-id>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://services.sandbox.pagosapi.com/loon/rtau/inquiry"

payload := strings.NewReader("{\n \"requestId\": \"unique-uuid\",\n \"network\": \"visa\",\n \"account\": {\n \"accountNumber\": \"4111111111111111\",\n \"expiryYear\": \"2019\",\n \"expiryMonth\": \"12\",\n \"metadata\": null\n },\n \"subMerchantId\": null\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-merchant-id", "<x-merchant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://services.sandbox.pagosapi.com/loon/rtau/inquiry")
.header("x-merchant-id", "<x-merchant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"unique-uuid\",\n \"network\": \"visa\",\n \"account\": {\n \"accountNumber\": \"4111111111111111\",\n \"expiryYear\": \"2019\",\n \"expiryMonth\": \"12\",\n \"metadata\": null\n },\n \"subMerchantId\": null\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://services.sandbox.pagosapi.com/loon/rtau/inquiry")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-merchant-id"] = '<x-merchant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requestId\": \"unique-uuid\",\n \"network\": \"visa\",\n \"account\": {\n \"accountNumber\": \"4111111111111111\",\n \"expiryYear\": \"2019\",\n \"expiryMonth\": \"12\",\n \"metadata\": null\n },\n \"subMerchantId\": null\n}"

response = http.request(request)
puts response.read_body
{
  "accountEncrypted": null,
  "account": {
    "accountNumber": "4111111111111111",
    "expiryYear": "2019",
    "expiryMonth": "12",
    "newAccountNumber": "4111111111111234",
    "newExpiryYear": "2029",
    "newExpiryMonth": "5",
    "responseCode": "LAE",
    "errorCode": null,
    "metadata": null
  },
  "requestId": "unique-uuid"
}
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}

Authorizations

Authorization
string
header
required

Format is: Bearer <api_key>, where <api_key> is your Pagos API key

Headers

x-merchant-id
string
required

Merchant identifier for requests.

Body

application/json
requestId
string
required
Minimum string length: 1
network
string
required
Minimum string length: 1
account
object | null
subMerchantId
string | null

Response

Success

accountEncrypted
string | null
account
object | null
requestId
string