Introduction
<aside>We offer a range of payment processing solutions, including support for cross-border payments and the ability to trade popular cryptocurrencies like BTC, ETH, and USDT.</aside>
Authenticating requests
To authenticate requests, include a authorization
header with the value "{HASH}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
To authenticate, each request should be sent with this info everytime
you want to initiate:
HASH = md5("#" + CURRENT_TIME_IN_SECONDS + "@" + YOUR_MERCHANT_SECRET + "#")
api-key: {YOUR_API_KEY}
time: {CURRENT_TIME_IN_SECONDS}
authorization: {HASH}
Endpoints
PayOut
PayOut from balances (Withdrawal)
requires authentication
The system response includes a signature that is used to verify its authenticity.
This signature is created by combining specific fields separated by semicolons, which include the API secret, uuid, amount, currency, and status. The combination is then encoded using the SHA-256 algorithm
PHP example how to generate validation signature below:
Payout callback example:
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v1/payouts';
$response = $client->post(
$url,
[
'headers' => [
'authorization' => '{HASH}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
'json' => [
'payment_method' => 'BANKTRANSFER',
'payment_method_type' => 'aut',
'amount' => 100.0,
'currency' => 'THB',
'crypto_network' => 'ETH',
'crypto_network_address' => '0x7f533b5fbf6ef86c3b7df76cc27fc67744a9a760',
'bank_code' => 'TH.BKKB',
'bank_account_type' => 'savings',
'bank_account_name' => 'John Doe',
'bank_account_number' => '12345678901234',
'iban_number' => 'DE89370400440532013000',
'swift_code' => 'ABCDEFGH123',
'ifsc_code' => '123456',
'aba_number' => '123456789',
'sort_code' => '123456',
'note' => 'withdraw',
'clientAddress1' => 'Street 12, 33-1A',
'clientPostcode' => '82122',
'clientEmail' => 'yhilpert@example.org',
'clientCountry' => 'TH',
'clientPhone' => '095855111444',
'clientCity' => 'web',
'clientState' => 'osklrrbwlnfyngl',
'clientStreet' => 'mjls',
'bankAddress' => 'zdnhku',
'ip_address' => '68.18.226.88',
'callback_url' => 'http://abc.com/callback',
'reference' => 'Payout 01234',
'bank_name' => 'Bangkok Bank',
'bank_branch_name' => 'BANG KAPI',
'bank_province' => 'cnz',
'bank_city' => 'London',
'bank_union_number' => '6222 1234 5678 9012',
'transfer_mode' => 'IMPS',
'virtualPaymentAddress' => 'test@icic',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api-sandbox.pittboss.io/v1/payouts" \
--header "authorization: {HASH}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}" \
--data "{
\"payment_method\": \"BANKTRANSFER\",
\"payment_method_type\": \"aut\",
\"amount\": 100,
\"currency\": \"THB\",
\"crypto_network\": \"ETH\",
\"crypto_network_address\": \"0x7f533b5fbf6ef86c3b7df76cc27fc67744a9a760\",
\"bank_code\": \"TH.BKKB\",
\"bank_account_type\": \"savings\",
\"bank_account_name\": \"John Doe\",
\"bank_account_number\": \"12345678901234\",
\"iban_number\": \"DE89370400440532013000\",
\"swift_code\": \"ABCDEFGH123\",
\"ifsc_code\": \"123456\",
\"aba_number\": \"123456789\",
\"sort_code\": \"123456\",
\"note\": \"withdraw\",
\"clientAddress1\": \"Street 12, 33-1A\",
\"clientPostcode\": \"82122\",
\"clientEmail\": \"yhilpert@example.org\",
\"clientCountry\": \"TH\",
\"clientPhone\": \"095855111444\",
\"clientCity\": \"web\",
\"clientState\": \"osklrrbwlnfyngl\",
\"clientStreet\": \"mjls\",
\"bankAddress\": \"zdnhku\",
\"ip_address\": \"68.18.226.88\",
\"callback_url\": \"http:\\/\\/abc.com\\/callback\",
\"reference\": \"Payout 01234\",
\"bank_name\": \"Bangkok Bank\",
\"bank_branch_name\": \"BANG KAPI\",
\"bank_province\": \"cnz\",
\"bank_city\": \"London\",
\"bank_union_number\": \"6222 1234 5678 9012\",
\"transfer_mode\": \"IMPS\",
\"virtualPaymentAddress\": \"test@icic\"
}"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v1/payouts'
payload = {
"payment_method": "BANKTRANSFER",
"payment_method_type": "aut",
"amount": 100,
"currency": "THB",
"crypto_network": "ETH",
"crypto_network_address": "0x7f533b5fbf6ef86c3b7df76cc27fc67744a9a760",
"bank_code": "TH.BKKB",
"bank_account_type": "savings",
"bank_account_name": "John Doe",
"bank_account_number": "12345678901234",
"iban_number": "DE89370400440532013000",
"swift_code": "ABCDEFGH123",
"ifsc_code": "123456",
"aba_number": "123456789",
"sort_code": "123456",
"note": "withdraw",
"clientAddress1": "Street 12, 33-1A",
"clientPostcode": "82122",
"clientEmail": "yhilpert@example.org",
"clientCountry": "TH",
"clientPhone": "095855111444",
"clientCity": "web",
"clientState": "osklrrbwlnfyngl",
"clientStreet": "mjls",
"bankAddress": "zdnhku",
"ip_address": "68.18.226.88",
"callback_url": "http:\/\/abc.com\/callback",
"reference": "Payout 01234",
"bank_name": "Bangkok Bank",
"bank_branch_name": "BANG KAPI",
"bank_province": "cnz",
"bank_city": "London",
"bank_union_number": "6222 1234 5678 9012",
"transfer_mode": "IMPS",
"virtualPaymentAddress": "test@icic"
}
headers = {
'authorization': '{HASH}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v1/payouts"
);
const headers = {
"authorization": "{HASH}",
"Content-Type": "application/json",
"Accept": "application/json",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
let body = {
"payment_method": "BANKTRANSFER",
"payment_method_type": "aut",
"amount": 100,
"currency": "THB",
"crypto_network": "ETH",
"crypto_network_address": "0x7f533b5fbf6ef86c3b7df76cc27fc67744a9a760",
"bank_code": "TH.BKKB",
"bank_account_type": "savings",
"bank_account_name": "John Doe",
"bank_account_number": "12345678901234",
"iban_number": "DE89370400440532013000",
"swift_code": "ABCDEFGH123",
"ifsc_code": "123456",
"aba_number": "123456789",
"sort_code": "123456",
"note": "withdraw",
"clientAddress1": "Street 12, 33-1A",
"clientPostcode": "82122",
"clientEmail": "yhilpert@example.org",
"clientCountry": "TH",
"clientPhone": "095855111444",
"clientCity": "web",
"clientState": "osklrrbwlnfyngl",
"clientStreet": "mjls",
"bankAddress": "zdnhku",
"ip_address": "68.18.226.88",
"callback_url": "http:\/\/abc.com\/callback",
"reference": "Payout 01234",
"bank_name": "Bangkok Bank",
"bank_branch_name": "BANG KAPI",
"bank_province": "cnz",
"bank_city": "London",
"bank_union_number": "6222 1234 5678 9012",
"transfer_mode": "IMPS",
"virtualPaymentAddress": "test@icic"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"code": "0001",
"status": "pending",
"serial": "0e1895b0-0e5d-11ee-b653-2b99ee6c1c02",
"amount": "100.00",
"currency": "THB",
"info": "Payout accepted, payout pending.",
"reference": "B1701260671",
"sign": "c525b1d1f751efabe6e38fb17b2061d5598efbe6e203710725a54ffe38d67d35"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Status check
requires authentication
Possible payout status:
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v1/payout-status';
$response = $client->post(
$url,
[
'headers' => [
'authorization' => '{HASH}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
'json' => [
'uuid' => '5ac3d0d0-f084-3567-8c50-9ffbfa80f73b',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api-sandbox.pittboss.io/v1/payout-status" \
--header "authorization: {HASH}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}" \
--data "{
\"uuid\": \"5ac3d0d0-f084-3567-8c50-9ffbfa80f73b\"
}"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v1/payout-status'
payload = {
"uuid": "5ac3d0d0-f084-3567-8c50-9ffbfa80f73b"
}
headers = {
'authorization': '{HASH}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v1/payout-status"
);
const headers = {
"authorization": "{HASH}",
"Content-Type": "application/json",
"Accept": "application/json",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
let body = {
"uuid": "5ac3d0d0-f084-3567-8c50-9ffbfa80f73b"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"uuid": "d74034d0-d447-11ed-a2cb-a13983bd76ba",
"payment_method": "BANKTRANSFER",
"status": "complete",
"error": null,
"currency": "MYR",
"amount": 19985,
"billed_amount": 20115,
"created_at": "2023-04-06T06:54:13.000000Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
PayIn
PayIn to system (Deposit)
requires authentication
The system response includes a signature that is used to verify its authenticity.
This signature is created by combining specific fields separated by semicolons, which include the API secret, order number, amount, currency, and status. The combination is then encoded using the SHA-256 algorithm
PHP example how to generate validation signature below:
Deposit confirmation callback example:
Possible callback status field values:
Response codes:
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v1/direct-payments';
$response = $client->post(
$url,
[
'headers' => [
'authorization' => '{HASH}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
'json' => [
'orderNo' => 15246321458,
'paymentMethod' => 'BANKTRANSFER, CUP, ALIPAY, QRPAYMENT, P2P',
'paymentMethodType' => 'VA',
'currency' => 'CNY,VND,MYR,PHP,JPY,KRW',
'orderAmount' => 100.75,
'productName' => 'Deposit',
'trafficType' => 'Gaming',
'callbackUrl' => 'http://abc.com/callback',
'redirectUrl' => 'http://abc.com/success',
'ipAddress' => '192.0.0.1',
'logoUrl' => 'https://s3.ap-southeast-1.amazonaws.com/app.pittboss.io/pittboss.png',
'userAgent' => 'Chrome',
'source' => 'Website',
'clientFirstName' => 'John',
'clientLastName' => 'Doe',
'clientEmail' => 'johndoe@example.com',
'clientPhone' => '65215874936',
'clientAddress1' => '1658 Charack Road',
'clientCity' => 'Bangkok',
'clientPostcode' => '47807',
'clientState' => 'Indiana',
'clientCountry' => 'TH',
'clientBirthDay' => '2024-12-30',
'shipFirstName' => 'John',
'shipLastName' => 'Doe',
'shipEmail' => 'example@gmail.com',
'shipPhone' => '4016629667',
'shipAddress1' => '1446 Winding Way',
'shipCity' => 'Bangkok',
'shipPostcode' => '02840',
'shipState' => 'Rhode Island',
'shipCountry' => 'TH',
'clientAccountNumber' => '111122223333',
'clientDocumentUuid' => '05d08e0f-2b72-3c3e-ac3f-b33e6770b00c',
'bankAccountName' => 'Thomas Smith',
'bankName' => 'Bangkok Bank',
'bankCity' => 'Bangkok',
'bankCode' => 'TH.BANGKOK',
'bankProvince' => 'province town',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api-sandbox.pittboss.io/v1/direct-payments" \
--header "authorization: {HASH}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}" \
--data "{
\"orderNo\": 15246321458,
\"paymentMethod\": \"BANKTRANSFER, CUP, ALIPAY, QRPAYMENT, P2P\",
\"paymentMethodType\": \"VA\",
\"currency\": \"CNY,VND,MYR,PHP,JPY,KRW\",
\"orderAmount\": 100.75,
\"productName\": \"Deposit\",
\"trafficType\": \"Gaming\",
\"callbackUrl\": \"http:\\/\\/abc.com\\/callback\",
\"redirectUrl\": \"http:\\/\\/abc.com\\/success\",
\"ipAddress\": \"192.0.0.1\",
\"logoUrl\": \"https:\\/\\/s3.ap-southeast-1.amazonaws.com\\/app.pittboss.io\\/pittboss.png\",
\"userAgent\": \"Chrome\",
\"source\": \"Website\",
\"clientFirstName\": \"John\",
\"clientLastName\": \"Doe\",
\"clientEmail\": \"johndoe@example.com\",
\"clientPhone\": \"65215874936\",
\"clientAddress1\": \"1658 Charack Road\",
\"clientCity\": \"Bangkok\",
\"clientPostcode\": \"47807\",
\"clientState\": \"Indiana\",
\"clientCountry\": \"TH\",
\"clientBirthDay\": \"2024-12-30\",
\"shipFirstName\": \"John\",
\"shipLastName\": \"Doe\",
\"shipEmail\": \"example@gmail.com\",
\"shipPhone\": \"4016629667\",
\"shipAddress1\": \"1446 Winding Way\",
\"shipCity\": \"Bangkok\",
\"shipPostcode\": \"02840\",
\"shipState\": \"Rhode Island\",
\"shipCountry\": \"TH\",
\"clientAccountNumber\": \"111122223333\",
\"clientDocumentUuid\": \"05d08e0f-2b72-3c3e-ac3f-b33e6770b00c\",
\"bankAccountName\": \"Thomas Smith\",
\"bankName\": \"Bangkok Bank\",
\"bankCity\": \"Bangkok\",
\"bankCode\": \"TH.BANGKOK\",
\"bankProvince\": \"province town\"
}"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v1/direct-payments'
payload = {
"orderNo": 15246321458,
"paymentMethod": "BANKTRANSFER, CUP, ALIPAY, QRPAYMENT, P2P",
"paymentMethodType": "VA",
"currency": "CNY,VND,MYR,PHP,JPY,KRW",
"orderAmount": 100.75,
"productName": "Deposit",
"trafficType": "Gaming",
"callbackUrl": "http:\/\/abc.com\/callback",
"redirectUrl": "http:\/\/abc.com\/success",
"ipAddress": "192.0.0.1",
"logoUrl": "https:\/\/s3.ap-southeast-1.amazonaws.com\/app.pittboss.io\/pittboss.png",
"userAgent": "Chrome",
"source": "Website",
"clientFirstName": "John",
"clientLastName": "Doe",
"clientEmail": "johndoe@example.com",
"clientPhone": "65215874936",
"clientAddress1": "1658 Charack Road",
"clientCity": "Bangkok",
"clientPostcode": "47807",
"clientState": "Indiana",
"clientCountry": "TH",
"clientBirthDay": "2024-12-30",
"shipFirstName": "John",
"shipLastName": "Doe",
"shipEmail": "example@gmail.com",
"shipPhone": "4016629667",
"shipAddress1": "1446 Winding Way",
"shipCity": "Bangkok",
"shipPostcode": "02840",
"shipState": "Rhode Island",
"shipCountry": "TH",
"clientAccountNumber": "111122223333",
"clientDocumentUuid": "05d08e0f-2b72-3c3e-ac3f-b33e6770b00c",
"bankAccountName": "Thomas Smith",
"bankName": "Bangkok Bank",
"bankCity": "Bangkok",
"bankCode": "TH.BANGKOK",
"bankProvince": "province town"
}
headers = {
'authorization': '{HASH}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v1/direct-payments"
);
const headers = {
"authorization": "{HASH}",
"Content-Type": "application/json",
"Accept": "application/json",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
let body = {
"orderNo": 15246321458,
"paymentMethod": "BANKTRANSFER, CUP, ALIPAY, QRPAYMENT, P2P",
"paymentMethodType": "VA",
"currency": "CNY,VND,MYR,PHP,JPY,KRW",
"orderAmount": 100.75,
"productName": "Deposit",
"trafficType": "Gaming",
"callbackUrl": "http:\/\/abc.com\/callback",
"redirectUrl": "http:\/\/abc.com\/success",
"ipAddress": "192.0.0.1",
"logoUrl": "https:\/\/s3.ap-southeast-1.amazonaws.com\/app.pittboss.io\/pittboss.png",
"userAgent": "Chrome",
"source": "Website",
"clientFirstName": "John",
"clientLastName": "Doe",
"clientEmail": "johndoe@example.com",
"clientPhone": "65215874936",
"clientAddress1": "1658 Charack Road",
"clientCity": "Bangkok",
"clientPostcode": "47807",
"clientState": "Indiana",
"clientCountry": "TH",
"clientBirthDay": "2024-12-30",
"shipFirstName": "John",
"shipLastName": "Doe",
"shipEmail": "example@gmail.com",
"shipPhone": "4016629667",
"shipAddress1": "1446 Winding Way",
"shipCity": "Bangkok",
"shipPostcode": "02840",
"shipState": "Rhode Island",
"shipCountry": "TH",
"clientAccountNumber": "111122223333",
"clientDocumentUuid": "05d08e0f-2b72-3c3e-ac3f-b33e6770b00c",
"bankAccountName": "Thomas Smith",
"bankName": "Bangkok Bank",
"bankCity": "Bangkok",
"bankCode": "TH.BANGKOK",
"bankProvince": "province town"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"code": "0001",
"status": "PENDING",
"orderNo": "1687147727",
"serial": "fd8e4ce0-0e56-11ee-b363-9da4ff0453de",
"amount": "100.75",
"currency": "CNY",
"details": {},
"qrUrl": null,
"orderInfo": "Transaction accepted, payment pending.",
"gotoUrl": "http://{url}/pay-secure/C4GGoBQNuyMQ60D0vB",
"sign": "e5a46145874f9e61378a178d1dcd124b1143decad92260ba88002219e1b9391b"
}
Example response (400):
{
"code": "4000",
"status": "EXC",
"errorMsg": "PAYMENT_CHANNEL_AMOUNT_LIMITS",
"orderNo": "1687154918",
"serial": "bb5d7050-0e67-11ee-b839-0d53dff3f2f9",
"amount": "103081095.64",
"currency": "CNY",
"sign": "8a37553ce07bc90a6e701cc7306c2d38c19fb8280923972617800a23b4426e2c"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Transaction confirmation
This endpoint is designed to enable end clients to confirm their payments and provide a way to upload deposit splits. This feature can be particularly useful for accurately associating deposits with transactions in cases where the automated system mapping may not be successful
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v1/direct-payments/6d75a147-25bd-36d1-9117-b3010d89d7a7/confirm';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'authorization' => '{HASH}',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
'multipart' => [
[
'name' => 'file',
'contents' => fopen('/tmp/phpcg5SjG', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api-sandbox.pittboss.io/v1/direct-payments/6d75a147-25bd-36d1-9117-b3010d89d7a7/confirm" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--header "authorization: {HASH}" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}" \
--form "file=@/tmp/phpcg5SjG"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v1/direct-payments/6d75a147-25bd-36d1-9117-b3010d89d7a7/confirm'
files = {
'file': open('/tmp/phpcg5SjG', 'rb')}
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'authorization': '{HASH}',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('POST', url, headers=headers, files=files)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v1/direct-payments/6d75a147-25bd-36d1-9117-b3010d89d7a7/confirm"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
"authorization": "{HASH}",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
Example response (200):
{
"status": "success"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Status check
requires authentication
Possible transaction status:
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v1/transaction-status';
$response = $client->post(
$url,
[
'headers' => [
'authorization' => '{HASH}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
'json' => [
'transaction_no' => '4456698',
'serial' => 'e50575b4-0e48-3ccd-96bb-55f81a96f4a6',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api-sandbox.pittboss.io/v1/transaction-status" \
--header "authorization: {HASH}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}" \
--data "{
\"transaction_no\": \"4456698\",
\"serial\": \"e50575b4-0e48-3ccd-96bb-55f81a96f4a6\"
}"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v1/transaction-status'
payload = {
"transaction_no": "4456698",
"serial": "e50575b4-0e48-3ccd-96bb-55f81a96f4a6"
}
headers = {
'authorization': '{HASH}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v1/transaction-status"
);
const headers = {
"authorization": "{HASH}",
"Content-Type": "application/json",
"Accept": "application/json",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
let body = {
"transaction_no": "4456698",
"serial": "e50575b4-0e48-3ccd-96bb-55f81a96f4a6"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"data": {
"payment_method": "WECHAT",
"transaction_no": "1686810804",
"uuid": "873fc930-0b46-11ee-a843-bf777ef6a5e9",
"currency": "CNY",
"amount": 130,
"expected_amount": 130,
"success": false,
"error": "",
"created_at": "2023-06-15 06:33:23"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Upload Document
requires authentication
Uploads a document associated with a transaction.
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v1/document-upload';
$response = $client->post(
$url,
[
'headers' => [
'authorization' => '{HASH}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
'json' => [
'file' => 'example.pdf',
'document_no' => '30-31.145.201-7',
'type' => 'CNPJ',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api-sandbox.pittboss.io/v1/document-upload" \
--header "authorization: {HASH}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}" \
--data "{
\"file\": \"example.pdf\",
\"document_no\": \"30-31.145.201-7\",
\"type\": \"CNPJ\"
}"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v1/document-upload'
payload = {
"file": "example.pdf",
"document_no": "30-31.145.201-7",
"type": "CNPJ"
}
headers = {
'authorization': '{HASH}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v1/document-upload"
);
const headers = {
"authorization": "{HASH}",
"Content-Type": "application/json",
"Accept": "application/json",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
let body = {
"file": "example.pdf",
"document_no": "30-31.145.201-7",
"type": "CNPJ"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
{
"status": "success",
"uuid": "5a9765a0-f571-11ee-a085-a95c1c9f35c5"
}
Example response (400):
{
"error": "File upload failed."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Utils
Bank Options
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v1/direct-payments/bank-options';
$response = $client->post(
$url,
[
'headers' => [
'authorization' => '{HASH}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
'json' => [
'paymentMethod' => 'BANKTRANSFER',
'currency' => 'THB,',
'type' => 'payin',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api-sandbox.pittboss.io/v1/direct-payments/bank-options" \
--header "authorization: {HASH}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}" \
--data "{
\"paymentMethod\": \"BANKTRANSFER\",
\"currency\": \"THB,\",
\"type\": \"payin\"
}"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v1/direct-payments/bank-options'
payload = {
"paymentMethod": "BANKTRANSFER",
"currency": "THB,",
"type": "payin"
}
headers = {
'authorization': '{HASH}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v1/direct-payments/bank-options"
);
const headers = {
"authorization": "{HASH}",
"Content-Type": "application/json",
"Accept": "application/json",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
let body = {
"paymentMethod": "BANKTRANSFER",
"currency": "THB,",
"type": "payin"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Example response (200):
[
{
"bankCode": "TH.BANGKOK",
"paymentMethod": "BANKTRANSFER",
"bankName": "Bangkok Bank",
"currency": "THB"
},
{
"bankCode": "TH.CIMB",
"paymentMethod": "BANKTRANSFER",
"bankName": "CIMB THAI Bank",
"currency": "THB"
},
{
"bankCode": "TH.GOVERNMENTSAVINGS",
"paymentMethod": "BANKTRANSFER",
"bankName": "Government Savings Bank",
"currency": "THB"
},
{
"bankCode": "TH.KASIKORN",
"paymentMethod": "BANKTRANSFER",
"bankName": "Kasikorn Bank",
"currency": "THB"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Merchant balances
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v1/balances';
$response = $client->get(
$url,
[
'headers' => [
'authorization' => '{HASH}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
--get "https://api-sandbox.pittboss.io/v1/balances" \
--header "authorization: {HASH}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v1/balances'
headers = {
'authorization': '{HASH}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('GET', url, headers=headers)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v1/balances"
);
const headers = {
"authorization": "{HASH}",
"Content-Type": "application/json",
"Accept": "application/json",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200):
[
{
"value": "289d9af0-15ae-11ee-b984-1560c9ca07b6",
"currency": "USD",
"payout_available": true,
"amount": "15.15",
"reserved": "0.00"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Crypto
POST v2/crypto-payments
requires authentication
Example request:
$client = new \GuzzleHttp\Client();
$url = 'https://api-sandbox.pittboss.io/v2/crypto-payments';
$response = $client->post(
$url,
[
'headers' => [
'authorization' => '{HASH}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'api-key' => '{YOUR_API_KEY}',
'time' => '{CURRENT_TIME_IN_SECONDS}',
],
'json' => [
'orderNo' => 15246321458,
'paymentMethod' => 'CRYPTO',
'cryptoType' => 'BTC | ETH | USDT | BCH',
'fiat' => 'EUR | USD | CAD | GBP | AUD | JPY | USDT',
'amount' => 100.75,
'callbackUrl' => 'http://abc.com/callback',
'networkType' => 'eth | tron',
'withdrawalAddress' => '0x71C7656EC7ab88b098defB751B7401B5f6d8976F',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
"https://api-sandbox.pittboss.io/v2/crypto-payments" \
--header "authorization: {HASH}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "api-key: {YOUR_API_KEY}" \
--header "time: {CURRENT_TIME_IN_SECONDS}" \
--data "{
\"orderNo\": 15246321458,
\"paymentMethod\": \"CRYPTO\",
\"cryptoType\": \"BTC | ETH | USDT | BCH\",
\"fiat\": \"EUR | USD | CAD | GBP | AUD | JPY | USDT\",
\"amount\": 100.75,
\"callbackUrl\": \"http:\\/\\/abc.com\\/callback\",
\"networkType\": \"eth | tron\",
\"withdrawalAddress\": \"0x71C7656EC7ab88b098defB751B7401B5f6d8976F\"
}"
import requests
import json
url = 'https://api-sandbox.pittboss.io/v2/crypto-payments'
payload = {
"orderNo": 15246321458,
"paymentMethod": "CRYPTO",
"cryptoType": "BTC | ETH | USDT | BCH",
"fiat": "EUR | USD | CAD | GBP | AUD | JPY | USDT",
"amount": 100.75,
"callbackUrl": "http:\/\/abc.com\/callback",
"networkType": "eth | tron",
"withdrawalAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
}
headers = {
'authorization': '{HASH}',
'Content-Type': 'application/json',
'Accept': 'application/json',
'api-key': '{YOUR_API_KEY}',
'time': '{CURRENT_TIME_IN_SECONDS}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
const url = new URL(
"https://api-sandbox.pittboss.io/v2/crypto-payments"
);
const headers = {
"authorization": "{HASH}",
"Content-Type": "application/json",
"Accept": "application/json",
"api-key": "{YOUR_API_KEY}",
"time": "{CURRENT_TIME_IN_SECONDS}",
};
let body = {
"orderNo": 15246321458,
"paymentMethod": "CRYPTO",
"cryptoType": "BTC | ETH | USDT | BCH",
"fiat": "EUR | USD | CAD | GBP | AUD | JPY | USDT",
"amount": 100.75,
"callbackUrl": "http:\/\/abc.com\/callback",
"networkType": "eth | tron",
"withdrawalAddress": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.