NAV Navigation
php

Introduction

Welcome to MPAY Documentation API V4. Our API services are organized around REST, accepts form-encoded request bodies and returns JSON-encoded responses.

Authentication

MPAY API uses pair of API Key, API Token and IP Address to authenticate a partner request. Partner needs to register a unique IP Address which will be used as originating request for the API Services.

For Authorization on this api, API Key and Token are included in from request data:

HTTP(S) Request

API can be requested through HTTPS Request to MPAY API Base URL endpoint. The HTTPS Header has to be used to allow proper authentication, additionally HTTPS Request should only be made from IP Address which has been registered in MPAY.

Endpoint Url

Production : https://api-prod.mitrapayment.com/api/v4

Sanbox : Coomingsoon

Virtual Account

Use this API to create new VA number

Request Virtual Account

[PATH] : [URL_ENDPOINT]/va/{{payment_code}}

Example Request Virtual Account

<?php
$keyProject = 'MPI-xxxxxxxx';
$tokenProject = 'asdf12456789asfghjkl';

$paymentCode = "va_permata";

$amount = "10000";
$referenceId = "TEST_01";
$signHash = hash_hmac('sha512', $keyProject+$referenceId, $tokenProject);
$reqType = "oneoff";
$callbackUrl = "https://yourcallback.com/mpay";
$viewame = "Jhone Doe";
$expTime = "60";
$useCase = "single";
$vaExpired = "60";

$req_data = [
    'key' => $keyProject,
    'token' => $tokenProject,
    'referenceId' => $referenceId,
    'amount' => $amount,
    'callbackUrl' => $callbackUrl,
    'signHash' => $signHash,
    'reqType' => $reqType,
    'viewName' => $viewame,
    'expTime' => $expTime,
    'useCase' => $useCase,
    'vaExpired' => $vaExpired
];

$data_payload = json_encode($req_data);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-prod.mitrapayment.com/api/v4/va/'.$paymentCode,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data_payload,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Parameter Type Description
key string Key project from MPAY
token string Token project from MPAY
referenceId string(255) merchant trx id must be unique
amount string/integer Amount your user must paid to complete the transaction (Minimum IDR 10.000)
callbackUrl string url that will receive payment success / fail notification (Must HTTPS)
signHash sha512 Hashing from sha512 or if you use PHP this sampe code signHash -> hash_hmac(‘sha512’, key_project+referenceId, token_project);
reqType enum oneoff for close amount and persistent for open amount, see reqType here
viewName string(20) Customizable VA display name that will be seen by user
expTime string Transaction expiration time in minutes, e.g If Transaction want to be expired after 5 minutes, you just have to set expTime to 5.
useCase string single or multiple, if single va just use one time, if multiple va can accept multiple payment Noted : multiple is under development and we recommend using single
vaExpired string same like expTime

Response Virtual Account

Response Request Virtual Account:

{
  "success": true,
  "data_payment": {
    "id": "MPI-ID-12345",
    "create_time": 1662549962,
    "status": "pending",
    "statustrx_time": 1662549962,
    "referenceId": "TEST_01",
    "paymentType": "receive",
    "paymentName": "VA Permata",
    "feeTo": "merchant",
    "Amount": "10000",
    "fee": 4500,
    "totalAmount": 10000,
    "callback": "https://yourcallback.com/mpay",
    "paymentMethod": {
      "trx_id": 12345,
      "trans_hash": "MPI-72cad731-5f43-45a7-bc2b-0799dd3daba3",
      "bank": "va_permata",
      "viewName": "Jhone Doe",
      "accountNo": "7392600003243381",
      "reqType": "oneoff",
      "useCase": "single",
      "paidCounter": 0
    }
  }
}
Parameter Object Description
success - (Boolean) this will be true if the virtual account is successfully created
data_payment [data_payment] data_payment object if the virtual account is created successfully
id [data_payment] our transaction id
create_time [data_payment] Executionn time in MPAY system (‘timestamp’)
status [data_payment] transaction status, for the initial creation, the default will be pending
statustrx_time [data_payment] Latest status change of a transaction. Example from ‘pending’ to ‘sukses’ (‘timestamp’)
referenceId [data_payment] trx id from merchant / mitra / user
paymentType [data_payment] receive or send it`s type of transaction used
paymentName [data_payment] our product name
feeTo [data_payment] enduser or merchant, if set to enduser all fee are borne by the end user
Amount [data_payment] amount request
fee [data_payment] the fee we provide
totalAmount [data_payment] total amount, if the fee is borne by the enduser, the nominal request will be added to the nominal fee and if it is charged to the merchant then this will be filled according to the nominal money that the merchant has requested
callback [data_payment] webhook merchant that will receive payment success/fail notification
paymentMethod [data_payment][paymentMethod] paymentMethod details
trx_id [data_payment][paymentMethod] our integer transaction id
trans_hash [data_payment][paymentMethod] our hashing transaction
bank [data_payment][paymentMethod] bank name or our product name
viewName [data_payment][paymentMethod] Customizable VA display name that will be seen by user
accountNo [data_payment][paymentMethod] Generated VA number
reqType [data_payment][paymentMethod] oneoff for close amount and persistent for open amount
useCase [data_payment][paymentMethod] single or multiple
paidCounter [data_payment][paymentMethod] paid counter

Payment Code Virtual Account

payment_code request_type Capability
va_mandiri oneoff / persistent Open Amount, Closed Amount
va_bca oneoff / persistent Open Amount, Closed Amount
va_bri oneoff / persistent Open Amount, Closed Amount
va_bni oneoff Closed Amount
va_permata oneoff / persistent Open Amount, Closed Amount
va_danamon persistent Open Amount
va_cimb oneoff Closed Amount
va_sahabat_sampoerna oneoff / persistent Open Amount, Closed Amount

Bank Account Inquiry

Use this API to get beneficiary account details.

Request Bank Account Inquiry

[PATH] : [URL_ENDPOINT]/bank-account-inquiry/

Example Request Bank Account Inquiry

<?php
$keyProject = 'MPI-xxxxxxxx';
$tokenProject = 'asdf12456789asfghjkl';

$referenceId = "inquiry_test_01"; 
$accountNo = "123456789";
$bankShort = "BCA";

$req_data = [
    'key' => $keyProject,
    'token' => $tokenProject,
    'referenceId' => $referenceId,
    'accountNo' => $accountNo,
    'bankShort' => $bankShort,
];

$data_payload = json_encode($req_data);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-prod.mitrapayment.com/api/v4/bank-account-inquiry',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data_payload,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

make sure the Authorization is correct and has become a base64 encoded string

Parameter Type Description
referenceId string(255) merchant trx id must be unique
accountNo string Beneficiary account number, numeric only
bankShort string Bank Code of the Beneficiary account, see Disbursement bankShort here

Response Bank Account Inquiry

This Response If Bank Account Inquiry Success

{ 
    "status": true,
    "reffrenceId": "inquiry_test_01",
    "data": {
        "accountName": "John Doe",
        "accountNo": "123456789",
        "bankShort": "BCA",
        "bankCode": "014"
    }
}
Parameter Object Description
status - (Boolean) this will be true if the Bank Account Inquiry is successfully
reffrenceId [string] trx id from merchant / mitra / user
data [data] data object if the Success is successfully
accountName [data] Beneficiary account name
accountNo [data] Beneficiary account number
bankShort [data] Bank Code of the Beneficiary account, see Disbursement bankShort here
bankCode [data] Digital Code from Bank Indonesia

Response Code Account Inquiry

if you look at the error_code response you can see Error Code Response , below is an addition to the inquiry account

{
    "success": false,
    "error_code": "INQUIRY_INVALID_ACCOUNT",
    "message": "Inquiry process is complete but the account number is invalid or maybe a virtual account number"
}
Error Code Status Description
INQUIRY_PROCESS Non-Final Inquiry still in process, you can hit again after 30-60 second if see this Error Code
INQUIRY_INVALID_ACCOUNT Final Inquiry process is complete but the account number is invalid or maybe a virtual account number
INQUIRY_SUSPECTED_ACCOUNT Final Bank account have been suspected on doing fraud. You still can do a disbursement to this account
INQUIRY_BLACKLIST_ACCOUNT Final Bank account have been confirmed on doing a fraud and therefore is blacklisted. You can’t do a disbursment to this account.
INQUIRY_FAILED Final The inquiry process is failed before we get the final status of the inquiry, e.g due to timeout or any other errors from the bank. If you get this response, please retry the inquiry to trigger reverification of the account.
INQUIRY_CLOSED_ACCOUNT Final The inquiry process is complete and the account is valid, but it is closed/inactive so that it cannot receive money. You cannot do a disbursement to this account.
OTHER_ERROR Final Other error, Contact us for more detail this error!

Disburstment

Use this API to start disbursing money to a specific beneficiary account.

Request Disburstment

[PATH] : [URL_ENDPOINT]/disburst/{{CHANNEL_CODE}}

Headers

Example Request Disburstment

<?php
$keyProject = 'MPI-xxxxxxxx';
$tokenProject = 'asdf12456789asfghjkl';

$channelCode = "disburst_c2";

$amount = "10000";
$referenceId = "DISBURST_REFF01";
$signHash = hash_hmac('sha512', $keyProject+$referenceId, $tokenProject);
$bankShort = "BCA";
$recipient_account = '123456789';
$callbackUrl = "https://yourcallback.com/mpay";


$req_data = [
    'key' => $keyProject,
    'token' => $tokenProject,
    'referenceId' => $referenceId,
    'signHash' => $signHash,
    'bankShort' => $bankShort,
    'recipient_account' => $recipient_account,
    'amount' => $amount,
    'useCase' => 'single',
    'paidCounter' => '1',
    'callbackUrl' => $callbackUrl
];

$data_payload = json_encode($req_data);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-prod.mitrapayment.com/api/v4/disburst/'.$channelCode,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data_payload,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Parameter Type Description
key string Key project from MPAY
token string Token project from MPAY
referenceId string(255) merchant trx id must be unique
signHash sha512 Hashing from sha512 or if you use PHP this sampe code signHash -> hash_hmac(‘sha512’, key_project+referenceId, token_project);
bankShort string Bank Code of the Beneficiary account, see Disbursement bankShort here
recipient_account string Beneficiary account number, numeric only
amount string Amount of disbursement (Number Only), min amount 10000
useCase string Use single only
paidCounter string Set 1 Only
callbackUrl string For notification transaction disburst status success or fail

Response Disburstment

This Response If Disbursement Success Created

Response Request Disburstment:

{
  "success": true,
  "data_payment": {
    "id": "MPI-ID-12345",
    "create_time": 1662566709,
    "status": "pending",
    "statustrx_time": 1662566709,
    "referenceId": "DISBURST_REFF01",
    "paymentType": "send",
    "Amount": "10000",
    "fee": 4500,
    "totalAmount": 14500,
    "callback": "https://yourcallback.com/mpay",
    "paymentMethod": {
      "trans_hash": "MPI-72cad731-5f43-45a7-bc2b-0799dd3daba3",
      "trxid_bank": "MPI-72cad731-5f43-45a7-bc2b-0799dd3daba3",
      "bankShort": "BCA",
      "recipient_name": "",
      "recipient_account": "123456789",
      "amount": "10000",
      "note": "",
      "email": "",
      "schedule_date": ""
    }
  }
}
Parameter Object Description
success - (Boolean) this will be true if the virtual account is successfully created
data_payment [data_payment] data_payment object if the virtual account is created successfully
id [data_payment] our transaction id
create_time [data_payment] Executionn time in MPAY system (‘timestamp’)
status [data_payment] transaction status, for the initial creation, the default will be pending
statustrx_time [data_payment] Latest status change of a transaction. Example from ‘pending’ to ‘sukses’ (‘timestamp’)
referenceId [data_payment] trx id from merchant / mitra / user
paymentType [data_payment] receive or send it`s type of transaction used
paymentName [data_payment] our product name
feeTo [data_payment] enduser or merchant, if set to enduser all fee are borne by the end user
Amount [data_payment] amount request
fee [data_payment] the fee we provide
totalAmount [data_payment] the amount of merchant balance that we will deduct
callback [data_payment] webhook merchant that will receive payment success/fail notification
paymentMethod [data_payment][paymentMethod] paymentMethod details
trans_hash [data_payment][paymentMethod] our transaction hash
trxid_bank [data_payment][paymentMethod] our transaction hash to bank
bankShort [data_payment][paymentMethod] bankShort or our product name
recipient_name [data_payment][paymentMethod] account owner name
recipient_account [data_payment][paymentMethod] Beneficiary account number
amount [data_payment][paymentMethod] the amount to be transferred to beneficiary account number
note [data_payment][paymentMethod] note for this transaction
email [data_payment][paymentMethod] email for notification
schedule_date [data_payment][paymentMethod] date schedule (COOMING SOON)

Check Status Disburstment

Example Check Status Disburstment

<?php
$keyProject = 'MPI-xxxxxxxx';
$tokenProject = 'asdf12456789asfghjkl';

$channelCode = "disburst_c2";
$accountNo = "123456789";
$referenceId = "DISBURST_REFF01";

$req_data = [
    'key' => $keyProject,
    'token' => $tokenProject,
    'referenceId' => $referenceId,
    'accountNo' => $accountNo,
];

$data_payload = json_encode($req_data);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-prod.mitrapayment.com/api/v4/disburst_status/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data_payload,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

To get status of a disbursement request, you can call this API. You may need to call this API a few times until getting a final status (success/failed). We suggest to check the status after the remit API timed out or 60 seconds after the disbursement requested

This API offers an option to send you a callback status of the disbursement request to a specific URL.

Request Check Status Disburstment

[PATH] : [URL_ENDPOINT]/disburst_status/

Parameter Type Description
accountNo string Beneficiary account number, numeric only
referenceId string Unique trx id for a specific request, generated by merchant

You can use any of the above parameters

Response Check Status Disburstment:

{
    "success": true,
    "data_payment": [
        {
          "id": "MPI-ID-12345",
          "create_time": 1662566709,
          "status": "pending",
          "statustrx_time": 1662566709,
          "referenceId": "DISBURST_REFF01",
          "paymentType": "send",
          "Amount": "10000",
          "fee": 4500,
          "totalAmount": 14500,
          "callback": "https://yourcallback.com/mpay",
          "paymentMethod": {
            "trans_hash": "MPI-72cad731-5f43-45a7-bc2b-0799dd3daba3",
            "trxid_bank": "MPI-72cad731-5f43-45a7-bc2b-0799dd3daba3",
            "bankShort": "BCA",
            "recipient_name": "",
            "recipient_account": "123456789",
            "amount": "10000",
            "note": "",
            "email": "",
            "schedule_date": ""
          }
        }
    ]
}

List Bank Supported (bankShort)

bankShort Bank Name Digital Code
BCA Bank Central Asia 014
MANDIRI Bank Mandiri 008
BNI Bank Negara Indonesia 009
PERMATA Bank Permata 013
BRI Bank Rakyat Indonesia 002
CIMB_NIAGA CIMB Niaga Bank 022
DANAMON Bank Danamon 011
PANIN Bank Panin 019
BII Bank Maybank 016
ANGLOMAS Anglomas International Bank 531
BANGKOK Bangkok Bank 040
IBK Bank IBK Indonesia 945
SINARMAS Sinarmas 153
BRI_AGRO Bank BRI Agro 494
ANDARA Bank Andara 466
ANTAR_DAERAH Bank CCB Indonesia 088
ANZ Bank ANZ Indonesia 061
ARTHA Bank Artha Graha International 037
ARTOS Bank Artos Indonesia 542
BISNIS Bank Bisnis Internasional 459
BJB Bank BJB 110
BNP Bank BNP Paribas 057
BUKOPIN Bank Bukopin 441
BUMI_ARTA Bank Bumi Arta 076
CAPITAL Bank Capital Indonesia 054
BCA_SYR Bank Central Asia (BCA) Syariah 536
CHINATRUST Bank Chinatrust Indonesia 069
CIMB_UUS Bank CIMB Niaga UUS 022
COMMONWEALTH Bank Commonwealth 950
DBS Bank DBS Indonesia 046
DINAR_INDONESIA Bank Dinar Indonesia 526
OKE Bank OKE 466
DKI Bank DKI 111
FAMA Bank Fama International 562
GANESHA Bank Ganesha 161
HANA Bank Hana 484
HARDA_INTERNASIONAL Bank Harda Internasional 567
WOORI_SAUDARA Bank Woori Saudara 212
ICBC Bank ICBC Indonesia 164
INA_PERDANA Bank Ina Perdana 513
INDEX_SELINDO Bank Index Selindo 555
JASA_JAKARTA Bank Jasa Jakarta 472
KESEJAHTERAAN_EKONOMI Bank Kesejahteraan Ekonomi 535
MASPION Bank Maspion Indonesia 157
MAYAPADA Bank Mayapada International 097
MAYBANK_SYR Bank Maybank Syariah Indonesia 947
MAYORA Bank Mayora 553
MEGA Bank Mega 426
MESTIKA_DHARMA Bank Mestika Dharma 151
SHINHAN Bank Shinhan Indonesia 152
MIZUHO Bank Mizuho Indonesia 48
MNC_INTERNASIONAL Bank MNC Internasional 485
MUAMALAT Bank Muamalat Indonesia 147
MULTI_ARTA_SENTOSA Bank Multi Arta Sentosa 548
J_TRUST Bank J Trust Indonesia 095
NATIONALNOBU Bank Nationalnobu 503
NUSANTARA_PARAHYANGAN Bank Nusantara Parahyangan 145
OCBC Bank OCBC NISP 028
BOC Bank of China (BOC) 069
INDIA Bank of India Indonesia 146
PANIN_SYR Bank Panin Syariah 517
QNB Bank QNB Indonesia 167
RABOBANK Bank Rabobank International Indonesia 060
RESONA Bank Resona Perdania 047
ROYAL Bank Royal Indonesia 501
BTPN_SYR Bank BTPN Syariah 547
SAHABAT_SAMPOERNA Bank Sahabat Sampoerna 523
SBI_INDONESIA Bank SBI Indonesia 498
MANDIRI_TASPEN Bank Mandiri Taspen 564
MITSUI Bank Sumitomo Mitsui Indonesia 045
BRI_SYR Bank Syariah BRI 422
BUKOPIN_SYR Bank Syariah Bukopin 521
MANDIRI_SYR Bank Syariah Mandiri 451
MEGA_SYR Bank Syariah Mega 506
BTN Bank Tabungan Negara (BTN) 200
UOB Bank UOB Indonesia 023
VICTORIA_INTERNASIONAL Bank Victoria Internasional 566
VICTORIA_SYR Bank Victoria Syariah 405
CCB Bank CCB Indonesia 036
YUDHA_BHAKTI Bank Yudha Bhakti 490
ACEH BPD Aceh 116
BANTEN BPD Banten 137
BALI BPD Bali 129
BENGKULU BPD Bengkulu 133
BPD_DIY Bank Pembangunan Daerah (BPD DIY) 112
JAMBI BPD Jambi 115
JAWA_TENGAH BPD Jawa Tengah 113
JAWA_TIMUR BPD Jawa Timur 114
KALIMANTAN_BARAT BPD Kalimantan Barat 123
KALIMANTAN_SELATAN BPD Kalimantan Selatan 122
KALIMANTAN_TENGAH BPD Kalimantan Tengah 123
KALIMANTAN_TIMUR BPD Kalimantan Timur 124
LAMPUNG BPD Lampung 121
MALUKU BPD Maluku 131
PAPUA BPD Papua 132
RIAU_DAN_KEPRI BPD Riau Dan Kepri 119
SULAWESI BPD Sulawesi Tengah 134
SULSELBAR BPD Sulselbar 126
SULUTGO Bank Sulutgo 127
SUMSEL_DAN_BABEL BPD Sumsel Dan Babel 120
SUMUT BPD Sumut 117
CENTRATAMA Centratama Nasional Bank 559
CITIBANK Citibank 031
HSBC Hongkong and Shanghai Bank Corporation (HSBC) 087
JPMORGAN JP Morgan Chase Bank 032
PRIMA_MASTER Prima Master Bank 520
STANDARD_CHARTERED Standard Charted Bank 050
MITRA_NIAGA Bank Mitra Niaga 491
EKSPOR_INDONESIA Bank Ekspor Indonesia 003
ARTA_NIAGA_KENCANA Bank Arta Niaga Kencana 020
BJB_SYR Bank BJB Syariah 425
BNI_SYR Bank BNI Syariah 427
BPR_KS BPR Karyajatnika Sadaya 688
METRO_EXPRESS Bank Metro Express 152
SINAR_HARAPAN_BALI Bank Sinar Harapan Bali 564
WINDU Bank Windu Kentjana Int 162
PUNDI_INDONESIA Bank Eksekutif Internasional 558
ABN_AMRO Bank ABN Amro 052
KEBD Korea Exchange Bank Danamon 059
OCBC_INDONESIA Bank OCBC - Indonesia 028
JENIUS Bank Jenius (BTPN) 213
topup_ovo OVO ovo
topup_linkaja LinkAja linkaja
topup_dana DANA dana
topup_gopay Gopay gopay
topup_shopeepay ShopeePay shopeepay
Bank Syariah Indonesia bsm 451

Dynamic QRIS

This API will be used by partner to request Dynamic QRIS for payment.

Request Dynamic QRIS

[PATH] : [URL_ENDPOINT]/qris/created/

Example Request Dynamic QRIS

Example Check Status Disburstment

<?php
$keyProject = 'MPI-xxxxxxxx';
$tokenProject = 'asdf12456789asfghjkl';

$referenceId = "QRIS_REFF_01";
$signHash = hash_hmac('sha512', $keyProject+$referenceId, $tokenProject);
$amount = "10000";
$callbackUrl = "https://yourcallback.com/mpay";
$viewame = "Jhone Doe";
$expTime = "5";

$req_data = [
    'key' => $keyProject,
    'token' => $tokenProject,
    'referenceId' => $referenceId,
    'signHash' => $signHash,
    'amount' => $amount,
    'callbackUrl' => $callbackUrl,
    'viewName' => $viewName,
    'expTime' => $expTime
];

$data_payload = json_encode($req_data);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-prod.mitrapayment.com/api/v4/qris/created/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data_payload,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Parameter Type Description
key string Key project from MPAY
token string Token project from MPAY
referenceId string(255) merchant trx id must be unique
signHash sha512 Hashing from sha512 or if you use PHP this sampe code signHash -> hash_hmac(‘sha512’, key_project+referenceId, token_project);
amount string/integer Amount your user must paid to complete the transaction
callbackUrl string url that will receive payment success / fail notification (Must HTTPS)
viewName string(20) Customizable display name that will be seen by user
expTime string Transaction expiration time in minutes, e.g If Transaction want to be expired after 5 minutes, you just have to set expTime to 5.

Response Dynamic QRIS

This Response If Dynamic QRIS Success Created

Response Request E-Wallet:

{
  "success": true,
  "data_payment": {
    "id": "MPI-ID-1234567",
    "status": "pending",
    "referenceId": "QRIS_REFF_01",
    "paymentType": "receive",
    "paymentName": "Qris",
    "feeTo": "enduser",
    "amount": "10000",
    "fee": 70,
    "totalAmount": 10070,
    "callback": "https://yourcallback.com/mpay",
    "paymentDetail": {
      "imageQris": "https://api-prod.mitrapayment.com/get_images?id=MPI-7260e53f-8953-4c7b-a80c-4f0c5e7421a1",
      "contentQris": "00020101021226670016COM.NOBUBANK.WWW01189360050300000489870214081100000314640303UMI51440014ID.CO.QRIS.WWW0215ID20200814002040303UMI5204549953033605405100005802ID5913MITRA PAYMENT6015Banten - Kota T61052322362830114090800000426610525MPI-1a77dd9b-e4dd-4a08-8f0625MPI-1a77dd9b-e4dd-4a08-8f0703A01630487D6",
      "displayName": "Jhone Doe"
    }
  }
}
Parameter Object Description
success - (Boolean) this will be true if the virtual account is successfully created
data_payment [data_payment] data_payment object if the virtual account is created successfully
id [data_payment] our transaction id
create_time [data_payment] Executionn time in MPAY system (‘timestamp’)
status [data_payment] transaction status, for the initial creation, the default will be pending
statustrx_time [data_payment] Latest status change of a transaction. Example from ‘pending’ to ‘sukses’ (‘timestamp’)
referenceId [data_payment] trx id from merchant / mitra / user
paymentType [data_payment] receive or send it`s type of transaction used
paymentName [data_payment] our product name
feeTo [data_payment] enduser or merchant, if set to enduser all fee are borne by the end user
Amount [data_payment] amount request
fee [data_payment] the fee we provide
totalAmount [data_payment] total amount, if the fee is borne by the enduser, the nominal request will be added to the nominal fee and if it is charged to the merchant then this will be filled according to the nominal money that the merchant has requested
callback [data_payment] webhook merchant that will receive payment success/fail notification
paymentDetail [data_payment][paymentDetail] paymentDetail details
imageQris [data_payment][paymentDetail] Url Image QR National Dynamic Data
contentQris [data_payment][paymentDetail] QR National Dynamic Data
displayName [data_payment][paymentDetail] Customizable display name that will be seen by user

E-Wallet

E-Wallet Aggregator API allows partners / mitra to seamlessly charge and receive payments directly from top e-wallet issuers. With one integration, they are able to get access to all of OY’s available e-wallets ((OVO, ShopeePay, LinkAja, and DANA) and upcoming e-wallet integrations.

Request E-Wallet

[PATH] : [URL_ENDPOINT]/ewallet/created/{{E_WALLET_CODE}}

Example Request E-Wallet

<?php
$keyProject = 'MPI-xxxxxxxx';
$tokenProject = 'asdf12456789asfghjkl';

$e_walletCode = "dana";

$amount = "10000";
$referenceId = "ewallet_01";
$signHash = hash_hmac('sha512', $keyProject+$referenceId, $tokenProject);
$callbackUrl = "https://yourcallback.com/mpay";
$viewame = "Jhone Doe";
$expTime = "60";
$successRedirectUrl = "https://mitrapayment.com/REDIRECT";
$mobileNumber = "0811111111";

$req_data = [
    'key' => $keyProject,
    'token' => $tokenProject,
    'referenceId' => $referenceId,
    'amount' => $amount,
    'callbackUrl' => $callbackUrl,
    'signHash' => $signHash,
    'viewName' => $viewame,
    'successRedirectUrl' => $successRedirectUrl,
    'mobileNumber' => $mobileNumber,
    'expTime' => $expTime,
];

$data_payload = json_encode($req_data);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-prod.mitrapayment.com/api/v4/ewallet/created/'.$e_walletCode,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data_payload,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Parameter Type Description
key string Key project from MPAY
token string Token project from MPAY
referenceId string(255) merchant trx id must be unique
amount string/integer Amount your user must paid to complete the transaction
callbackUrl string url that will receive payment success / fail notification (Must HTTPS)
signHash sha512 Hashing from sha512 or if you use PHP this sampe code signHash -> hash_hmac(‘sha512’, key_project+referenceId, token_project);
viewName string(20) Customizable display name that will be seen by user
successRedirectUrl string Indicates the URL of your environment (to redirect the customers back once payment has been completed in e-wallet issuers.)
mobileNumber string Customer mobile number
expTime string Transaction expiration time in minutes, e.g If Transaction want to be expired after 5 minutes, you just have to set expTime to 5.

Response E-Wallet

This Response If E-Wallet Success Created

Response Request E-Wallet:

{
  "success": true,
  "data_payment": {
    "id": "MPI-ID-12456",
    "status": "pending",
    "referenceId": "ewallet_01",
    "paymentType": "receive",
    "paymentName": "DANA",
    "feeTo": "enduser",
    "amount": "10000",
    "fee": 250,
    "totalAmount": 10250,
    "callback": "https://yourcallback.com/mpay",
    "paymentDetail": {
      "trx_id": 12456,
      "trans_hash": "MPI-7260e53f-8953-4c7b-a80c-4f0c5e7421a1",
      "wallet": "dana",
      "viewName": "JHONDOE",
      "phone": "08111223344",
      "qrcode": "00020101021226680016COM.NOBUBANK.WWW011993600503000000309000214082200000002450303UBE51440014ID.CO.QRISWWW0215ID20190822000010303UBE520454995303360540450005502015802ID5925PT.MITRA PEMBAYARAN INDONESIA, JAKARTA610515811625301140822000022963305031230617201908221840560010703A0163042904",
      "checkout_url": "https://checkout.mitrapayment.com/success",
      "image_url": "https://api-prod.mitrapayment.com/get_images?id=MPI-7260e53f-8953-4c7b-a80c-4f0c5e7421a1"
    }
  }
}
Parameter Object Description
paymentDetail [data_payment][paymentDetail] paymentDetail details
trx_id [data_payment][paymentDetail] our integer transaction id
trans_hash [data_payment][paymentDetail] our hashing transaction
wallet [data_payment][paymentDetail] wallet name or our product name
viewName [data_payment][paymentDetail] Customizable display name that will be seen by user
phone [data_payment][paymentDetail] Customer mobile number
qrcode [data_payment][paymentDetail] QR National Dynamic Data
checkout_url [data_payment][paymentDetail] Checkout URL passed from the e-wallet issuers to be used for payment purposes
image_url [data_payment][paymentDetail] Url Image QR National Dynamic Data

E-Wallet Code

E-Wallet Providers E_WALLET_CODE Minimum (IDR) Maximum (IDR)
DANA dana 1.000 10.000.000
OVO ovo 1.000 10.000.000
SHOPEEPAY shopeepay 1.000 10.000.000

We provide payment links for OVO as an alternative

Flow for the ovo payment link :

[PATH] : [URL_ENDPOINT]/ewallet/payment_link/ovo

requests are the same as ewallets you can provide to this Request E-Wallet

the merchant provides a checkout url to the end user

Credit Card Link

This API will be used by partner to request Credit Card Link for payment.

[PATH] : [URL_ENDPOINT]/credit-card/request

Example Request Credit Card Link

<?php
$keyProject = 'MPI-xxxxxxxx';
$tokenProject = 'asdf12456789asfghjkl';

$amount = "10000";
$referenceId = "cc-reff-01";
$signHash = hash_hmac('sha512', $keyProject+$referenceId, $tokenProject);
$callbackUrl = "https://yourcallback.com/mpay";
$viewame = "Jhone Doe";
$expTime = "60";
$mobileNumber = "0811111111";

$req_data = [
    'key' => $keyProject,
    'token' => $tokenProject,
    'referenceId' => $referenceId,
    'amount' => $amount,
    'callbackUrl' => $callbackUrl,
    'signHash' => $signHash,
    'viewName' => $viewame,
    'mobileNumber' => $mobileNumber,
    'expTime' => $expTime,
];

$data_payload = json_encode($req_data);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-prod.mitrapayment.com/api/v4/credit-card/request',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data_payload,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Parameter Type Description
key string Key project from MPAY
token string Token project from MPAY
referenceId string(255) merchant trx id must be unique
amount string/integer Amount your user must paid to complete the transaction
callbackUrl string url that will receive payment success / fail notification (Must HTTPS)
signHash sha512 Hashing from sha512 or if you use PHP this sampe code signHash -> hash_hmac(‘sha512’, key_project+referenceId, token_project);
viewName string(20) Customizable display name that will be seen by user
mobileNumber string(14) Customer mobile number, prefix 08 e.g (0811223344)
expTime string Transaction expiration time in minutes, e.g If Transaction want to be expired after 5 minutes, you just have to set expTime to 5.

This Response If Credit Card Link Success Created

Response Request Credit Card Link:

{
    "success": true,
    "data_payment": {
        "id": "MPI-f58c8ac8-38de-47a1-80fa-096448bed0a4",
        "status": "pending",
        "referenceId": "cc-reff-01",
        "paymentType": "receive",
        "paymentName": "Credit Card Link",
        "feeTo": "merchant",
        "amount": "10000",
        "fee": 6000,
        "totalAmount": 10000,
        "callback": "https://mitrapayment.com/callback",
        "paymentDetail": {
            "checkout_url": "https://pay.mitrapayment.com/7a3d34b0-6c97-4de0-be2b-24193b6e0c37",
            "customer_name": "Jhone Doe"
        }
    }
}
Parameter Object Description
paymentDetail [data_payment][paymentDetail] paymentDetail details
checkout_url [data_payment][paymentDetail] Payment link which used for payment
customer_name [data_payment][paymentDetail] Customizable display name that will be seen by user

Retail Offline

Retail Offline enables your users to deposit money from Mpay channel such as Cash Recycle Machine (CRM) and convenience store.

Request Retail Offline

[PATH] : [URL_ENDPOINT]/retail/request/{{RETAIL_CHANNEL_CODE}}

Example Request Retail Offline

<?php
$keyProject = 'MPI-xxxxxxxx';
$tokenProject = 'asdf12456789asfghjkl';

$retail_cahnnel = "alfamart";

$amount = "10000";
$referenceId = "alfamart_01";
$signHash = hash_hmac('sha512', $keyProject+$referenceId, $tokenProject);
$callbackUrl = "https://yourcallback.com/mpay";
$viewame = "Jhone Doe";
$mobileNumber = "0811111111";

$req_data = [
    'key' => $keyProject,
    'token' => $tokenProject,
    'referenceId' => $referenceId,
    'signHash' => $signHash,
    'amount' => $amount,
    'callbackUrl' => $callbackUrl,
    'viewName' => $viewame,
    'mobileNumber' => $mobileNumber,
];

$data_payload = json_encode($req_data);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api-prod.mitrapayment.com/api/v4/retail/request/'.$retail_cahnnel,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => $data_payload,
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Parameter Type Description
key string Key project from MPAY
token string Token project from MPAY
referenceId string(255) merchant trx id must be unique
amount string/integer Amount your user must paid to complete the transaction
callbackUrl string url that will receive payment success / fail notification (Must HTTPS)
signHash sha512 Hashing from sha512 or if you use PHP this sampe code signHash -> hash_hmac(‘sha512’, key_project+referenceId, token_project);
viewName string(20) Customizable display name that will be seen by user
mobileNumber string Customer mobile number

Response Retail Offline

This Response Success Created

Response Request E-Wallet:

{
    "success": true,
    "data_payment": {
        "id": "MPI-acb2b533-b1f1-4e2d-a8e2-f44199c3b7d4",
        "status": "pending",
        "referenceId": "alfamart_01",
        "paymentType": "receive",
        "paymentName": "ALFAMART",
        "feeTo": "merchant",
        "amount": "10000",
        "fee": 5000,
        "totalAmount": 10000,
        "callback": "https://yourcallback.com/mpay",
        "paymentDetail": {
            "payment_code": "428998053008",
            "expired_at": "2022-12-31 16:26:05.000"
        }
    }
}
Parameter Object Description
paymentDetail [data_payment][paymentDetail] paymentDetail details
payment_code [data_payment][paymentDetail] Required unique code for Deposit process
expired_at [data_payment][paymentDetail] The time that the transaction will expire and won’t be able to be deposited (“yyyy-MM-dd HH:mm:ss.SSS”)

Retail Offline Channel Code

Retail Name RETAIL_CHANNEL_CODE Minimum (IDR) Maximum (IDR) Status Channel
ALFAMART alfamart 10.000 5.000.000 Ready
INDOMARET indomart 10.000 5.000.000 Cooming Soon
DANDAN dandan 10.000 5.000.000 Cooming Soon

Callback

Once the request is opened, our system will generate a request callback status to open the system to your system and will send it according to the callback_url

Callback Virtual Account

Example Callback Virtual Account

{
  "success": true,
  "data_payment": {
    "id": "MPI-ID-12345",
    "create_time": 1662549962,
    "status": "sukses",
    "statustrx_time": 1662549962,
    "referenceId": "TEST_01",
    "paymentType": "receive",
    "paymentName": "VA Permata",
    "feeTo": "merchant",
    "Amount": "10000",
    "fee": 4500,
    "totalAmount": 10000,
    "callback": "https://yourcallback.com/mpay",
    "paymentMethod": {
      "trx_id": 12345,
      "trans_hash": "MPI-72cad731-5f43-45a7-bc2b-0799dd3daba3",
      "bank": "va_permata",
      "viewName": "Jhone Doe",
      "accountNo": "7392600003243381",
      "reqType": "oneoff",
      "useCase": "single",
      "paidCounter": 0
    }
  }
}
Parameter Object Description
success - (Boolean) this will be true if the virtual account is successfully created
data_payment [data_payment] data_payment object if the virtual account is created successfully
id [data_payment] our transaction id
create_time [data_payment] Executionn time in MPAY system (‘timestamp’)
status [data_payment] transaction status, see Status Transaction
statustrx_time [data_payment] Latest status change of a transaction. Example from ‘pending’ to ‘sukses’ (‘timestamp’)
referenceId [data_payment] trx id from merchant / mitra / user
paymentType [data_payment] receive or send it`s type of transaction used
paymentName [data_payment] our product name
feeTo [data_payment] enduser or merchant, if set to enduser all fee are borne by the end user
Amount [data_payment] amount request
fee [data_payment] the fee we provide
totalAmount [data_payment] total amount, if the fee is borne by the enduser, the nominal request will be added to the nominal fee and if it is charged to the merchant then this will be filled according to the nominal money that the merchant has requested
callback [data_payment] webhook merchant that will receive payment success/fail notification
paymentMethod [data_payment][paymentMethod] paymentMethod details
trx_id [data_payment][paymentMethod] our integer transaction id
trans_hash [data_payment][paymentMethod] our hashing transaction
bank [data_payment][paymentMethod] bank name or our product name
viewName [data_payment][paymentMethod] Customizable VA display name that will be seen by user
accountNo [data_payment][paymentMethod] Generated VA number
reqType [data_payment][paymentMethod] oneoff for close amount and persistent for open amount
useCase [data_payment][paymentMethod] single or multiple
paidCounter [data_payment][paymentMethod] paid counter

Callback Disburstment

Example Callback Disburstment

{
  "success": true,
  "data_payment": {
    "id": "MPI-ID-12345",
    "create_time": 1662566709,
    "status": "sukses",
    "statustrx_time": 1662566709,
    "referenceId": "DISBURST_REFF01",
    "paymentType": "send",
    "Amount": "10000",
    "fee": 4500,
    "totalAmount": 14500,
    "callback": "https://yourcallback.com/mpay",
    "paymentMethod": {
      "trans_hash": "MPI-72cad731-5f43-45a7-bc2b-0799dd3daba3",
      "trxid_bank": "MPI-72cad731-5f43-45a7-bc2b-0799dd3daba3",
      "bankShort": "BCA",
      "recipient_name": "",
      "recipient_account": "123456789",
      "amount": "10000",
      "note": "",
      "email": "",
      "schedule_date": ""
    }
  }
}
Parameter Object Description
success - (Boolean) this will be true if the virtual account is successfully created
data_payment [data_payment] data_payment object if the virtual account is created successfully
id [data_payment] our transaction id
create_time [data_payment] Executionn time in MPAY system (‘timestamp’)
status [data_payment] transaction status, see Status Transaction
statustrx_time [data_payment] Latest status change of a transaction. Example from ‘pending’ to ‘sukses’ (‘timestamp’)
referenceId [data_payment] trx id from merchant / mitra / user
paymentType [data_payment] receive or send it`s type of transaction used
paymentName [data_payment] our product name
feeTo [data_payment] enduser or merchant, if set to enduser all fee are borne by the end user
Amount [data_payment] amount request
fee [data_payment] the fee we provide
totalAmount [data_payment] the amount of merchant balance that we will deduct
callback [data_payment] webhook merchant that will receive payment success/fail notification
paymentMethod [data_payment][paymentMethod] paymentMethod details
trans_hash [data_payment][paymentMethod] our transaction hash
trxid_bank [data_payment][paymentMethod] our transaction hash to bank
bankShort [data_payment][paymentMethod] bankShort or our product name
recipient_name [data_payment][paymentMethod] account owner name
recipient_account [data_payment][paymentMethod] Beneficiary account number
amount [data_payment][paymentMethod] the amount to be transferred to beneficiary account number
note [data_payment][paymentMethod] note for this transaction
email [data_payment][paymentMethod] email for notification
schedule_date [data_payment][paymentMethod] date schedule (COOMING SOON)

Callback E-Wallet

Example Callback E-Wallet:

{
  "success": true,
  "data_payment": {
    "id": "MPI-ID-12456",
    "status": "sukses",
    "referenceId": "ewallet_01",
    "paymentType": "receive",
    "paymentName": "DANA",
    "feeTo": "enduser",
    "amount": "10000",
    "fee": 250,
    "totalAmount": 10250,
    "callback": "https://yourcallback.com/mpay",
    "paymentDetail": {
      "trx_id": 12456,
      "trans_hash": "MPI-7260e53f-8953-4c7b-a80c-4f0c5e7421a1",
      "wallet": "dana",
      "viewName": "JHONDOE",
      "phone": "08111223344",
      "qrcode": null,
      "checkout_url": "https://checkout.mitrapayment.com/success",
      "image_url": "https://api-prod.mitrapayment.com/get_images?id=MPI-7260e53f-8953-4c7b-a80c-4f0c5e7421a1"
    }
  }
}
Parameter Object Description
success - (Boolean) this will be true if the virtual account is successfully created
data_payment [data_payment] data_payment object if the virtual account is created successfully
id [data_payment] our transaction id
create_time [data_payment] Executionn time in MPAY system (‘timestamp’)
status [data_payment] transaction status, see Status Transaction
statustrx_time [data_payment] Latest status change of a transaction. Example from ‘pending’ to ‘sukses’ (‘timestamp’)
referenceId [data_payment] trx id from merchant / mitra / user
paymentType [data_payment] receive or send it`s type of transaction used
paymentName [data_payment] our product name
feeTo [data_payment] enduser or merchant, if set to enduser all fee are borne by the end user
Amount [data_payment] amount request
fee [data_payment] the fee we provide
totalAmount [data_payment] total amount, if the fee is borne by the enduser, the nominal request will be added to the nominal fee and if it is charged to the merchant then this will be filled according to the nominal money that the merchant has requested
callback [data_payment] webhook merchant that will receive payment success/fail notification
paymentDetail [data_payment][paymentDetail] paymentDetail details
trx_id [data_payment][paymentDetail] our integer transaction id
trans_hash [data_payment][paymentDetail] our hashing transaction
wallet [data_payment][paymentDetail] wallet name or our product name
viewName [data_payment][paymentDetail] Customizable display name that will be seen by user
phone [data_payment][paymentDetail] Customer mobile number
qrcode [data_payment][paymentDetail] QR National Dynamic Data
checkout_url [data_payment][paymentDetail] Checkout URL passed from the e-wallet issuers to be used for payment purposes
image_url [data_payment][paymentDetail] Url Image QR National Dynamic Data

Example Callback Credit Card Link:

{
    "success": true,
    "data_payment": {
        "id": "MPI-f58c8ac8-38de-47a1-80fa-096448bed0a4",
        "status": "sukses",
        "referenceId": "cc-reff-01",
        "paymentType": "receive",
        "paymentName": "Credit Card Link",
        "feeTo": "merchant",
        "amount": "10000",
        "fee": 6000,
        "totalAmount": 10000,
        "callback": "https://mitrapayment.com/callback",
        "paymentDetail": {
            "checkout_url": "https://pay.mitrapayment.com/7a3d34b0-6c97-4de0-be2b-24193b6e0c37",
            "customer_name": "Jhone Doe"
        }
    }
}
Parameter Object Description
success - (Boolean) this will be true if the virtual account is successfully created
data_payment [data_payment] data_payment object if the virtual account is created successfully
id [data_payment] our transaction id
create_time [data_payment] Executionn time in MPAY system (‘timestamp’)
status [data_payment] transaction status, see Status Transaction
statustrx_time [data_payment] Latest status change of a transaction. Example from ‘pending’ to ‘sukses’ (‘timestamp’)
referenceId [data_payment] trx id from merchant / mitra / user
paymentType [data_payment] receive or send it`s type of transaction used
paymentName [data_payment] our product name
feeTo [data_payment] enduser or merchant, if set to enduser all fee are borne by the end user
Amount [data_payment] amount request
fee [data_payment] the fee we provide
totalAmount [data_payment] total amount, if the fee is borne by the enduser, the nominal request will be added to the nominal fee and if it is charged to the merchant then this will be filled according to the nominal money that the merchant has requested
callback [data_payment] webhook merchant that will receive payment success/fail notification
paymentDetail [data_payment][paymentDetail] paymentDetail details
checkout_url [data_payment][paymentDetail] Payment link which used for payment
customer_name [data_payment][paymentDetail] Customizable display name that will be seen by user

Callback Retail Offline

Example Callback Retail Offline:

{
    "success": true,
    "data_payment": {
        "id": "MPI-acb2b533-b1f1-4e2d-a8e2-f44199c3b7d4",
        "status": "sukses",
        "referenceId": "alfamart_01",
        "paymentType": "receive",
        "paymentName": "ALFAMART",
        "feeTo": "merchant",
        "amount": "10000",
        "fee": 5000,
        "totalAmount": 10000,
        "callback": "https://yourcallback.com/mpay",
        "paymentDetail": {
            "payment_code": "428998053008",
            "expired_at": "2022-12-31 16:26:05.000"
        }
    }
}
Parameter Object Description
success - (Boolean) this will be true if the virtual account is successfully created
data_payment [data_payment] data_payment object if the virtual account is created successfully
id [data_payment] our transaction id
create_time [data_payment] Executionn time in MPAY system (‘timestamp’)
status [data_payment] transaction status, see Status Transaction
statustrx_time [data_payment] Latest status change of a transaction. Example from ‘pending’ to ‘sukses’ (‘timestamp’)
referenceId [data_payment] trx id from merchant / mitra / user
paymentType [data_payment] receive or send it`s type of transaction used
paymentName [data_payment] our product name
feeTo [data_payment] enduser or merchant, if set to enduser all fee are borne by the end user
Amount [data_payment] amount request
fee [data_payment] the fee we provide
totalAmount [data_payment] total amount, this does not include admin fees from retail channels (the transaction fee policy for each retail in various regions in Indonesia varies)
callback [data_payment] webhook merchant that will receive payment success/fail notification
paymentDetail [data_payment][paymentDetail] paymentDetail details
payment_code [data_payment][paymentDetail] Required unique code for Deposit process
expired_at [data_payment][paymentDetail] The time that the transaction will expire and won’t be able to be deposited (“yyyy-MM-dd HH:mm:ss.SSS”)

Status Transaction

Status State Description
sukses FINAL Transaction is completed (Success / Paid)
gagal FINAL Transaction is failed
expired FINAL Transaction is expired
pending NON-FINAL Transaction is pending (Processed / Unpaid)
null NON-FINAL you should contact our team immediately if you see this status
empty NON-FINAL you should contact our team immediately if you see this status

Error Response Code

{
    "success": false,
    "error_code": "API_AUTHORIZE_ERROR",
    "message": "You do not have authorization to access this API. Please provide personal access token from your account!"
}
Parameter Type Description
success Boolean false means that this failed crated VA
error_code string this is error_code from MPAY you can see error_code here
message string this is a message from an error

Below is the list of response codes for API MPAY:

Change Log

API VERSION 4.0

MPAY Changelog Documentation API

5 Jan 2023

30 Dec 2022

08 Dec 2022

08 Sept 2022

php