# QRIS Payment Link - Apply OTT

<figure><img src="https://627965603-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FImVr2HJay0snj5ukhBJK%2Fuploads%2FUsZNYF1Ycbo8U5u7yPlC%2Funknown.png?alt=media&#x26;token=8630f0f2-80f2-46cd-adbe-6ffc722c221c" alt=""><figcaption></figcaption></figure>

## **Method and URL**

`POST` \[BASE\_URL]/wallet-backend/snap/v1.0/qr/apply-ott

Purpose:  Create QRIS payment link for users to scan QRIS and make payment using balance. Use this if you want to use Pivot’s webview.<br>

Authorization:

* B2B Token&#x20;
* B2B2C Token

## **Request**

**Request Header**

<table><thead><tr><th>Header</th><th width="131.34375">Requirement</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>Mandatory</td><td>application/json</td></tr><tr><td>Authorization</td><td>Mandatory</td><td>Bearer {B2B_access_token}</td></tr><tr><td>Authorization-Customer</td><td>Mandatory</td><td>Bearer {B2B2C_access_token}</td></tr><tr><td>X-SIGNATURE</td><td>Mandatory</td><td><p>HMAC signature generated as per SNAP specification</p><p><br></p><p>HMAC_SHA512 (clientSecret, stringToSign) </p><p>stringToSign = HTTPMethod +”:“+ EndpointUrl +":"+ AccessToken +":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":“ + TimeStamp</p></td></tr><tr><td>X-TIMESTAMP</td><td>Mandatory</td><td>Request timestamp in yyyy-MM-dd'T'HH:mm:ssXXX (ISO 8601 with offset)</td></tr><tr><td>X-PARTNER-ID</td><td>Mandatory</td><td>Partner ID assigned by Pivot</td></tr><tr><td>X-EXTERNAL-ID</td><td>Mandatory</td><td>Unique ID per request for idempotency / tracing</td></tr><tr><td>CHANNEL-ID</td><td>Mandatory</td><td>Channel identifier (e.g., 12345)</td></tr></tbody></table>

**Request Body**

```json
{
   "userResources":[
      "OTT"
   ],
   "additionalInfo":{
    "partnerReferenceNo":"ref-20251125004",
    "mode":"JIT",
    "redirectUrl":"https://www.google.com",
    "failedRedirectUrl":"https://www.google.com"
   }
}
```

**Request Parameter Detail**&#x20;

<table><thead><tr><th>Parameter</th><th width="106.0166015625">Data Type</th><th width="112.0263671875">Character Limit</th><th width="129.125">Requirement</th><th>Description</th></tr></thead><tbody><tr><td>userResources</td><td>Array of String</td><td>512</td><td>Mandatory</td><td>Mandatory value OTT</td></tr><tr><td>additionalInfo</td><td>Object</td><td><br></td><td>Optional</td><td>Additional information for custom use that are not provided by SNAP</td></tr><tr><td>partnerReferenceNo</td><td>String</td><td>64</td><td>Mandatory</td><td>Unique reference number generated by the merchant to identify and track the transaction.</td></tr><tr><td>redirectionUrl</td><td>String (URL)</td><td>255</td><td>Mandatory</td><td>URL to redirect the user after the transaction is successfully processed.</td></tr><tr><td>failedRedirectionUrl</td><td>String (URL)</td><td>255</td><td>Optional</td><td>URL to redirect the user if the transaction fails or is canceled.</td></tr><tr><td>mode</td><td>String</td><td>10</td><td>Optional</td><td>Transaction mode. "JIT" (Just-In-Time) means the wallet will be funded only at the moment of payment.</td></tr></tbody></table>

## **Response**

**Response Body**

```json
{
    "additionalInfo": {
        "paymentUrl": "http://localhost:3004/whitelabel/qris-payment?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ3YWxsZXQtYmFja2VuZCIsInN1YiI6Ijk4NzI4MDgxLWZjZTgtNGNkYi04MmJmLTYxYWE2MjU5YzQxYyIsImV4cCI6MTc2NDA2MzIyNiwiaWRlbnRpZmllclZhbHVlIjoiOTg3MjgwODEtZmNlOC00Y2RiLTgyYmYtNjFhYTYyNTljNDFjIiwibWVyY2hhbnRJZCI6IjVmZmQ0NjQzLWQxMjktNDMzZi04NWNiLWNkNWViYjNmMTdhNiIsInNlc3Npb25JZCI6IjAxOWFiYTRlLWVkNzktNzc5NS1hMTZmLTgwZTNhZTBlNTBlMiJ9.R_0RArJTR0fF4WQB5LSVSo7NOaO1Z41bizWZgDze6Ak",
        "urlExpiry": "2025-11-25T16:33:46.138844+07:00"
    },
    "responseCode": "2004900",
    "responseMessage": "Successful",
    "userResources": [
        {
            "resourceType": "OTT",
            "value": "019aba4e-ed79-7795-a16f-80e3ae0e50e2"
        }
    ]
}
```

**Response Parameter Detail**

<table><thead><tr><th>Parameter</th><th width="108.5263671875">Data Type</th><th width="123.892578125">Character Limit</th><th width="123.9833984375">Requirement</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>String</td><td>7</td><td>Mandatory</td><td>Response code. 2005500 indicates success.</td></tr><tr><td>responseMessage</td><td>String</td><td>100</td><td>Mandatory</td><td>Description of the result, e.g., Successful.</td></tr><tr><td>serviceCode</td><td>String</td><td>5</td><td>Mandatory</td><td>Service code (54).</td></tr><tr><td>userResources</td><td>Object</td><td><br></td><td>Optional</td><td><br></td></tr><tr><td>resourceType</td><td>String</td><td>10</td><td>Mandatory</td><td>Default value, e.g., OTT</td></tr><tr><td>value</td><td>String</td><td>64</td><td>Mandatory</td><td>Service provider transaction id  value</td></tr><tr><td>additionalInfo</td><td>Object</td><td><br></td><td>Optional</td><td>Additional information for custom use that are not provided by SNAP</td></tr><tr><td>paymentUrl</td><td>String</td><td>512</td><td>Mandatory</td><td>Link to access webview to do QRIS payment</td></tr><tr><td>urlExpiry</td><td>String (ISO 8601)</td><td>25</td><td>Mandatory</td><td>Expiration date and time of the payment link.</td></tr></tbody></table>

\ <br>
