Appearance
Notification Callback Wallet / E-Money
For Wallet V2, Merchant now can just use attributes: transaction_status for the transaction overview, response_code, and response_message (for OVO) to update for the order status.
For OVO, since MC Payment will also send the FAILED status in callback (Other channel like Shopeepay, DANA will only send SUCCESS, EXPIRED, REFUNDED/VOID callback), merchant can get the reason of failure from the response_message. This is only for case if OVO giving back the error validation. Otherwise, you can ignore response_message and just see if it success / reversed for OVO.
So the attributes JSON for OVO FAILED callback would be like this:
Name | Value |
---|---|
transaction_status | failed |
response_code | 03 |
response_message | ovo general error / phone number invalid, etc. |
For callbacks Refund and Void, the refund history and void history will be displayed.
Upon receiving the callback, the merchant must respond with HTTP status code 200. If the merchant responds with any other HTTP status code, we will retry the callback 2 times.
Information
Hostname | |
---|---|
HTTP Method | POST |
Headers
Key | Format | Required | Value |
---|---|---|---|
Content-Type | application/json | M | |
mcp-signature | sha256(transactionid + x-req-signature) | mcp-signature | sha256(transactionid + x-req-signature) |
Example
Body raw
json
{
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{merchant_order_id}}",
"merchant_id":"{{merchant_id}}",
"reference_id": "{{transaction_reference_id}}",
"currency": "IDR",
"payment_method": "WALLET",
"payment_channel": "{{channel, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU, VIRGO}}",
"payment_system": "{{e.g : JUMPAPP, QR}}",
"transaction_status": "{{refer to transaction status table}}",
"payment_details": {
"amount": {{payment_amount}},
"expired_time": "2021-04-28T10:21:20.163+07:00",
"transaction_description": "{{trx_description}}",
"transaction_time": "2021-04-28T10:06:20.592+07:00",
"total_amount": {{total_amount}},
"paid_time": "{{paid time, e.g: 2021-04-28T10:08:14.136+07:00}}"
},
"customer_details": {
"phone": "{{customer_phone}}",
"email": "{{customer_email}}",
"full_name": "{{customer_fullname}}"
},
"item_details": [
{
"item_id": "{{item_id}}",
"name": "{{item_name}}",
"amount": {{item_price}},
"qty": {{item_qty}},
"description": "{{item_description}}"
}
],
"billing_address": {
"phone": "{{billing_phone}}",
"address": "{{billing_address}}",
"city": "{{billing_city}}",
"postal_code": "{{billing_postal_code}}",
"country": "{{billing_country}}",
"full_name": "{{billing_fullname}}"
},
"shipping_address": {
"phone": "{{shipping_price}}",
"address": "{{shipping_address}}",
"city": "{{shipping_city}}",
"postal_code": "{{shipping_postal_code}}",
"country": "{{shipping_country}}",
"full_name": "{{shipping_fullname}}"
},
"response_code": "{{refer to response code table}}",
"issuer": "{{issuer_name, e.g: SHOPEEPAY, LINKAJA, OVO, DANA. Note : only shown on transactions whose status is paid}} ",
"additional_data": "{{free text}}",
"wallet_details": {
"id": "{{wallet_id_value}}",
"id_type": "{{wallet_id_type}}"
},
//Note: refund_history will be displayed only on refunded status
"refund_history": [
{
"refund_time": "2022-03-11T14:31:20.939+07:00",
"refund_amount": 1000
}
],
//Note: void_history will be displayed only on void status
"void_history": [
{
"void_time": "2021-09-23T14:27:37.992+07:00",
"void_amount": 1000
}
],
//Note : retrieval_reference_no will be displayed only transaction that have been paid with NOBU channel
"retrieval_reference_no": "{{retrieval reference number/RRN}}",
//Note : the type of payment that will be displayed is only the status PAID
"acquirer_issuer_relation": "{{on_us/off_us}}"
}
Example Request
shell
curl --location -g '{{merchant_callback_url}}?mcp-signature={{mcp-signature}}' \
--header 'mcp-signature: 123456123213213213145' \
--data '{
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{merchant_order_id}}",
"merchant_id": "{{merchant_id}}",
"reference_id": "{{transaction_reference_id}}",
"currency": "IDR",
"payment_method": "WALLET",
"payment_channel": "{{channel, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU, VIRGO}}",
"transaction_status": "{{refer to transaction status table}}",
"payment_details": {
"amount": {{payment_amount}},
"expired_time": "2021-04-28T10:21:20.163+07:00",
"transaction_description": "{{trx_description}}",
"transaction_time": "2021-04-28T10:06:20.592+07:00",
"total_amount": {{total_amount}},
"paid_time": "{{paid time, e.g: 2021-04-28T10:08:14.136+07:00}}"
},
"customer_details": {
"phone": "{{customer_phone}}",
"email": "{{customer_email}}",
"full_name": "{{customer_fullname}}"
},
"item_details": [
{
"item_id": "{{item_id}}",
"name": "{{item_name}}",
"amount": {{item_price}},
"qty": {{item_qty}},
"description": "{{item_description}}"
}
],
"billing_address": {
"phone": "{{billing_phone}}",
"address": "{{billing_address}}",
"city": "{{billing_city}}",
"postal_code": "{{billing_postal_code}}",
"country": "{{billing_country}}",
"full_name": "{{billing_fullname}}"
},
"shipping_address": {
"phone": "{{shipping_price}}",
"address": "{{shipping_address}}",
"city": "{{shipping_city}}",
"postal_code": "{{shipping_postal_code}}",
"country": "{{shipping_country}}",
"full_name": "{{shipping_fullname}}"
},
"response_code": "{{refer to response code table}}",
"issuer": "{{issuer_name, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU}}",
"additional_data": "{{free text}}",
"wallet_details": {
"id": "{{wallet_id_value}}",
"id_type": "{{wallet_id_type}}"
},
//Note : the type of payment that will be displayed is only the status PAID
"acquirer_issuer_relation": "{{on_us/off_us}}"
}'
go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{merchant_callback_url}}?mcp-signature={{mcp-signature}}"
method := "POST"
payload := strings.NewReader(`{
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{merchant_order_id}}",
"merchant_id": "{{merchant_id}}",
"reference_id": "{{transaction_reference_id}}",
"currency": "IDR",
"payment_method": "WALLET",
"payment_channel": "{{channel, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU, VIRGO}}",
"transaction_status": "{{refer to transaction status table}}",
"payment_details": {
"amount": {{payment_amount}},
"expired_time": "2021-04-28T10:21:20.163+07:00",
"transaction_description": "{{trx_description}}",
"transaction_time": "2021-04-28T10:06:20.592+07:00",
"total_amount": {{total_amount}},
"paid_time": "{{paid time, e.g: 2021-04-28T10:08:14.136+07:00}}"
},
"customer_details": {
"phone": "{{customer_phone}}",
"email": "{{customer_email}}",
"full_name": "{{customer_fullname}}"
},
"item_details": [
{
"item_id": "{{item_id}}",
"name": "{{item_name}}",
"amount": {{item_price}},
"qty": {{item_qty}},
"description": "{{item_description}}"
}
],
"billing_address": {
"phone": "{{billing_phone}}",
"address": "{{billing_address}}",
"city": "{{billing_city}}",
"postal_code": "{{billing_postal_code}}",
"country": "{{billing_country}}",
"full_name": "{{billing_fullname}}"
},
"shipping_address": {
"phone": "{{shipping_price}}",
"address": "{{shipping_address}}",
"city": "{{shipping_city}}",
"postal_code": "{{shipping_postal_code}}",
"country": "{{shipping_country}}",
"full_name": "{{shipping_fullname}}"
},
"response_code": "{{refer to response code table}}",
"issuer": "{{issuer_name, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU}}",
"additional_data": "{{free text}}",
"wallet_details": {
"id": "{{wallet_id_value}}",
"id_type": "{{wallet_id_type}}"
},
//Note : the type of payment that will be displayed is only the status PAID
"acquirer_issuer_relation": "{{on_us/off_us}}"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("mcp-signature", "123456123213213213145")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
js
var axios = require('axios');
var data = '{\n "transaction_id": "{{mcp_transaction_id}}",\n "external_id": "{{merchant_external_id}}",\n "order_id": "{{merchant_order_id}}",\n "merchant_id": "{{merchant_id}}",\n "reference_id": "{{transaction_reference_id}}",\n "currency": "IDR",\n "payment_method": "WALLET",\n "payment_channel": "{{channel, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU, VIRGO}}",\n "transaction_status": "{{refer to transaction status table}}",\n "payment_details": {\n "amount": {{payment_amount}},\n "expired_time": "2021-04-28T10:21:20.163+07:00",\n "transaction_description": "{{trx_description}}",\n "transaction_time": "2021-04-28T10:06:20.592+07:00",\n "total_amount": {{total_amount}},\n "paid_time": "{{paid time, e.g: 2021-04-28T10:08:14.136+07:00}}"\n },\n "customer_details": {\n "phone": "{{customer_phone}}",\n "email": "{{customer_email}}",\n "full_name": "{{customer_fullname}}"\n },\n "item_details": [\n {\n "item_id": "{{item_id}}",\n "name": "{{item_name}}",\n "amount": {{item_price}},\n "qty": {{item_qty}},\n "description": "{{item_description}}"\n }\n ],\n "billing_address": {\n "phone": "{{billing_phone}}",\n "address": "{{billing_address}}",\n "city": "{{billing_city}}",\n "postal_code": "{{billing_postal_code}}",\n "country": "{{billing_country}}",\n "full_name": "{{billing_fullname}}"\n },\n "shipping_address": {\n "phone": "{{shipping_price}}",\n "address": "{{shipping_address}}",\n "city": "{{shipping_city}}",\n "postal_code": "{{shipping_postal_code}}",\n "country": "{{shipping_country}}",\n "full_name": "{{shipping_fullname}}"\n },\n "response_code": "{{refer to response code table}}",\n "issuer": "{{issuer_name, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU}}",\n "additional_data": "{{free text}}",\n "wallet_details": {\n "id": "{{wallet_id_value}}",\n "id_type": "{{wallet_id_type}}"\n },\n //Note : the type of payment that will be displayed is only the status PAID\n "acquirer_issuer_relation": "{{on_us/off_us}}"\n}';
var config = {
method: 'post',
maxBodyLength: Infinity,
url: '{{merchant_callback_url}}?mcp-signature={{mcp-signature}}',
headers: {
'mcp-signature': '123456123213213213145'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
php
use Guzzle\Client;
$client = new Client();
$headers = [
'mcp-signature' => '123456123213213213145'
];
$body = '{
"transaction_id": "{{mcp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{merchant_order_id}}",
"merchant_id": "{{merchant_id}}",
"reference_id": "{{transaction_reference_id}}",
"currency": "IDR",
"payment_method": "WALLET",
"payment_channel": "{{channel, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU, VIRGO}}",
"transaction_status": "{{refer to transaction status table}}",
"payment_details": {
"amount": {{payment_amount}},
"expired_time": "2021-04-28T10:21:20.163+07:00",
"transaction_description": "{{trx_description}}",
"transaction_time": "2021-04-28T10:06:20.592+07:00",
"total_amount": {{total_amount}},
"paid_time": "{{paid time, e.g: 2021-04-28T10:08:14.136+07:00}}"
},
"customer_details": {
"phone": "{{customer_phone}}",
"email": "{{customer_email}}",
"full_name": "{{customer_fullname}}"
},
"item_details": [
{
"item_id": "{{item_id}}",
"name": "{{item_name}}",
"amount": {{item_price}},
"qty": {{item_qty}},
"description": "{{item_description}}"
}
],
"billing_address": {
"phone": "{{billing_phone}}",
"address": "{{billing_address}}",
"city": "{{billing_city}}",
"postal_code": "{{billing_postal_code}}",
"country": "{{billing_country}}",
"full_name": "{{billing_fullname}}"
},
"shipping_address": {
"phone": "{{shipping_price}}",
"address": "{{shipping_address}}",
"city": "{{shipping_city}}",
"postal_code": "{{shipping_postal_code}}",
"country": "{{shipping_country}}",
"full_name": "{{shipping_fullname}}"
},
"response_code": "{{refer to response code table}}",
"issuer": "{{issuer_name, e.g: SHOPEEPAY, OVO, DANA, LINKAJA, NOBU}}",
"additional_data": "{{free text}}",
"wallet_details": {
"id": "{{wallet_id_value}}",
"id_type": "{{wallet_id_type}}"
},
//Note : the type of payment that will be displayed is only the status PAID
"acquirer_issuer_relation": "{{on_us/off_us}}"
}';
$request = new Request('POST', '{{merchant_callback_url}}?mcp-signature={{mcp-signature}}', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();