Callback

Layanan untuk mengirim transaksi ke merchant untuk mengetahui status dari transaksi yang sudah dibuat.

Request Headers

{
    'X-CLIENT-ID: sandbox-ipaymax',
    'X-CLIENT-SECRET: 3346754028',
    'Content-Type: application/json'
}

Request Body

{
    "reference_number": "DEV-TPX17283714883095WZOR",
    "partner_reference_number": "ABC1234123213",
    "bank_code": "BRIVA",
    "bank_name": "BRI Virtual Account",
    "amount": 0,
    "expired_at": "2024-11-02 23:00:00",
    "status": "pending",
    "remark": "Coba kak",
    "customer_id": "31857118",
    "customer_name": "Sahabat Ipaymax",
    "customer_phone": "081231857418",
    "customer_email": "pay@ipaymax.com",
    "redirect_url": "https://redirect_url_partner.com"
}

Response Body

OK

Contoh dalam kode PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'URL_CALLBACK_MERCHANT',
  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 =>'{
    "reference_number": "DEV-TPX17283714883095WZOR",
    "partner_reference_number": "ABC1234123213",
    "bank_code": "BRIVA",
    "bank_name": "BANK BRI",
    "amount": 10000,
    "expired_at": "2024-11-02 23:00:00",
    "status": "pending",
    "remark": "Coba kak",
    "customer_id": "31857118",
    "customer_name": "Sahabat Ipaymax",
    "customer_phone": "081231857418",
    "customer_email": "pay@ipaymax.com",
    "redirect_url": "https://redirect_url_partner.com"
}',
  CURLOPT_HTTPHEADER => array(
    'X-CLIENT-ID: sandbox-ipaymax',
    'X-CLIENT-SECRET: 3346754028',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Last updated