List
curl --request GET \
--url https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id} \
--header 'Authorization: Bearer <token>' \
--header 'X-PARTNER-ID: <api-key>'import requests
url = "https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}"
headers = {
"Authorization": "Bearer <token>",
"X-PARTNER-ID": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-PARTNER-ID': '<api-key>'}
};
fetch('https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}', 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://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}",
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>",
"X-PARTNER-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-PARTNER-ID", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}")
.header("Authorization", "Bearer <token>")
.header("X-PARTNER-ID", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-PARTNER-ID"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": [
{
"id": 103,
"reff_no": "INV20240513001",
"title": "Invoice Payment",
"description": "Invoice #INV20240513001",
"source": "api v2",
"payment_url": "https://example.com/payment-link",
"status": "open",
"status_computed": "open",
"is_expired": false,
"required_customer_detail": true,
"is_multiple_payment": false,
"is_unlimited_usage": false,
"required_customer_fields": {
"name": true,
"phone": false,
"email": false
},
"customer_pays_fee": false,
"max_usage": 1,
"current_usage": 0,
"expired_at": "2024-05-13T00:00:00Z",
"total_amount": 150000,
"items": [
{
"name": "Product A",
"quantity": 1,
"unit_price": 150000,
"subtotal": 150000
}
],
"whitelisted_payment_method": [
"<string>"
],
"redirect_url": "https://example.com/payment-link",
"success_redirect_url": "https://merchant.example.com/payment/success",
"expired_redirect_url": "https://merchant.example.com/payment/expired",
"customer_name": "Jane Doe",
"customer_email": "jane@example.com",
"customer_phone": "081234567890",
"optional_metadata": {},
"payment_date": "2024-05-13T00:00:00Z",
"created_at": "2024-05-13T00:00:00Z",
"updated_at": "2024-05-13T00:00:00Z",
"account": {
"id": 1,
"name": "Account 1"
}
}
],
"meta": {}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"status": 404,
"success": false,
"error": {
"code": 404,
"message": "Account not found."
}
}{
"status": 405,
"success": false,
"error": {
"code": 4059901,
"message": "The PATCH method is not supported for this route. Supported methods: GET, HEAD, POST."
}
}Payment Link
List
Retrieves a paginated list of payment links for the specified account.
GET
/
api
/
v1.0
/
payment-link-manage
/
{account_id}
List
curl --request GET \
--url https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id} \
--header 'Authorization: Bearer <token>' \
--header 'X-PARTNER-ID: <api-key>'import requests
url = "https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}"
headers = {
"Authorization": "Bearer <token>",
"X-PARTNER-ID": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-PARTNER-ID': '<api-key>'}
};
fetch('https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}', 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://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}",
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>",
"X-PARTNER-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-PARTNER-ID", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}")
.header("Authorization", "Bearer <token>")
.header("X-PARTNER-ID", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-payment-b2b.singapay.id/api/v1.0/payment-link-manage/{account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-PARTNER-ID"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": [
{
"id": 103,
"reff_no": "INV20240513001",
"title": "Invoice Payment",
"description": "Invoice #INV20240513001",
"source": "api v2",
"payment_url": "https://example.com/payment-link",
"status": "open",
"status_computed": "open",
"is_expired": false,
"required_customer_detail": true,
"is_multiple_payment": false,
"is_unlimited_usage": false,
"required_customer_fields": {
"name": true,
"phone": false,
"email": false
},
"customer_pays_fee": false,
"max_usage": 1,
"current_usage": 0,
"expired_at": "2024-05-13T00:00:00Z",
"total_amount": 150000,
"items": [
{
"name": "Product A",
"quantity": 1,
"unit_price": 150000,
"subtotal": 150000
}
],
"whitelisted_payment_method": [
"<string>"
],
"redirect_url": "https://example.com/payment-link",
"success_redirect_url": "https://merchant.example.com/payment/success",
"expired_redirect_url": "https://merchant.example.com/payment/expired",
"customer_name": "Jane Doe",
"customer_email": "jane@example.com",
"customer_phone": "081234567890",
"optional_metadata": {},
"payment_date": "2024-05-13T00:00:00Z",
"created_at": "2024-05-13T00:00:00Z",
"updated_at": "2024-05-13T00:00:00Z",
"account": {
"id": 1,
"name": "Account 1"
}
}
],
"meta": {}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"status": 404,
"success": false,
"error": {
"code": 404,
"message": "Account not found."
}
}{
"status": 405,
"success": false,
"error": {
"code": 4059901,
"message": "The PATCH method is not supported for this route. Supported methods: GET, HEAD, POST."
}
}Authorizations
JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.
Merchant API key (Credential.api_key). Required on every request.
Path Parameters
Account identifier in ULID format.
⌘I
