Dokumentasi API
- CishoPay
- Dokumentasi API
API ini digunakan untuk melihat detail dari metode pembayaran
| HTTP Method | POST |
|---|---|
| API URL | https://pay.cishopindo.id/api/v1/account |
| Response | JSON |
| account_id | Account ID Anda |
|---|---|
| signature | Signature dengan formula md5 dari account_id:secret |
| X-API-KEY | API KEY Anda |
|---|
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://pay.cishopindo.id/api/v1/account');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
$headers = [
'X-API-KEY: A3DCB861B271S299S4S53F2B', // Ganti dengan API key anda
];
$post = array(
'account_id' => 'acct_6254s922a62b3138190092', // Ganti dengan Akun ID anda
'signature' => 'cdf21ccccac75ec529e7a4d4c209a8a2'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
?>
Response API CishoPay
Jenis Respon API yang ditampilkan oleh pihak CishoPay
{
"status": "success",
"code": 200,
"message": "Berhasil Mengambil Data User",
"data": {
"full_name": "Development CishoPay",
"merchant_name": "CishoPay",
"no_handphone": "08888888",
"email_address": "dev@cishopay.co.id",
"balance_available": "8733",
"balance_hold": "2511"
}
}
{
"status": "error",
"message": "Signature Anda Tidak Sesuai."
}