> 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 full documentation content, see https://docs.sqril.io/llms-full.txt.

# Decode QR

POST https://api.sqril.com/decodeQr
Content-Type: application/json

Decodes a QR code string and returns a decode response with the fields needed for **getQuotation** and **executePayout**.

**Flow:**

1. Authenticates the request and verifies `customer_id` exists under your account (registered via `registerCustomer`).
    
2. Derives routing hints from the QR, then **parses and enriches the QR string through country-appropriate local payment providers.**
    
3. Validates supported country/currency for the QR against your account configuration (`INVALID_COUNTRY_CODE`, `INVALID_CURRENCY` when not allowed).
    
4. Computes `is_dynamic` and `is_business` from provider QR metadata when available, otherwise from fallback rules on the decoded data.
    
5. Creates a **PENDING** transaction and returns `tx_id`.
    

**Authentication:**

- **REQUIRED**: Basic Auth: `Authorization: Basic base64(client_id:client_secret)`.
    
- Body-based `client_id` / `client_secret` is deprecated and **not supported**.
    
- Exchange app identity comes from authentication (do not rely on a body `exchange_app_id`).
    

**Request body**

- `qr_string` (string, **required**)
    
- `customer_id` (string, **required**)
    
    - be provided in request body,
        
    - not contain `/`,
        
    - exist under your account's `registered_customers`, and
        
    - match the `customer_id` bound to the transaction.
        
- `partner_transaction_id` (string, optional)
    
- `payment_currency` (string, optional): ISO 4217. For **Indonesia**, required when currency cannot be resolved from the QR; otherwise **400** with `payment_currency is required for Indonesia QR decode (or provide a QR that includes currency)`.
    
- `wallet_identifier` (string, optional): stored on the transaction when provided.
    

**Response (200 JSON)** — curated public fields only (no internal `_`\-prefixed blobs).

- `is_dynamic`, `is_business`, `amount`, `merchant`, `country`, `tx_id`, `currency`, `partner_transaction_id` (empty string if not sent)
    
- `missing_fields` (optional): machine-readable schemas for required data not yet satisfied
    
- `suggested_values` (optional): hints keyed by field paths for UI prefill
    
- `sender` / `recipient` (optional): grouped echoes when meaningful after decode
    
- When `amount` > **0** and pricing succeeds: `amount_usd`, `fee`, `percentage_fee`, `fixed_fee` (USD values rounded to **2** decimal places in JSON). `exchange_rate` is **not** returned here (use **getQuotation** / **executePayout** for rate details).
    

**Bank terminology:** Prefer grouped `recipient.bank_no`; legacy flat keys are mapped internally.

**Currency precision:** Decimal amounts follow the currency table in this collection overview.

**Payout flow:** **decodeQr** → **getQuotation** (recommended when locking fees/amount) → **executePayout**.

**Note:** Stored `qr_data` may include provider-internal fields; they are not returned on this endpoint.

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /decodeQr:
    post:
      operationId: decode-qr
      summary: Decode QR
      description: >-
        Decodes a QR code string and returns a decode response with the fields
        needed for **getQuotation** and **executePayout**.


        **Flow:**


        1. Authenticates the request and verifies `customer_id` exists under
        your account (registered via `registerCustomer`).
            
        2. Derives routing hints from the QR, then **parses and enriches the QR
        string through country-appropriate local payment providers.**
            
        3. Validates supported country/currency for the QR against your account
        configuration (`INVALID_COUNTRY_CODE`, `INVALID_CURRENCY` when not
        allowed).
            
        4. Computes `is_dynamic` and `is_business` from provider QR metadata
        when available, otherwise from fallback rules on the decoded data.
            
        5. Creates a **PENDING** transaction and returns `tx_id`.
            

        **Authentication:**


        - **REQUIRED**: Basic Auth: `Authorization: Basic
        base64(client_id:client_secret)`.
            
        - Body-based `client_id` / `client_secret` is deprecated and **not
        supported**.
            
        - Exchange app identity comes from authentication (do not rely on a body
        `exchange_app_id`).
            

        **Request body**


        - `qr_string` (string, **required**)
            
        - `customer_id` (string, **required**)
            
            - be provided in request body,
                
            - not contain `/`,
                
            - exist under your account's `registered_customers`, and
                
            - match the `customer_id` bound to the transaction.
                
        - `partner_transaction_id` (string, optional)
            
        - `payment_currency` (string, optional): ISO 4217. For **Indonesia**,
        required when currency cannot be resolved from the QR; otherwise **400**
        with `payment_currency is required for Indonesia QR decode (or provide a
        QR that includes currency)`.
            
        - `wallet_identifier` (string, optional): stored on the transaction when
        provided.
            

        **Response (200 JSON)** — curated public fields only (no internal
        `_`\-prefixed blobs).


        - `is_dynamic`, `is_business`, `amount`, `merchant`, `country`, `tx_id`,
        `currency`, `partner_transaction_id` (empty string if not sent)
            
        - `missing_fields` (optional): machine-readable schemas for required
        data not yet satisfied
            
        - `suggested_values` (optional): hints keyed by field paths for UI
        prefill
            
        - `sender` / `recipient` (optional): grouped echoes when meaningful
        after decode
            
        - When `amount` > **0** and pricing succeeds: `amount_usd`, `fee`,
        `percentage_fee`, `fixed_fee` (USD values rounded to **2** decimal
        places in JSON). `exchange_rate` is **not** returned here (use
        **getQuotation** / **executePayout** for rate details).
            

        **Bank terminology:** Prefer grouped `recipient.bank_no`; legacy flat
        keys are mapped internally.


        **Currency precision:** Decimal amounts follow the currency table in
        this collection overview.


        **Payout flow:** **decodeQr** → **getQuotation** (recommended when
        locking fees/amount) → **executePayout**.


        **Note:** Stored `qr_data` may include provider-internal fields; they
        are not returned on this endpoint.
      tags:
        - subpackage_payoutEndpoints
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payout Endpoints_Decode QR_Response_200'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDecodeqrRequestBadRequestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                qr_string:
                  type: string
                payment_currency:
                  type: string
                partner_transaction_id:
                  type: string
                customer_id:
                  type: string
              required:
                - qr_string
                - payment_currency
                - partner_transaction_id
                - customer_id
servers:
  - url: https://api.sqril.com
  - url: https://your-app.com
components:
  schemas:
    Payout Endpoints_Decode QR_Response_200:
      type: object
      properties:
        is_dynamic:
          type: boolean
        is_business:
          type: boolean
        amount:
          type: integer
        merchant:
          type: string
        country:
          type: string
        tx_id:
          type: string
        currency:
          type: string
        partner_transaction_id:
          type: string
        amount_usd:
          type: number
          format: double
        fee:
          type: number
          format: double
        percentage_fee:
          type: number
          format: double
        fixed_fee:
          type: number
          format: double
      required:
        - is_dynamic
        - is_business
        - amount
        - merchant
        - country
        - tx_id
        - currency
        - partner_transaction_id
        - amount_usd
        - fee
        - percentage_fee
        - fixed_fee
      title: Payout Endpoints_Decode QR_Response_200
    DecodeQrPostResponsesContentApplicationJsonSchemaErrorDetails:
      type: object
      properties:
        missing_fields:
          type: array
          items:
            type: string
      required:
        - missing_fields
      title: DecodeQrPostResponsesContentApplicationJsonSchemaErrorDetails
    DecodeQrPostResponsesContentApplicationJsonSchemaError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          $ref: >-
            #/components/schemas/DecodeQrPostResponsesContentApplicationJsonSchemaErrorDetails
      required:
        - code
        - message
        - details
      title: DecodeQrPostResponsesContentApplicationJsonSchemaError
    PostDecodeqrRequestBadRequestError:
      type: object
      properties:
        success:
          type: boolean
        error:
          $ref: >-
            #/components/schemas/DecodeQrPostResponsesContentApplicationJsonSchemaError
      required:
        - success
        - error
      title: PostDecodeqrRequestBadRequestError

```

## SDK Code Examples

```python Success - 200 OK (Static Amount)
import requests

url = "https://api.sqril.com/decodeQr"

headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Success - 200 OK (Static Amount)
const url = 'https://api.sqril.com/decodeQr';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: undefined};

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

```go Success - 200 OK (Static Amount)
package main

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

func main() {

	url := "https://api.sqril.com/decodeQr"

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

	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 Success - 200 OK (Static Amount)
require 'uri'
require 'net/http'

url = URI("https://api.sqril.com/decodeQr")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'

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

```java Success - 200 OK (Static Amount)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sqril.com/decodeQr")
  .header("Content-Type", "application/json")
  .asString();
```

```php Success - 200 OK (Static Amount)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sqril.com/decodeQr', [
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Success - 200 OK (Static Amount)
using RestSharp;

var client = new RestClient("https://api.sqril.com/decodeQr");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Static Amount)
import Foundation

let headers = ["Content-Type": "application/json"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sqril.com/decodeQr")! 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()
```

```python Success - 200 OK (Dynamic Amount)
import requests

url = "https://api.sqril.com/decodeQr"

headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Success - 200 OK (Dynamic Amount)
const url = 'https://api.sqril.com/decodeQr';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: undefined};

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 Amount)
package main

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

func main() {

	url := "https://api.sqril.com/decodeQr"

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

	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 Success - 200 OK (Dynamic Amount)
require 'uri'
require 'net/http'

url = URI("https://api.sqril.com/decodeQr")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'

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

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

HttpResponse<String> response = Unirest.post("https://api.sqril.com/decodeQr")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sqril.com/decodeQr', [
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Success - 200 OK (Dynamic Amount)
using RestSharp;

var client = new RestClient("https://api.sqril.com/decodeQr");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Dynamic Amount)
import Foundation

let headers = ["Content-Type": "application/json"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sqril.com/decodeQr")! 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()
```

```python Success - 200 OK (with missing_fields)
import requests

url = "https://api.sqril.com/decodeQr"

headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Success - 200 OK (with missing_fields)
const url = 'https://api.sqril.com/decodeQr';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: undefined};

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

```go Success - 200 OK (with missing_fields)
package main

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

func main() {

	url := "https://api.sqril.com/decodeQr"

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

	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 Success - 200 OK (with missing_fields)
require 'uri'
require 'net/http'

url = URI("https://api.sqril.com/decodeQr")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'

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

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

HttpResponse<String> response = Unirest.post("https://api.sqril.com/decodeQr")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sqril.com/decodeQr', [
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Success - 200 OK (with missing_fields)
using RestSharp;

var client = new RestClient("https://api.sqril.com/decodeQr");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (with missing_fields)
import Foundation

let headers = ["Content-Type": "application/json"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sqril.com/decodeQr")! 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()
```

```python Success - 200 OK (Indonesia ID/IDR with full sender details)
import requests

url = "https://api.sqril.com/decodeQr"

headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Success - 200 OK (Indonesia ID/IDR with full sender details)
const url = 'https://api.sqril.com/decodeQr';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: undefined};

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

```go Success - 200 OK (Indonesia ID/IDR with full sender details)
package main

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

func main() {

	url := "https://api.sqril.com/decodeQr"

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

	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 Success - 200 OK (Indonesia ID/IDR with full sender details)
require 'uri'
require 'net/http'

url = URI("https://api.sqril.com/decodeQr")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'

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

```java Success - 200 OK (Indonesia ID/IDR with full sender details)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sqril.com/decodeQr")
  .header("Content-Type", "application/json")
  .asString();
```

```php Success - 200 OK (Indonesia ID/IDR with full sender details)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sqril.com/decodeQr', [
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Success - 200 OK (Indonesia ID/IDR with full sender details)
using RestSharp;

var client = new RestClient("https://api.sqril.com/decodeQr");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Success - 200 OK (Indonesia ID/IDR with full sender details)
import Foundation

let headers = ["Content-Type": "application/json"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sqril.com/decodeQr")! 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()
```

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

url = "https://api.sqril.com/decodeQr"

headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Success - 200 OK (Vietnam with Recipient Fields)
const url = 'https://api.sqril.com/decodeQr';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: undefined};

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 Fields)
package main

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

func main() {

	url := "https://api.sqril.com/decodeQr"

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

	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 Success - 200 OK (Vietnam with Recipient Fields)
require 'uri'
require 'net/http'

url = URI("https://api.sqril.com/decodeQr")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'

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

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

HttpResponse<String> response = Unirest.post("https://api.sqril.com/decodeQr")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sqril.com/decodeQr', [
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Success - 200 OK (Vietnam with Recipient Fields)
using RestSharp;

var client = new RestClient("https://api.sqril.com/decodeQr");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

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

let headers = ["Content-Type": "application/json"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sqril.com/decodeQr")! 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()
```

```python Payout Endpoints_Decode QR_example
import requests

url = "https://api.sqril.com/decodeQr"

payload = {
    "qr_string": "00020101021230580002ID520412345303360540510000.005802ID5913MERCHANT NAME6010JAKARTA61051234562070703A016304ABCD",
    "payment_currency": "IDR",
    "partner_transaction_id": "partner_tx_123",
    "customer_id": "{{customer_id}}"
}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Payout Endpoints_Decode QR_example
const url = 'https://api.sqril.com/decodeQr';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"qr_string":"00020101021230580002ID520412345303360540510000.005802ID5913MERCHANT NAME6010JAKARTA61051234562070703A016304ABCD","payment_currency":"IDR","partner_transaction_id":"partner_tx_123","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 Payout Endpoints_Decode QR_example
package main

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

func main() {

	url := "https://api.sqril.com/decodeQr"

	payload := strings.NewReader("{\n  \"qr_string\": \"00020101021230580002ID520412345303360540510000.005802ID5913MERCHANT NAME6010JAKARTA61051234562070703A016304ABCD\",\n  \"payment_currency\": \"IDR\",\n  \"partner_transaction_id\": \"partner_tx_123\",\n  \"customer_id\": \"{{customer_id}}\"\n}")

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

	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 Payout Endpoints_Decode QR_example
require 'uri'
require 'net/http'

url = URI("https://api.sqril.com/decodeQr")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"qr_string\": \"00020101021230580002ID520412345303360540510000.005802ID5913MERCHANT NAME6010JAKARTA61051234562070703A016304ABCD\",\n  \"payment_currency\": \"IDR\",\n  \"partner_transaction_id\": \"partner_tx_123\",\n  \"customer_id\": \"{{customer_id}}\"\n}"

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

```java Payout Endpoints_Decode QR_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sqril.com/decodeQr")
  .header("Content-Type", "application/json")
  .body("{\n  \"qr_string\": \"00020101021230580002ID520412345303360540510000.005802ID5913MERCHANT NAME6010JAKARTA61051234562070703A016304ABCD\",\n  \"payment_currency\": \"IDR\",\n  \"partner_transaction_id\": \"partner_tx_123\",\n  \"customer_id\": \"{{customer_id}}\"\n}")
  .asString();
```

```php Payout Endpoints_Decode QR_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sqril.com/decodeQr', [
  'body' => '{
  "qr_string": "00020101021230580002ID520412345303360540510000.005802ID5913MERCHANT NAME6010JAKARTA61051234562070703A016304ABCD",
  "payment_currency": "IDR",
  "partner_transaction_id": "partner_tx_123",
  "customer_id": "{{customer_id}}"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Payout Endpoints_Decode QR_example
using RestSharp;

var client = new RestClient("https://api.sqril.com/decodeQr");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"qr_string\": \"00020101021230580002ID520412345303360540510000.005802ID5913MERCHANT NAME6010JAKARTA61051234562070703A016304ABCD\",\n  \"payment_currency\": \"IDR\",\n  \"partner_transaction_id\": \"partner_tx_123\",\n  \"customer_id\": \"{{customer_id}}\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Payout Endpoints_Decode QR_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "qr_string": "00020101021230580002ID520412345303360540510000.005802ID5913MERCHANT NAME6010JAKARTA61051234562070703A016304ABCD",
  "payment_currency": "IDR",
  "partner_transaction_id": "partner_tx_123",
  "customer_id": "{{customer_id}}"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sqril.com/decodeQr")! 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()
```