List checkout payment methods
curl --request GET \
--url https://api.kawan.digital/v1/payment-methods \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kawan.digital/v1/payment-methods', 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.kawan.digital/v1/payment-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"payment_methods": [
{
"method_key": "duitku:qris",
"kind": "gateway",
"display_name": "QRIS",
"provider": "duitku",
"payment_type": "qris"
}
]
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid Authorization header."
}
}{
"success": false,
"error": {
"code": "PLAN_REQUIRED",
"message": "Public API is not available on this store's plan."
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded."
}
}Payments
List checkout payment methods
Use method_key as payment_method on POST /orders
(for example duitku:qris, seller_bank:{account_id}).
GET
/
payment-methods
List checkout payment methods
curl --request GET \
--url https://api.kawan.digital/v1/payment-methods \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.kawan.digital/v1/payment-methods', 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.kawan.digital/v1/payment-methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"payment_methods": [
{
"method_key": "duitku:qris",
"kind": "gateway",
"display_name": "QRIS",
"provider": "duitku",
"payment_type": "qris"
}
]
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid Authorization header."
}
}{
"success": false,
"error": {
"code": "PLAN_REQUIRED",
"message": "Public API is not available on this store's plan."
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded."
}
}