One of the e-money payment methods offered by Faspay is OVO. By using this payment method, customers can make a payment via e-money website and Faspay will send real-time notifications when the customer completes the payment.
The basic integration process of OVO will be explained below.
Integration Step
Post Data Transaction to Faspay
1. Post Data Transaction
Post data transactions should be done from the merchant backend, the detailed API reference can be found Here
This is an example of a request post data transaction for OVO channel
A. Post Data Transaction Request
Post Data Request (XML) Post Data Request (JSON)
Copy <?xml version="1.0" encoding="UTF-8" ?>
<faspay>
<request>Post Data Transaction</request>
<merchant_id>99999</merchant_id>
<merchant>Sophia Store</merchant>
<bill_no>20201222024304</bill_no>
<bill_reff>20200324_02-2286704_336</bill_reff>
<bill_date>2020-12-19 06:04:29</bill_date>
<bill_expired>2020-12-19 07:04:29</bill_expired>
<bill_desc>Payment Online Via Faspay</bill_desc>
<bill_currency>IDR</bill_currency>
<bill_gross>100000</bill_gross>
<bill_miscfee>100000</bill_miscfee>
<bill_total>200000</bill_total>
<cust_no>01</cust_no>
<cust_name>John Doe</cust_name>
<payment_channel>812</payment_channel>
<pay_type>01</pay_type>
<msisdn>8562927907</msisdn>
<email>john@gmail.com</email>
<terminal>10</terminal>
<billing_address>Jl Sabang 37</billing_address>
<billing_address_city>Jakarta</billing_address_city>
<billing_address_region>DKI Jakarta</billing_address_region>
<billing_address_state>Indonesia</billing_address_state>
<billing_address_poscode>10170</billing_address_poscode>
<billing_address_country_code>ID</billing_address_country_code>
<receiver_name_for_shipping>John Doe</receiver_name_for_shipping>
<shipping_address>Jl. Sabang 37</shipping_address>
<shipping_address_city>Jakarta</shipping_address_city>
<shipping_address_region>DKI Jakarta</shipping_address_region>
<shipping_address_state>Indonesia</shipping_address_state>
<shipping_address_poscode>10170</shipping_address_poscode>
<item>
<id>A001</id>
<product>Invoice #2286704</product>
<qty>1</qty>
<amount>100000</amount>
<payment_plan>01</payment_plan>
<merchant_id>99999</merchant_id>
<tenor>00</tenor>
</item>
<reserve1></reserve1>
<reserve2></reserve2>
<signature>92c41cf28825f8065530f09726b3c6f0bd2e218e</signature>
</faspay>
Copy {
"request": "Post Data Transaction",
"merchant_id": "99999",
"merchant": "Sophia Store",
"bill_no": "20201222024304",
"bill_reff": "20200324_02-2286704_336",
"bill_date": "2020-12-19 06:04:29",
"bill_expired": "2020-12-19 07:04:29",
"bill_desc": "Payment Online Via Faspay",
"bill_currency": "IDR",
"bill_gross": "100000",
"bill_miscfee": "100000",
"bill_total": "200000",
"cust_no": "01",
"cust_name": "John Doe",
"payment_channel": "812",
"pay_type": "01",
"msisdn": "8562927907",
"email": "john@gmail.com",
"terminal": "10",
"billing_address": "Jl Sabang 37",
"billing_address_city": "Jakarta",
"billing_address_region": "DKI Jakarta",
"billing_address_state": "Indonesia",
"billing_address_poscode": "10170",
"billing_address_country_code": "ID",
"receiver_name_for_shipping": "John Doe",
"shipping_address": "Jl. Sabang 37",
"shipping_address_city": "Jakarta",
"shipping_address_region": "DKI Jakarta",
"shipping_address_state": "Indonesia",
"shipping_address_poscode": "10170",
"item": {
"id": "A001",
"product": "Invoice #2286704",
"qty": "1",
"amount": "100000",
"payment_plan": "01",
"merchant_id": "99999",
"tenor": "00"
},
"reserve1": "",
"reserve2": "",
"signature": "92c41cf28825f8065530f09726b3c6f0bd2e218e"
}
B. Post Data Transaction Response
You will get the post data response like the following:
Post Data Response (XML) Post Data (JSON)
Copy <?xml version="1.0" encoding="UTF-8" ?>
<faspay>
<response>Transmission of Purchase Detail Info</response>
<trx_id>9999981200980185</trx_id>
<merchant_id>99999</merchant_id>
<merchant>Sophia Store</merchant>
<bill_no>20201222024304</bill_no>
<bill_items>
<id>A001</id>
<product>Invoice #2286704</product>
<qty>1</qty>
<amount>100000</amount>
<payment_plan>01</payment_plan>
<merchant_id>99999</merchant_id>
<tenor>00</tenor>
</bill_items>
<response_code>00</response_code>
<response_desc>Success</response_desc>
<redirect_url>https://dev.faspay.co.id/pws/100003/0830000010100000/92c41cf28825f8065530f09726b3c6f0bd2e218e?trx_id=9999981200980185&merchant_id=99999&bill_no=20201222024304
</redirect_url>
</faspay>
Copy {
"response": "Transmission of Purchase Detail Info",
"trx_id": "9999981200980185",
"merchant_id": "99999",
"merchant": "Sophia Store",
"bill_no": "20201222024304",
"bill_items": {
"id": "A001",
"product": "Invoice #2286704",
"qty": "1",
"amount": "100000",
"payment_plan": "01",
"merchant_id": "99999",
"tenor": "00"
},
"response_code": "00",
"response_desc": "Success",
"redirect_url" : "https://dev.faspay.co.id/pws/100003/0830000010100000/92c41cf28825f8065530f09726b3c6f0bd2e218e?trx_id=9999981200980185&merchant_id=99999&bill_no=20201222024304"
}
2. Push To Pay
Push to Pay is a process to push Ovo's customer number
There are two options to do this process :
Redirect to Faspay's page so the customer can input Ovo's number and submit to Ovo's side, to do this use redirect_url
which is retrieved from post data transaction response (JSON Format) or follows the detailed API reference Here
Please create your own page so the customer can input the Ovo's number on the merchant's website and submit it to Faspay.
How to submit Ovo's number to Faspay will explained below:
After post data transaction process please post the details below to Faspay's URL Endpoint
transaction unix id from post data transaction
customer's number already register on OVO
sha1(md5(user_id.password.trx_id))
Sample code for Push To Pay from merchant's side
Copy <?php
$user_id = 'john612345';
$passw = 'p@ssw0rd';
$trx_id = '9999981256572178';
$signature = sha1(md5($user_id.$passw.$trx_id));
$post = array('trx_id' => $trx_id,
'ovo_number' => '08817482255',
'signature' => $signature
);
$string = '<form method="post" name="form" action="https://dev.faspay.co.id/pws/ovo_direct">';
if ($post != null) {
foreach ($post as $name=>$value) {
$string .= '<input type="hidden" name="'.$name.'" value="'.$value.'">';
}
}
$string .= '</form>';
$string .= '<script> document.form.submit();</script>';
echo $string;
exit;
?>
3. Callback/Return URL
After the customer completes the payment via OVO's apps, faspay automatically redirects the customer to the Callback/Return URL. Please provide the URL and make sure it's already registered on Faspay system. For the detailed reference can be found Here
4. Payment Notification
Payment notification from Faspay to the Merchant backend will also be triggered in the event of transaction status getting updated, to ensure the merchant is securely informed. Please provide the URL and make sure it's already registered on Faspay system
The detailed API reference can be found here
Last updated 8 months ago