Documentation API

API Documentation

  • // Publish on your site
  • 2<form method="POST" action="https://www.netpeza.com/sci/form" target="_blank">
  • 3  <input type="hidden" name="merchant" value="EE547896">
  • 4  <input type="hidden" name="order" value="134543">
  • 5  <input type="hidden" name="item_name" value="Testing payment">
  • 6  <input type="hidden" name="item_number" value="123">
  • 7  <input type="hidden" name="amount" value="112">
  • 8  <input type="hidden" name="quantity" value="1">
  • 9  <input type="hidden" name="currency" value="USD">
  • 10 <input type="hidden" name="first_name" value="David">
  • 11 <input type="hidden" name="last_name" value="Joi">
  • 12 <input type="hidden" name="email" value="test@abc.com">
  • 13 <input type="hidden" name="phone" value="12323456789">
  • 14 <input type="hidden" name="address" value="213 Browning Lane">
  • 15 <input type="hidden" name="city" value="Mount Upton">
  • 16 <input type="hidden" name="state" value="New York">
  • 17 <input type="hidden" name="country" value="United States"">
  • 18 <input type="hidden" name="postalcode" value="13809">
  • 19 <input type="hidden" name="custom" value="comment">
  • 20 <button type="submit">Pay now!</button>
  • 21<form/>

POST form for payment

VariableDescriptionConditionsNecessarily

merchant

Merchant ID in the system Netpeza. Assigned to the merchant automatically after adding a store to your account. Your store must be moderated

Not equal to 0

Yes

item_name

Product name or purpose of payment. This item is visible to the payer

Minimum number of characters 3, maximum - 100

Yes

item_number

Product number or purpose of payment.

Minimum number of characters 3, maximum - 100

Yes

quantity

Product quantity or purpose of payment.

Minimum number of characters 3, maximum - 100

Yes

amount

The sum in any form. The sum is rounded to decimal places. The total amount including commission will be calculated automatically

Sum is more than 1

Yes

currency

Currency of payment. Available currencies USD, CAD, DOP, HTG,  XOF, YEN

Only values from the list

Yes

first_name

First name of payer

Minimum number of characters 1

Yes

last_name

Last name of payer

Minimum number of characters 1

Yes

email

email of payer should be valid format

Minimum number of characters 1

Yes

phone

phone number of payer

number of characters 10

Yes

address

address of payer

Minimum of characters 1

Yes

city

city of payer

Minimum of characters 1

Yes

state

state of payer

Minimum of characters 10

Yes

country

country of payer

Minimum of characters 1

Yes

postalcode

Postal code of payer

Minimum of characters 1

Yes

custom

Comment to the payment. For example, the order number in your store. This item is not displayed to the buyer

Maximum - 100

Yes


IPN notifications

VariableDescriptionExample
$POST['amount']

The received amount without commissions

100.00

$POST['fee']

Fee for payment. Paid by the buyer or merchant according to the settings

0.20

$POST['total']

Total transaction amount including commission

100.20

$POST['currency']

Transaction currency for which payment was made

debit_base

$POST['payer']

Buyer username in the system Netpeza

johndoe

$POST['receiver']

Merchant username in the system Netpeza

envato

$POST['status']

The status of the transaction. Always Value "Confirmed"

Confirmed

$POST['date']

Transaction date

2018-01-09 03:11:07

$POST['id_transfer']

Unique transaction number in the system Netpeza

58954

$POST['merchant_name']

Merchant store name in the system Netpeza

Google Inc

$POST['merchant_id']

Unique number of merchant in the system Netpeza

21

$POST['balance']

Available merchant balance in transaction currency

2100.56

$POST['item_name']

Name of paid goods

Test payment

$POST['custom']

Comment on payment, formed by the merchant in the HTML form

INV 1452485

$POST['hash']

A unique signature that is used to verify the validity of a notification. A string join is created of the total amount, merchant password, date transaction and transaction ID. The string is encrypted using an algorithm MD5.

C93D3BF7A7C4AFE94B64E30C2CE39F4F


Example of a notification handler in PHP


// merchant password
$merchant_password = "t43t43t34t43t34t6545845";
// transaction info
$amount = $_POST['amount'];
$fee = $_POST['fee'];
$total = $_POST['total'];
$currency = $_POST['currency'];
$payer = $_POST['payer'];
$receiver = $_POST['receiver'];
$status = $_POST['status'];
$date = $_POST['date'];
$id_transfer = $_POST['id_transfer'];
// Merchant info
$merchant_name = $_POST['merchant_name'];
$merchant_id = $_POST['merchant_id'];
$balance = $_POST['balance'];
// Purchase Information
$item_name = $_POST['item_name'];
$custom = $_POST['custom'];
// Verification of the transaction
$hash = $_POST['hash'];
$hash_string = $total.':'.$merchant_password.':'.$date.':'.$id_transfer;

$user_hash = strtoupper(md5($hash_string));
if ($hash_string == $user_hash) {
        echo "Confirmed!";
} else {
        echo "Dasabled!";
}