sandbox

Bank list

POST/data/bank-listTry it in Swagger →

Sandbox https://test.lintaspay.xyz/data/bank-list · Production https://lintaspay.xyz/data/bank-list

Lists the banks / virtual accounts (type = 1) or e-wallets (type = 2) you can pay out to. Use bank_id as bankId.

Request

Headers

HeaderRequiredValue
Content-Typerequiredapplication/json
AuthorizationrequiredLINTASPAY-SHA256withRSA app_id=…,nonce=…,timestamp=…,sign=… — see Signing requests
lintaspay-request-idrequiredUnique request id, [A-Za-z0-9_-], max 64

Body parameters

NameTypeRequiredDescription
typeintegerrequired1 banks & virtual accounts, 2 e-wallets.
Example: 1

Example

{
  "type": 1
}

Response

HTTP 200 with the envelope {"code", "message", "data"}. code = 0 means success; otherwise data is null and code is an error code. Authentication failures return HTTP 401 (403 for a blocked IP, 429 when rate-limited). Always verify the response signature.

data fields

NameTypeDescription
totalinteger
Example: 1
listarray[object]
bank_idintegerUse as bankId.
Example: 1
bank_namestring
Example: BANK BCA
typeinteger1 bank/VA, 2 e-wallet.
Example: 1

Examples

{
  "code": 0,
  "message": "success",
  "data": {
    "total": 1,
    "list": [
      {
        "bank_id": 1,
        "bank_name": "BANK BCA",
        "type": 1
      }
    ]
  }
}
{
  "code": 10011304,
  "message": "Signature verification failed",
  "data": null
}

Code samples

URL_PATH=/data/bank-list
BODY='{"type":1}'
AUTH="app_id=$APP_ID,nonce=$(openssl rand -hex 16),timestamp=$(date +%s)000"
SIGN=$(printf '%s\nPOST\n%s\n%s\n' "$AUTH" "$URL_PATH" "$BODY" \
  | openssl dgst -sha256 -sign merchant_private_key.pem | base64 | tr -d '\n')

curl -sS -X POST "https://test.lintaspay.xyz$URL_PATH" \
  -H 'Content-Type: application/json' \
  -H "Authorization: LINTASPAY-SHA256withRSA $AUTH,sign=$SIGN" \
  -H "lintaspay-request-id: $(openssl rand -hex 16)" \
  -d "$BODY"
// call() is defined on the Signing requests page
const res = await call('/data/bank-list', {
  "type": 1
});
if (res.code !== 0) throw new Error(`${res.code} ${res.message}`);
console.log(res.data);
# call() is defined on the Signing requests page
res = call("/data/bank-list", {
  "type": 1
})
if res["code"] != 0:
    raise RuntimeError(f"{res['code']} {res['message']}")
print(res["data"])
<?php
// api_call() is defined on the Signing requests page
$res = api_call('/data/bank-list', json_decode('{"type":1}', true));
if ($res['code'] !== 0) {
    throw new RuntimeException($res['code'] . ' ' . $res['message']);
}
print_r($res['data']);
// ApiClient is defined on the Signing requests page
ApiClient client = new ApiClient();
String body = "{\"type\":1}";
String res = client.call("/data/bank-list", body);
System.out.println(res);