Add collateral by paying in IDR or MYR
curl --request POST \
--url https://api.matocard.xyz/topups \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "50000",
"method": "bank",
"quoteId": "92d758a3-4c5b-48c4-952b-7ee932786435"
}
'import requests
url = "https://api.matocard.xyz/topups"
payload = {
"amount": "50000",
"method": "bank",
"quoteId": "92d758a3-4c5b-48c4-952b-7ee932786435"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '50000',
method: 'bank',
quoteId: '92d758a3-4c5b-48c4-952b-7ee932786435'
})
};
fetch('https://api.matocard.xyz/topups', 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.matocard.xyz/topups",
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([
'amount' => '50000',
'method' => 'bank',
'quoteId' => '92d758a3-4c5b-48c4-952b-7ee932786435'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.matocard.xyz/topups"
payload := strings.NewReader("{\n \"amount\": \"50000\",\n \"method\": \"bank\",\n \"quoteId\": \"92d758a3-4c5b-48c4-952b-7ee932786435\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.matocard.xyz/topups")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"50000\",\n \"method\": \"bank\",\n \"quoteId\": \"92d758a3-4c5b-48c4-952b-7ee932786435\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.matocard.xyz/topups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"50000\",\n \"method\": \"bank\",\n \"quoteId\": \"92d758a3-4c5b-48c4-952b-7ee932786435\"\n}"
response = http.request(request)
puts response.read_body{
"paymentId": "765b1b01-3f7f-425d-a2b1-87635dd2ba82",
"checkoutUrl": "https://dev.xen.to/iCRL0isp",
"fiat": "50000",
"ausd": "2785515"
}{
"error": "verify your identity first"
}{
"error": "verify your identity first"
}{
"error": "verify your identity first"
}{
"error": "verify your identity first"
}Money
Add collateral by paying in IDR or MYR
The quote’s pair picks the currency. amount is in its smallest unit: whole rupiah (at least 10000) for USD/IDR, sen (at least 500, RM 5) for USD/MYR. method is what the user picked, but the hold follows how they actually paid: virtual account, QRIS, FPX and DuitNow count at once, cards and e-wallets are held first (collateral.pendingShares).
POST
/
topups
Add collateral by paying in IDR or MYR
curl --request POST \
--url https://api.matocard.xyz/topups \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "50000",
"method": "bank",
"quoteId": "92d758a3-4c5b-48c4-952b-7ee932786435"
}
'import requests
url = "https://api.matocard.xyz/topups"
payload = {
"amount": "50000",
"method": "bank",
"quoteId": "92d758a3-4c5b-48c4-952b-7ee932786435"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '50000',
method: 'bank',
quoteId: '92d758a3-4c5b-48c4-952b-7ee932786435'
})
};
fetch('https://api.matocard.xyz/topups', 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.matocard.xyz/topups",
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([
'amount' => '50000',
'method' => 'bank',
'quoteId' => '92d758a3-4c5b-48c4-952b-7ee932786435'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.matocard.xyz/topups"
payload := strings.NewReader("{\n \"amount\": \"50000\",\n \"method\": \"bank\",\n \"quoteId\": \"92d758a3-4c5b-48c4-952b-7ee932786435\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.matocard.xyz/topups")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"50000\",\n \"method\": \"bank\",\n \"quoteId\": \"92d758a3-4c5b-48c4-952b-7ee932786435\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.matocard.xyz/topups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"50000\",\n \"method\": \"bank\",\n \"quoteId\": \"92d758a3-4c5b-48c4-952b-7ee932786435\"\n}"
response = http.request(request)
puts response.read_body{
"paymentId": "765b1b01-3f7f-425d-a2b1-87635dd2ba82",
"checkoutUrl": "https://dev.xen.to/iCRL0isp",
"fiat": "50000",
"ausd": "2785515"
}{
"error": "verify your identity first"
}{
"error": "verify your identity first"
}{
"error": "verify your identity first"
}{
"error": "verify your identity first"
}Authorizations
Matocard <wallet>.<until>.<signature>, see the description at the top
Body
application/json

