Main Menu
BlockaPay IPN Documentation

BlockaPay IPN Documentation

BlockaPay send IPN response to the notification url that you have provided. IPN data is send in POST method.

Your Website
BlockaPay
1
Payment Form
(item_name, item_number, payment_amount, payer_email etc.)
2
Form Action URL (IPN URL)
3
Payment Response
(payment_status, txn_id, custom fields, etc.)
4
Process Payment
(extract information, validate payment status)
5
Perform Backend Operations
(update order status, send email notifications)
6
Redirect User
(success/failure page)
User's Browser
BlockaPay Payment Processing
Payment Response

    [item_number] => <ITEM NUMBER>
    [item_name] => <ITEM NAME>
    [payment_amount] => <AMOUNT>
    [payment_currency] => <CURRENCY CODE>
    [payee_email] => <PAYEE EMAIL>
    [payer_email] => <PAYER EMAIL>
    [payment_status] => <PAYMENT STATUS>
    [txn_id] => <TRANSACTION ID>
    [custom] => <CUSTOM1> , <CUSTOM2> , <CUSTOM3>

BlockaPay callback sends following data
  • item_name - Name of the payment item.
  • item_number - Number of the payment item.
  • payee_email - Email address that received this payment.
  • payment_currency - The currency in which the payment was made (e.g., USD, EUR, GBP).
  • payment_amount - The full amount paid.
  • notify_url - The URL of the payment process page.
  • return_url - The URL of the payment success page.
  • cancel_url - The URL of the payment cancel/failed page.
  • custom - Custom field data passed. 'custom' is passed as a serialized array, so unserialize it and use:
    $custom = unserialize($_POST['custom']);
    $customfield1 = $custom['custom1'];
    $customfield2 = $custom['custom2'];
    $customfield3 = $custom['custom3'];
Integration Guide

To integrate the Instant Payment Notification (IPN) functionality into your website, follow these steps:

  1. Create a payment form on your website with the necessary fields, including the item name, item number, payment amount, payer email, etc.
  2. Set the form action URL to the IPN URL provided by BlockaPay:
<form action="https://blockapay.com/index.php/payment/instant_payment_notification_login" method="post">
  1. Handle the IPN response on your server using the provided payment response array. Extract the required information from the array to process the payment accordingly.
  2. Validate the payment status and transaction ID to ensure the payment is legitimate and successful.
  3. Perform any necessary backend operations, such as updating the order status, sending email notifications, etc.
  4. Redirect the user to the appropriate success or failure page based on the payment status.