Create Access Token
curl --request POST \
--url https://api.laikipay.com/v1/merchant/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"merchantId": "mid_lk_9a4f21e0b8c4d29a",
"secretKey": "sk_test_9401ab38f8219cb7d4e320f0a82"
}
'import requests
url = "https://api.laikipay.com/v1/merchant/auth/token"
payload = {
"merchantId": "mid_lk_9a4f21e0b8c4d29a",
"secretKey": "sk_test_9401ab38f8219cb7d4e320f0a82"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
merchantId: 'mid_lk_9a4f21e0b8c4d29a',
secretKey: 'sk_test_9401ab38f8219cb7d4e320f0a82'
})
};
fetch('https://api.laikipay.com/v1/merchant/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.laikipay.com/v1/merchant/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchantId' => 'mid_lk_9a4f21e0b8c4d29a',
'secretKey' => 'sk_test_9401ab38f8219cb7d4e320f0a82'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.laikipay.com/v1/merchant/auth/token"
payload := strings.NewReader("{\n \"merchantId\": \"mid_lk_9a4f21e0b8c4d29a\",\n \"secretKey\": \"sk_test_9401ab38f8219cb7d4e320f0a82\"\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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.laikipay.com/v1/merchant/auth/token")
.header("Content-Type", "application/json")
.body("{\n \"merchantId\": \"mid_lk_9a4f21e0b8c4d29a\",\n \"secretKey\": \"sk_test_9401ab38f8219cb7d4e320f0a82\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.laikipay.com/v1/merchant/auth/token")
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 \"merchantId\": \"mid_lk_9a4f21e0b8c4d29a\",\n \"secretKey\": \"sk_test_9401ab38f8219cb7d4e320f0a82\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbXJjXzAxIiwibWVyY2hhbnRJZCI6Im1pZF9sayIsImVudmlyb25tZW50IjoiVEVTVCIsInR5cGUiOiJtZXJjaGFudF9hcGlfdG9rZW4ifQ...",
"tokenType": "Bearer",
"expiresIn": 900,
"environment": "TEST",
"merchantId": "mid_lk_9a4f21e0b8c4d29a"
},
"timestamp": "2026-10-12T07:10:00.000Z",
"path": "/v1/merchant/auth/token"
}Authentication
Create Access Token
Exchange your Merchant ID and Secret Key for a 15-minute Bearer access token.
POST
/
auth
/
token
Create Access Token
curl --request POST \
--url https://api.laikipay.com/v1/merchant/auth/token \
--header 'Content-Type: application/json' \
--data '
{
"merchantId": "mid_lk_9a4f21e0b8c4d29a",
"secretKey": "sk_test_9401ab38f8219cb7d4e320f0a82"
}
'import requests
url = "https://api.laikipay.com/v1/merchant/auth/token"
payload = {
"merchantId": "mid_lk_9a4f21e0b8c4d29a",
"secretKey": "sk_test_9401ab38f8219cb7d4e320f0a82"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
merchantId: 'mid_lk_9a4f21e0b8c4d29a',
secretKey: 'sk_test_9401ab38f8219cb7d4e320f0a82'
})
};
fetch('https://api.laikipay.com/v1/merchant/auth/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.laikipay.com/v1/merchant/auth/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchantId' => 'mid_lk_9a4f21e0b8c4d29a',
'secretKey' => 'sk_test_9401ab38f8219cb7d4e320f0a82'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.laikipay.com/v1/merchant/auth/token"
payload := strings.NewReader("{\n \"merchantId\": \"mid_lk_9a4f21e0b8c4d29a\",\n \"secretKey\": \"sk_test_9401ab38f8219cb7d4e320f0a82\"\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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.laikipay.com/v1/merchant/auth/token")
.header("Content-Type", "application/json")
.body("{\n \"merchantId\": \"mid_lk_9a4f21e0b8c4d29a\",\n \"secretKey\": \"sk_test_9401ab38f8219cb7d4e320f0a82\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.laikipay.com/v1/merchant/auth/token")
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 \"merchantId\": \"mid_lk_9a4f21e0b8c4d29a\",\n \"secretKey\": \"sk_test_9401ab38f8219cb7d4e320f0a82\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbXJjXzAxIiwibWVyY2hhbnRJZCI6Im1pZF9sayIsImVudmlyb25tZW50IjoiVEVTVCIsInR5cGUiOiJtZXJjaGFudF9hcGlfdG9rZW4ifQ...",
"tokenType": "Bearer",
"expiresIn": 900,
"environment": "TEST",
"merchantId": "mid_lk_9a4f21e0b8c4d29a"
},
"timestamp": "2026-10-12T07:10:00.000Z",
"path": "/v1/merchant/auth/token"
}Exchange your Merchant ID (
mid_lk_...) and Secret API Key (sk_test_... or sk_live_...) for an ephemeral Bearer access token valid for 15 minutes (900 seconds).
Subsequent requests to the Virtual Cards API must include this token in the Authorization: Bearer <accessToken> header.Body
application/json

