Appearance
Notification Callback VA
Ifortepay will send a callback notification to the registered merchant callback URL after the transaction is completed. 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
JSON Attributes
| Name | Data Type | Required | Details |
|---|---|---|---|
| transaction_id | String | M | Unique from merchant for each channel. Only accepts Alphabet, numeric and special character dash (-) |
| external_id | String (64) | M | Unique from merchant for each channel. Only accepts Alphabet, numeric and special character dash (-) |
| order_id | String (25) | M | Alphanumeric and dash (-), Not unique |
| reference_id | String | O | transaction reference id |
| currency | String (3) | M | Fixed value: IDR |
| payment_method | String (25) | M | Fixed value: bank_transfer |
| payment_channel | String (50) | M | bank name |
| payment_system | ENUM | O | Loop payment system Available value: OPEN, PARTIAL, CLOSED Default: CLOSED |
| transaction_status | String | O | transaction status refer to Transaction Status |
| transaction_time | DATETIME | O | transaction time using ISO-8601, e.g: 2021-04-28T10:08:14.136+07:00 |
| payment_details | Object | M | |
| 1) billing_name | string (100) | M | Biller's Name |
| 2) va_number | string (12) | C | Free digit for virtual account numbers |
| 3) payment_system | ENUM | O | Loop payment system. Available values: OPEN, PARTIAL, CLOSED. Default: CLOSED |
| 4) is_multi_use | boolean | O | Default: false |
| 5) amount | Numeric (13) | C | Fill 0 for OPEN payment_system. Maximum amount refers to amount validation |
| 6) expired_time | DATETIME | O | ISO-8601 format: YYYY-mm-ddTHH:mm:ss.vvv+07:00 • Single Closed & Partial = default 24 hours • Multi Closed & Open = default 10 years • Min 10 mins * Max 24 hrs for Finpay |
| 7) transaction_description | string (100) | M | Transaction’s description |
| customer_details | Object | M | |
| 1) email | String (255) | M | Email format validation |
| 2) full_name | String (100) | M | |
| 3) phone | String (18) | O | Must be in range of 8-15 digits |
| item_details | Object Array | O | |
| 1) item_id | String (25) | C | Mandatory if item_details is used |
| 2) name | String (100) | C | Mandatory if item_details is used |
| 3) amount | Numeric (13) | C | Mandatory if item_details is used |
| 4) qty | Numeric (5) | C | Mandatory if item_details is used |
| 5) description | String (100) | O | |
| billing_address | Object | O | Billing address |
| 1) full_name | String (100) | O | |
| 2) phone | String (18) | O | |
| 3) address | String (150) | O | |
| 4) city | String (50) | O | |
| 5) postal_code | String (10) | O | |
| 6) country | String (100) | O | |
| shipping_address | Object | O | |
| 1) full_name | String (100) | O | |
| 2) phone | String (18) | O | |
| 3) address | String (150) | O | |
| 4) city | String (50) | O | |
| 5) postal_code | String (10) | O | |
| 6) country | String (100) | O | |
| response_code | string | O | refer to table response code |
| additional_data | TEXT | O | Free Text |
| refund_history | object array | O | refund_history will be displayed only on refunded status |
| 1) refund_time | string (100) | O | Refund time, e.g: 2021-04-28T10:08:14.136+07:00 |
| 2) refund_amount | Numeric (13) | O | Refund amount |
| payment_history | object array | O | Payment_history will be displayed only on payment status |
| 1) paid_amount | Numeric (13) | O | Paid amount |
| 2) paid_time | string (100) | O | Paid time, e.g: 2021-04-28T10:08:14.136+07:00 |
| 3) reference_id | String | O |
| Hostname | |
|---|---|
| HTTP Method | POST |
Headers
| Key | Format | Required | Value |
|---|---|---|---|
| Content-Type | application/json | M | |
| mcp-signature | String | M |
Example
Body raw
json
{
"transaction_id": "{{ifp_transaction_id}}",
"external_id": "{{merchant_external_id}}",
"order_id": "{{merchant_order_id}}",
"reference_id": "{{transaction_reference_id}}",
"currency": "IDR",
"payment_method": "BANK_TRANSFER",
"payment_channel": "{{channel, e.g: BRI, MANDIRI, BCA, etc}}",
"payment_system": "{{e.g : OPEN, CLOSED, PARTIAL}}",
"transaction_status": "{{refer to transaction status table}}",
"transaction_time": "2021-04-28T10:06:20.592+07:00",
"payment_details": {
"amount": {{payment_amount}},
"expired_time": "2021-04-28T10:21:20.163+07:00",
"transaction_description": "{{trx_description}}",
"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}}",
"additional_data": "{{free text}}",
"payment_history":[
{
"paid_amount":{{paid_amount}},
"paid_time":"{{paid_time, e.g: 2021-04-28T10:08:14.136+07:00}}",
"reference_id":"{{reference_id}}"
}
]
}Example Request
shell
curl --location -g '{{merchant_callback_url}}' \
--header 'mcp-signature: {{mcp-signature}}' \
--data '{
"response_code":"00",
"transaction_id":"{{ifp_transaction_id}}",
"external_id":"{{merchant_external_id}}",
"order_id":"{{merchant_order_id}}",
"currency":"IDR",
"transaction_status":"{{refer to transaction status table}}",
"transaction_time":"{{transaction time, e.g: 2021-04-28T10:08:14.136+07:00}}",
"payment_method":"BANK_TRANSFER",
"payment_channel":"{{channel, e.g: BNI, BRI, BCA, MANDIRI, etc}}",
"additional_data":"{{additional_data}}",
"callback_url":"{{callback_url_merchant}}",
"customer_details":{
"email":"{{email}}",
"full_name":"{{full_name}}",
"phone":"{{phone}}"
},
"item_details":[
{
"item_id":"{{item_id}}",
"name":"{{item_name}}",
"amount":{{amount_of_item}},
"qty":{{quantity_item}},
"description":"{{item_description}}"
}
],
//Note : payment_history will be display only if transaction has been paid
"payment_history":[
{
"paid_amount":{{paid_amount}},
"paid_time":"{{paid_time, e.g: 2021-04-28T10:08:14.136+07:00}}",
"reference_id":"{{reference_id}}"
}
],
"payment_details":{
"payment_system":"{{ex : CLOSED,OPEN,PARTIAL}}",
"billing_name":"{{billing_name}}",
"va_number":"{{va_number}}",
"amount":{{amount}},
"total_fee_amount":{{total_fee_amount}},
"total_promo_amount":{{total_promo_amount}},
"total_amount":{{total_amount}},
"total_paid_amount":{{total_paid_amount}},
"is_multi_use":{{true/false}},
"is_customer_paying_fee":{{true/false}},
"expired_time":"expired_time, e.g: 2021-04-28T10:08:14.136+07:00",
"transaction_description":"{{transaction_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}}",
"additional_data": "{{free text}}"
}'go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "{{merchant_callback_url}}"
method := "POST"
payload := strings.NewReader(`{
"response_code":"00",
"transaction_id":"{{ifp_transaction_id}}",
"external_id":"{{merchant_external_id}}",
"order_id":"{{merchant_order_id}}",
"currency":"IDR",
"transaction_status":"{{refer to transaction status table}}",
"transaction_time":"{{transaction time, e.g: 2021-04-28T10:08:14.136+07:00}}",
"payment_method":"BANK_TRANSFER",
"payment_channel":"{{channel, e.g: BNI, BRI, BCA, MANDIRI, etc}}",
"additional_data":"{{additional_data}}",
"callback_url":"{{callback_url_merchant}}",
"customer_details":{
"email":"{{email}}",
"full_name":"{{full_name}}",
"phone":"{{phone}}"
},
"item_details":[
{
"item_id":"{{item_id}}",
"name":"{{item_name}}",
"amount":{{amount_of_item}},
"qty":{{quantity_item}},
"description":"{{item_description}}"
}
],
//Note : payment_history will be display only if transaction has been paid
"payment_history":[
{
"paid_amount":{{paid_amount}},
"paid_time":"{{paid_time, e.g: 2021-04-28T10:08:14.136+07:00}}",
"reference_id":"{{reference_id}}"
}
],
"payment_details":{
"payment_system":"{{ex : CLOSED,OPEN,PARTIAL}}",
"billing_name":"{{billing_name}}",
"va_number":"{{va_number}}",
"amount":{{amount}},
"total_fee_amount":{{total_fee_amount}},
"total_promo_amount":{{total_promo_amount}},
"total_amount":{{total_amount}},
"total_paid_amount":{{total_paid_amount}},
"is_multi_use":{{true/false}},
"is_customer_paying_fee":{{true/false}},
"expired_time":"expired_time, e.g: 2021-04-28T10:08:14.136+07:00",
"transaction_description":"{{transaction_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}}",
"additional_data": "{{free text}}"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("mcp-signature", "{{mcp-signature}}")
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 = '{\t\n "response_code":"00",\t\n "transaction_id":"{{ifp_transaction_id}}",\t\n "external_id":"{{merchant_external_id}}",\t\n "order_id":"{{merchant_order_id}}",\t\n "currency":"IDR",\t\n "transaction_status":"{{refer to transaction status table}}",\t\n "transaction_time":"{{transaction time, e.g: 2021-04-28T10:08:14.136+07:00}}",\t\n "payment_method":"BANK_TRANSFER",\t\n "payment_channel":"{{channel, e.g: BNI, BRI, BCA, MANDIRI, etc}}",\t\n "additional_data":"{{additional_data}}",\t\n "callback_url":"{{callback_url_merchant}}",\t\n "customer_details":{\t\n "email":"{{email}}",\t\n "full_name":"{{full_name}}",\t\n "phone":"{{phone}}"\t\n },\t\n "item_details":[\t\n {\t\n "item_id":"{{item_id}}",\t\n "name":"{{item_name}}",\t\n "amount":{{amount_of_item}},\t\n "qty":{{quantity_item}},\t\n "description":"{{item_description}}"\t\n }\t\n ],\n //Note : payment_history will be display only if transaction has been paid\t\n "payment_history":[\t\n {\t\n "paid_amount":{{paid_amount}},\t\n "paid_time":"{{paid_time, e.g: 2021-04-28T10:08:14.136+07:00}}",\t\n "reference_id":"{{reference_id}}"\t\n }\t\n ],\t\n "payment_details":{\t\n "payment_system":"{{ex : CLOSED,OPEN,PARTIAL}}",\t\n "billing_name":"{{billing_name}}",\t\n "va_number":"{{va_number}}",\t\n "amount":{{amount}},\t\n "total_fee_amount":{{total_fee_amount}},\t\n "total_promo_amount":{{total_promo_amount}},\t\n "total_amount":{{total_amount}},\t\n "total_paid_amount":{{total_paid_amount}},\t\n "is_multi_use":{{true/false}},\t\n "is_customer_paying_fee":{{true/false}},\t\n "expired_time":"expired_time, e.g: 2021-04-28T10:08:14.136+07:00",\t\n "transaction_description":"{{transaction_description}}"\t\n },\t\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 "additional_data": "{{free text}}"\n}';
var config = {
method: 'post',
maxBodyLength: Infinity,
url: '{{merchant_callback_url}}',
headers: {
'mcp-signature': '{{mcp-signature}}'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});php
use GuzzleHttp\Client;
$client = new Client();
$headers = [
'mcp-signature' => '{{mcp-signature}}'
];
$body = '{
"response_code":"00",
"transaction_id":"{{ifp_transaction_id}}",
"external_id":"{{merchant_external_id}}",
"order_id":"{{merchant_order_id}}",
"currency":"IDR",
"transaction_status":"{{refer to transaction status table}}",
"transaction_time":"{{transaction time, e.g: 2021-04-28T10:08:14.136+07:00}}",
"payment_method":"BANK_TRANSFER",
"payment_channel":"{{channel, e.g: BNI, BRI, BCA, MANDIRI, etc}}",
"additional_data":"{{additional_data}}",
"callback_url":"{{callback_url_merchant}}",
"customer_details":{
"email":"{{email}}",
"full_name":"{{full_name}}",
"phone":"{{phone}}"
},
"item_details":[
{
"item_id":"{{item_id}}",
"name":"{{item_name}}",
"amount":{{amount_of_item}},
"qty":{{quantity_item}},
"description":"{{item_description}}"
}
],
//Note : payment_history will be display only if transaction has been paid
"payment_history":[
{
"paid_amount":{{paid_amount}},
"paid_time":"{{paid_time, e.g: 2021-04-28T10:08:14.136+07:00}}",
"reference_id":"{{reference_id}}"
}
],
"payment_details":{
"payment_system":"{{ex : CLOSED,OPEN,PARTIAL}}",
"billing_name":"{{billing_name}}",
"va_number":"{{va_number}}",
"amount":{{amount}},
"total_fee_amount":{{total_fee_amount}},
"total_promo_amount":{{total_promo_amount}},
"total_amount":{{total_amount}},
"total_paid_amount":{{total_paid_amount}},
"is_multi_use":{{true/false}},
"is_customer_paying_fee":{{true/false}},
"expired_time":"expired_time, e.g: 2021-04-28T10:08:14.136+07:00",
"transaction_description":"{{transaction_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}}",
"additional_data": "{{free text}}"
}';
$request = new Request('POST', '{{merchant_callback_url}}', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();