> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.sqril.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sqril.io/_mcp/server.

# Decode QR Unregistered

POST https://stg-api.sqril.io/decodeQrUnregistered
Content-Type: application/json

Identical to **decodeQr** but requires no `customer_id` and no registered customer. Use it when you want to decode a QR before the sender is registered, for example to show the merchant name and amount up front.

- `customer_id` is ignored if sent.
- The customer is attached at **executePayout**, which still requires a registered customer before any balance is locked.
- On corridors where the verified recipient name comes from a payment network lookup that requires the registered sender (LATAM: AR, BR, PE, BO, CO), `merchant` returns the QR's own label instead of the verified account holder. Decode with a registered `customer_id` when you need the verified name.
- Not available for Thailand (TH): that corridor needs the registered payer at decode time, so the call answers `400 INVALID_REQUEST` (`customer_id is required to decode this QR`). Decode Thai QRs with **decodeQr** and a `customer_id`.
- `missing_fields` may be omitted on some corridors; the required sender fields are still recorded on the transaction and enforced at **executePayout**.

Same authentication and request body as **decodeQr** otherwise.

Reference: https://docs.sqril.io/sqril-saa-s-api/payout-endpoints/decode-qr-unregistered

## Authentication

- `Authorization` header (basic auth, required) — Basic Auth: base64(client_id:client_secret)

## Request

### Query parameters

- `dp` (integer, optional, default: 2) — Decimal places for monetary fields in the response (USD amounts, fees, exchange rates). Default 2, which rounds sub-cent fees to 0. Use dp=4 or higher to reconcile against exact deducted totals: at full precision amount_usd + percentage_fee + fixed_fee equals the amount deducted from your balance. Rounding is applied to the response only; all stored values and balance deductions always use full precision.

### Body (application/json)

This endpoint expects an object.

- `qr_string` (string, required) — EMV / local QR string, or for KE/TZ a numeric till/paybill number.
- `customer_id` (string, optional) — Ignored on this endpoint. The customer is attached at executePayout instead.
- `partner_transaction_id` (string, optional)
- `partner_app_id` (string, optional) — Optional partner sub-app id (1–64 chars, [a-zA-Z0-9_-]). Body value wins over the customer profile value.
- `payment_currency` (string, optional) — ISO 4217 source currency when it cannot be resolved from the QR.
- `wallet_identifier` (string, optional)
- `country_code` (string, optional) — ISO alpha-2 override. Required when QR is not EMV-parseable (e.g. BO encrypted QR, or KE/TZ + merchant_id).
- `merchant_id` (string, optional) — Till or paybill number for KE/TZ, typed instead of scanned, via decodeQr. Prefer /lookupPaymentCode for the same flow.
- `account_reference` (string, optional) — Paybill account reference: the account, bill or customer number the paybill expects. Required for Kenya paybills (returned in missing_fields when absent); optional for TZ.

## Response

### 200

OK

- `is_dynamic` (boolean, optional)
- `is_business` (boolean, optional)
- `amount` (double, optional)
- `merchant` (string, optional)
- `merchant_id` (string, optional) — Africa (KE/TZ) till or paybill number when returned.
- `merchant_name` (string, optional) — Africa (KE/TZ) verified merchant display name when returned.
- `payment_type` (enum, optional) — Africa (KE/TZ) payment destination type when returned.
  - Allowed values: `till`, `paybill`
- `merchant_info` (DecodeQrUnregisteredPostResponsesContentApplicationJsonSchemaMerchantInfo, optional) — Africa (KE/TZ) merchant metadata when returned.
- `country` (string, optional)
- `tx_id` (string, optional)
- `currency` (string, optional)
- `partner_transaction_id` (string, optional)
- `amount_usd` (double, optional)
- `fee` (double, optional)
- `percentage_fee` (double, optional)
- `fixed_fee` (double, optional)
- `missing_fields` (list of map from string to any, optional)
- `suggested_values` (map from string to any, optional)
- `sender` (map from string to any, optional)
- `recipient` (map from string to any, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error_code` (string, optional)
- `error_message` (string, optional)
- `error` (string, optional)
- `details` (map from string to any, optional)

## Types

### DecodeQrUnregisteredPostResponsesContentApplicationJsonSchemaMerchantInfo

Africa (KE/TZ) merchant metadata when returned.

- `merchant_id` (string, optional)
- `display_name` (string, optional)
- `country_code` (string, optional)
- `payment_type` (enum, optional)
  - Allowed values: `till`, `paybill`
- `lipa_number` (string, optional)
- `account_reference` (string, optional)

## Examples

### Success - 200 OK (Dynamic / open amount)

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python Success - 200 OK (Dynamic / open amount)
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Success - 200 OK (Dynamic / open amount)
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success - 200 OK (Dynamic / open amount)
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success - 200 OK (Dynamic / open amount)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Success - 200 OK (Dynamic / open amount)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Success - 200 OK (Dynamic / open amount)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Success - 200 OK (Dynamic / open amount)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Dynamic / open amount)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Success - 200 OK (Vietnam with recipient)

**Response**

```json
{
  "is_dynamic": false,
  "is_business": true,
  "amount": 100000,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "recipient": {
    "name": "MERCHANT NAME",
    "account_no": "1234567890",
    "bank_no": "970415"
  }
}
```

**SDK Code**

```python Success - 200 OK (Vietnam with recipient)
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Success - 200 OK (Vietnam with recipient)
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success - 200 OK (Vietnam with recipient)
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success - 200 OK (Vietnam with recipient)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Success - 200 OK (Vietnam with recipient)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Success - 200 OK (Vietnam with recipient)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Success - 200 OK (Vietnam with recipient)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Vietnam with recipient)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Success - 200 OK (Africa Kenya till)

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT DISPLAY NAME",
  "merchant_id": "888880",
  "merchant_name": "MERCHANT DISPLAY NAME",
  "payment_type": "till",
  "merchant_info": {
    "merchant_id": "888880",
    "display_name": "MERCHANT DISPLAY NAME",
    "country_code": "KE",
    "payment_type": "till",
    "lipa_number": "888880"
  },
  "country": "KE",
  "tx_id": "tx_1234567890_abc123",
  "currency": "KES",
  "partner_transaction_id": ""
}
```

**SDK Code**

```python Success - 200 OK (Africa Kenya till)
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Success - 200 OK (Africa Kenya till)
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success - 200 OK (Africa Kenya till)
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success - 200 OK (Africa Kenya till)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Success - 200 OK (Africa Kenya till)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Success - 200 OK (Africa Kenya till)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Success - 200 OK (Africa Kenya till)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Africa Kenya till)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Success - 200 OK (Argentina EMV QR)

**Response**

```json
{
  "is_dynamic": false,
  "is_business": true,
  "amount": 1500.5,
  "merchant": "COMERCIO AR",
  "country": "AR",
  "tx_id": "tx_1234567890_abc123",
  "currency": "ARS",
  "partner_transaction_id": "",
  "amount_usd": 1.25,
  "fee": 0.15,
  "percentage_fee": 0.1,
  "fixed_fee": 0.05
}
```

**SDK Code**

```python Success - 200 OK (Argentina EMV QR)
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Success - 200 OK (Argentina EMV QR)
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success - 200 OK (Argentina EMV QR)
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success - 200 OK (Argentina EMV QR)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Success - 200 OK (Argentina EMV QR)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Success - 200 OK (Argentina EMV QR)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Success - 200 OK (Argentina EMV QR)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Argentina EMV QR)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Success - 200 OK (Brazil PIX via lookupPaymentCode)

**Response**

```json
{
  "is_dynamic": false,
  "is_business": false,
  "amount": 0,
  "merchant": "",
  "country": "BR",
  "tx_id": "tx_1234567890_abc123",
  "currency": "BRL",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python Success - 200 OK (Brazil PIX via lookupPaymentCode)
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Success - 200 OK (Brazil PIX via lookupPaymentCode)
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success - 200 OK (Brazil PIX via lookupPaymentCode)
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success - 200 OK (Brazil PIX via lookupPaymentCode)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Success - 200 OK (Brazil PIX via lookupPaymentCode)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Success - 200 OK (Brazil PIX via lookupPaymentCode)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Success - 200 OK (Brazil PIX via lookupPaymentCode)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Brazil PIX via lookupPaymentCode)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Success - 200 OK (Nigeria bank account via lookupPaymentCode)

**Response**

```json
{
  "is_dynamic": false,
  "is_business": false,
  "amount": 5000,
  "merchant": "",
  "country": "NG",
  "tx_id": "tx_1234567890_abc123",
  "currency": "NGN",
  "partner_transaction_id": "",
  "recipient": {
    "account_no": "0123456789",
    "bank_no": "058"
  }
}
```

**SDK Code**

```python Success - 200 OK (Nigeria bank account via lookupPaymentCode)
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Success - 200 OK (Nigeria bank account via lookupPaymentCode)
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success - 200 OK (Nigeria bank account via lookupPaymentCode)
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success - 200 OK (Nigeria bank account via lookupPaymentCode)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Success - 200 OK (Nigeria bank account via lookupPaymentCode)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Success - 200 OK (Nigeria bank account via lookupPaymentCode)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Success - 200 OK (Nigeria bank account via lookupPaymentCode)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Nigeria bank account via lookupPaymentCode)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)

**Response**

```json
{
  "error_code": "CUSTOMER_NOT_ELIGIBLE",
  "error_message": "Customer {{customer_id}} cannot transact to PE until required sender profile fields are completed. Use the updateCustomer API to add or update the missing sender data, then retry decode.",
  "details": {
    "customer_id": "{{customer_id}}",
    "country": "PE",
    "missing_sender_fields": [
      {
        "field": "sender.occupation",
        "type": "text",
        "required": true
      },
      {
        "field": "sender.email",
        "type": "email",
        "required": true
      },
      {
        "field": "sender.phone",
        "type": "phone",
        "required": true
      },
      {
        "field": "sender.gender",
        "type": "select",
        "required": true
      }
    ]
  }
}
```

**SDK Code**

```python Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Error - 400 CUSTOMER_NOT_ELIGIBLE (Peru sender incomplete)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Error - 400 INVALID_COUNTRY_CODE

**Response**

```json
{
  "error_code": "INVALID_COUNTRY_CODE",
  "error_message": "Invalid or unsupported country code for this account."
}
```

**SDK Code**

```python Error - 400 INVALID_COUNTRY_CODE
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Error - 400 INVALID_COUNTRY_CODE
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Error - 400 INVALID_COUNTRY_CODE
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Error - 400 INVALID_COUNTRY_CODE
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Error - 400 INVALID_COUNTRY_CODE
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Error - 400 INVALID_COUNTRY_CODE
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Error - 400 INVALID_COUNTRY_CODE
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Error - 400 INVALID_COUNTRY_CODE
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Error - 400 Missing qr_string

**Response**

```json
{
  "error_code": "MISSING_REQUIRED_FIELD",
  "error_message": "qr_string is required"
}
```

**SDK Code**

```python Error - 400 Missing qr_string
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Error - 400 Missing qr_string
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Error - 400 Missing qr_string
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Error - 400 Missing qr_string
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Error - 400 Missing qr_string
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Error - 400 Missing qr_string
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Error - 400 Missing qr_string
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Error - 400 Missing qr_string
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Error - 400 typed destination must use lookupPaymentCode

**Response**

```json
{
  "error_code": "INVALID_REQUEST",
  "error_message": "Typed/manual payment destinations (PIX key, phone, bank account, BREB key) must be initiated via /lookupPaymentCode, not /decodeQr."
}
```

**SDK Code**

```python Error - 400 typed destination must use lookupPaymentCode
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

response = requests.post(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Error - 400 typed destination must use lookupPaymentCode
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {method: 'POST', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Error - 400 typed destination must use lookupPaymentCode
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Error - 400 typed destination must use lookupPaymentCode
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Error - 400 typed destination must use lookupPaymentCode
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Error - 400 typed destination must use lookupPaymentCode
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Error - 400 typed destination must use lookupPaymentCode
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

IRestResponse response = client.Execute(request);
```

```swift Error - 400 typed destination must use lookupPaymentCode
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### LATAM — Argentina EMV QR

**Request**

```json
{
  "qr_string": "<ARGENTINA_EMV_QR_3.0_STRING>",
  "customer_id": "{{customer_id}}"
}
```

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python LATAM — Argentina EMV QR
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

payload = {
    "qr_string": "<ARGENTINA_EMV_QR_3.0_STRING>",
    "customer_id": "{{customer_id}}"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript LATAM — Argentina EMV QR
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"qr_string":"<ARGENTINA_EMV_QR_3.0_STRING>","customer_id":"{{customer_id}}"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go LATAM — Argentina EMV QR
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

	payload := strings.NewReader("{\n  \"qr_string\": \"<ARGENTINA_EMV_QR_3.0_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby LATAM — Argentina EMV QR
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"qr_string\": \"<ARGENTINA_EMV_QR_3.0_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}"

response = http.request(request)
puts response.read_body
```

```java LATAM — Argentina EMV QR
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"qr_string\": \"<ARGENTINA_EMV_QR_3.0_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}")
  .asString();
```

```php LATAM — Argentina EMV QR
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'body' => '{
  "qr_string": "<ARGENTINA_EMV_QR_3.0_STRING>",
  "customer_id": "{{customer_id}}"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp LATAM — Argentina EMV QR
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"qr_string\": \"<ARGENTINA_EMV_QR_3.0_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift LATAM — Argentina EMV QR
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "qr_string": "<ARGENTINA_EMV_QR_3.0_STRING>",
  "customer_id": "{{customer_id}}"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### LATAM — Bolivia Encrypted QR

**Request**

```json
{
  "qr_string": "<BOLIVIA_ENCRYPTED_QR_PAYLOAD>",
  "customer_id": "{{customer_id}}",
  "country_code": "BO"
}
```

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python LATAM — Bolivia Encrypted QR
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

payload = {
    "qr_string": "<BOLIVIA_ENCRYPTED_QR_PAYLOAD>",
    "customer_id": "{{customer_id}}",
    "country_code": "BO"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript LATAM — Bolivia Encrypted QR
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"qr_string":"<BOLIVIA_ENCRYPTED_QR_PAYLOAD>","customer_id":"{{customer_id}}","country_code":"BO"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go LATAM — Bolivia Encrypted QR
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

	payload := strings.NewReader("{\n  \"qr_string\": \"<BOLIVIA_ENCRYPTED_QR_PAYLOAD>\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"BO\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby LATAM — Bolivia Encrypted QR
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"qr_string\": \"<BOLIVIA_ENCRYPTED_QR_PAYLOAD>\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"BO\"\n}"

response = http.request(request)
puts response.read_body
```

```java LATAM — Bolivia Encrypted QR
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"qr_string\": \"<BOLIVIA_ENCRYPTED_QR_PAYLOAD>\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"BO\"\n}")
  .asString();
```

```php LATAM — Bolivia Encrypted QR
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'body' => '{
  "qr_string": "<BOLIVIA_ENCRYPTED_QR_PAYLOAD>",
  "customer_id": "{{customer_id}}",
  "country_code": "BO"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp LATAM — Bolivia Encrypted QR
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"qr_string\": \"<BOLIVIA_ENCRYPTED_QR_PAYLOAD>\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"BO\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift LATAM — Bolivia Encrypted QR
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "qr_string": "<BOLIVIA_ENCRYPTED_QR_PAYLOAD>",
  "customer_id": "{{customer_id}}",
  "country_code": "BO"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Thailand — EMV QR

**Request**

```json
{
  "qr_string": "<THAILAND_EMV_QR_STRING>",
  "customer_id": "{{customer_id}}"
}
```

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python Thailand — EMV QR
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

payload = {
    "qr_string": "<THAILAND_EMV_QR_STRING>",
    "customer_id": "{{customer_id}}"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Thailand — EMV QR
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"qr_string":"<THAILAND_EMV_QR_STRING>","customer_id":"{{customer_id}}"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Thailand — EMV QR
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

	payload := strings.NewReader("{\n  \"qr_string\": \"<THAILAND_EMV_QR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Thailand — EMV QR
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"qr_string\": \"<THAILAND_EMV_QR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}"

response = http.request(request)
puts response.read_body
```

```java Thailand — EMV QR
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"qr_string\": \"<THAILAND_EMV_QR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}")
  .asString();
```

```php Thailand — EMV QR
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'body' => '{
  "qr_string": "<THAILAND_EMV_QR_STRING>",
  "customer_id": "{{customer_id}}"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Thailand — EMV QR
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"qr_string\": \"<THAILAND_EMV_QR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Thailand — EMV QR
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "qr_string": "<THAILAND_EMV_QR_STRING>",
  "customer_id": "{{customer_id}}"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Cambodia — KHQR

**Request**

```json
{
  "qr_string": "<CAMBODIA_KHQR_STRING>",
  "customer_id": "{{customer_id}}"
}
```

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python Cambodia — KHQR
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

payload = {
    "qr_string": "<CAMBODIA_KHQR_STRING>",
    "customer_id": "{{customer_id}}"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Cambodia — KHQR
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"qr_string":"<CAMBODIA_KHQR_STRING>","customer_id":"{{customer_id}}"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Cambodia — KHQR
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

	payload := strings.NewReader("{\n  \"qr_string\": \"<CAMBODIA_KHQR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Cambodia — KHQR
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"qr_string\": \"<CAMBODIA_KHQR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}"

response = http.request(request)
puts response.read_body
```

```java Cambodia — KHQR
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"qr_string\": \"<CAMBODIA_KHQR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}")
  .asString();
```

```php Cambodia — KHQR
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'body' => '{
  "qr_string": "<CAMBODIA_KHQR_STRING>",
  "customer_id": "{{customer_id}}"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Cambodia — KHQR
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"qr_string\": \"<CAMBODIA_KHQR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Cambodia — KHQR
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "qr_string": "<CAMBODIA_KHQR_STRING>",
  "customer_id": "{{customer_id}}"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Africa — Kenya till (numeric qr_string)

**Request**

```json
{
  "qr_string": "888880",
  "customer_id": "{{customer_id}}",
  "country_code": "KE"
}
```

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python Africa — Kenya till (numeric qr_string)
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

payload = {
    "qr_string": "888880",
    "customer_id": "{{customer_id}}",
    "country_code": "KE"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Africa — Kenya till (numeric qr_string)
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"qr_string":"888880","customer_id":"{{customer_id}}","country_code":"KE"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Africa — Kenya till (numeric qr_string)
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

	payload := strings.NewReader("{\n  \"qr_string\": \"888880\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"KE\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Africa — Kenya till (numeric qr_string)
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"qr_string\": \"888880\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"KE\"\n}"

response = http.request(request)
puts response.read_body
```

```java Africa — Kenya till (numeric qr_string)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"qr_string\": \"888880\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"KE\"\n}")
  .asString();
```

```php Africa — Kenya till (numeric qr_string)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'body' => '{
  "qr_string": "888880",
  "customer_id": "{{customer_id}}",
  "country_code": "KE"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Africa — Kenya till (numeric qr_string)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"qr_string\": \"888880\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"KE\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Africa — Kenya till (numeric qr_string)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "qr_string": "888880",
  "customer_id": "{{customer_id}}",
  "country_code": "KE"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Africa — Kenya Paybill

**Request**

```json
{
  "qr_string": "123456",
  "customer_id": "{{customer_id}}",
  "country_code": "KE",
  "merchant_id": "<MERCHANT_ID>",
  "account_reference": "ABC123"
}
```

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python Africa — Kenya Paybill
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

payload = {
    "qr_string": "123456",
    "customer_id": "{{customer_id}}",
    "country_code": "KE",
    "merchant_id": "<MERCHANT_ID>",
    "account_reference": "ABC123"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Africa — Kenya Paybill
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"qr_string":"123456","customer_id":"{{customer_id}}","country_code":"KE","merchant_id":"<MERCHANT_ID>","account_reference":"ABC123"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Africa — Kenya Paybill
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

	payload := strings.NewReader("{\n  \"qr_string\": \"123456\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"KE\",\n  \"merchant_id\": \"<MERCHANT_ID>\",\n  \"account_reference\": \"ABC123\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Africa — Kenya Paybill
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"qr_string\": \"123456\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"KE\",\n  \"merchant_id\": \"<MERCHANT_ID>\",\n  \"account_reference\": \"ABC123\"\n}"

response = http.request(request)
puts response.read_body
```

```java Africa — Kenya Paybill
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"qr_string\": \"123456\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"KE\",\n  \"merchant_id\": \"<MERCHANT_ID>\",\n  \"account_reference\": \"ABC123\"\n}")
  .asString();
```

```php Africa — Kenya Paybill
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'body' => '{
  "qr_string": "123456",
  "customer_id": "{{customer_id}}",
  "country_code": "KE",
  "merchant_id": "<MERCHANT_ID>",
  "account_reference": "ABC123"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Africa — Kenya Paybill
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"qr_string\": \"123456\",\n  \"customer_id\": \"{{customer_id}}\",\n  \"country_code\": \"KE\",\n  \"merchant_id\": \"<MERCHANT_ID>\",\n  \"account_reference\": \"ABC123\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Africa — Kenya Paybill
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "qr_string": "123456",
  "customer_id": "{{customer_id}}",
  "country_code": "KE",
  "merchant_id": "<MERCHANT_ID>",
  "account_reference": "ABC123"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Kyrgyzstan — EMV QR

**Request**

```json
{
  "qr_string": "<KYRGYZSTAN_QR_STRING>",
  "customer_id": "{{customer_id}}"
}
```

**Response**

```json
{
  "is_dynamic": true,
  "is_business": true,
  "amount": 0,
  "merchant": "MERCHANT NAME",
  "country": "VN",
  "tx_id": "tx_1234567890_abc123",
  "currency": "VND",
  "partner_transaction_id": "",
  "missing_fields": [
    {
      "field": "amount",
      "type": "numeric",
      "label": "Amount"
    }
  ]
}
```

**SDK Code**

```python Kyrgyzstan — EMV QR
import requests

url = "https://stg-api.sqril.io/decodeQrUnregistered"

payload = {
    "qr_string": "<KYRGYZSTAN_QR_STRING>",
    "customer_id": "{{customer_id}}"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Kyrgyzstan — EMV QR
const url = 'https://stg-api.sqril.io/decodeQrUnregistered';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"qr_string":"<KYRGYZSTAN_QR_STRING>","customer_id":"{{customer_id}}"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Kyrgyzstan — EMV QR
package main

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

func main() {

	url := "https://stg-api.sqril.io/decodeQrUnregistered"

	payload := strings.NewReader("{\n  \"qr_string\": \"<KYRGYZSTAN_QR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}")

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

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Kyrgyzstan — EMV QR
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/decodeQrUnregistered")

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

request = Net::HTTP::Post.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"qr_string\": \"<KYRGYZSTAN_QR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}"

response = http.request(request)
puts response.read_body
```

```java Kyrgyzstan — EMV QR
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://stg-api.sqril.io/decodeQrUnregistered")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"qr_string\": \"<KYRGYZSTAN_QR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}")
  .asString();
```

```php Kyrgyzstan — EMV QR
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://stg-api.sqril.io/decodeQrUnregistered', [
  'body' => '{
  "qr_string": "<KYRGYZSTAN_QR_STRING>",
  "customer_id": "{{customer_id}}"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Kyrgyzstan — EMV QR
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://stg-api.sqril.io/decodeQrUnregistered");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"qr_string\": \"<KYRGYZSTAN_QR_STRING>\",\n  \"customer_id\": \"{{customer_id}}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Kyrgyzstan — EMV QR
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "qr_string": "<KYRGYZSTAN_QR_STRING>",
  "customer_id": "{{customer_id}}"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/decodeQrUnregistered")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```