Callback Response

Contoh Script CallBack Url Untuk Menerima Update Transaksi/Harga

Contoh alamat callback url seperti ini: http://domainAnda.tld/script.php . Nama file atau alamat callback terserah Anda. Berikut contoh script untuk menerima update transaksi dari SULTAN STORE

Example Script PHP


                        
    					    file_put_contents('testing_callback.txt',file_get_contents('php://input')); // menyimpan dalam file save.txt

Example Response


                        
                            {
    "result": true,
    "data": {
        "wid": "pr3p41d",
        "name": "Xl 25.000",
        "price": "25000",
        "status": "waiting",
        "datetime": "28-06-2023 9:36:20",
        "note": "SN:250010230023xxxx",
        "type": "prepaid"
    }
}                        
                    

Place an Order

[POST] https://sultanstore.co.id/api/prepaid

Parameter Type Value Req.
key string berisi apikey anda. Yes
sign string berisi formula md5(API ID + API KEY). Yes
type string order Yes
service string berisi kode layanan, cek disini. Yes
data_no string berisi data tujuan Yes

Example Response


                        
{
    "result": true,
    "data": {
        "trxid": "some1d",
        "data": "085716432179",
        "code": "25",
        "service": "Xl 25.000",
        "status": "waiting",
        "note": "",
        "balance": 100000,
        "price": 25000
    },
    "message": "Pesanan berhasil, pesanan akan diproses."
}                        
                    

Melakukan Cek Status Pesanan

[POST] https://sultanstore.co.id/api/prepaid

Parameter Type Value Req.
key string berisi apikey anda. Yes
sign string berisi formula md5(API ID + API KEY). Yes
type string status Yes
trxid string berisi id transaksi No
limit integer berisi limit transaksi, hapus parameter 'trxid' jika ingin melihat banyak transaksi sekaligus. No

Example Response


                                
{
    "result": true,
    "data": [
        {
            "trxid": "some1d",
            "data": "085716432179",
            "code": "25",
            "service": "Xl 25.000",
            "status": "success",
            "note": "",
            "price": 25000
        }
    ],
    "message": "Detail transaksi berhasil didapatkan."
}                                
                            
                                
{
    "result": true,
    "data": [
        {
            "trxid": "some1d",
            "data": "085716432179",
            "code": "25",
            "service": "Xl 25.00",
            "status": "success",
            "note": "436846846",
            "price": 25000
        },
        {
            "trxid": "some1d",
            "data": "085716432179",
            "code": "50",
            "service": "Xl 50.00",
            "status": "error",
            "note": "Nomor tujuan salah.",
            "price": 50000
        }
    ],
    "message": "Detail transaksi berhasil didapatkan."
}                                
                            

Mendapatkan Layanan

[POST] https://sultanstore.co.id/api/prepaid

Parameter Type Value Req.
key string berisi apikey anda. Yes
sign string berisi formula md5(API ID + API KEY). Yes
type string services Yes
filter_type string
  • type
  • brand
No
filter_value string berisi tipe atau brand yang ingin diambil No

Example Response


                        
{
    "result": true,
    "data": [
        {
            "brand": "XL",
            "code": "25",
            "name": "Xl 25.000",
            "note": "Pulsa Xl Rp 25.000",
            "price": 25000,
            "status": "available",
            "type": "pulsa-reguler"
        },
        {
            "brand": "XL",
            "code": "50",
            "name": "Xl 50.000",
            "note": "Pulsa Xl Rp 50.000",
            "price": 50000,
            "status": "empty",
            "type": "pulsa-reguler"
        }
    ],
    "message": "Daftar layanan berhasil didapatkan."
}