Payza Reference Center

Welcome to the Payza Reference Center. If you are new to Payza, start with our Personal Setup Guide or Merchant Setup Guide for help getting started. If you need help with your Payza Account, refer to our Personal Manual or Business Manual.

To get help with integration or to find resources for developers, visit the Payza API Guide.

Have questions or suggestions? Let us know in our Reference Center Forum.

Get Started    
Suggest Edits

Standard Integration

 

You do not need web programming knowledge to get started with Standard Integration — a basic understanding of HTML and web page design is sufficient to create and implement Standard Payment Buttons.

All the Standard Integration Payza Payment Buttons you create are stored in your Payza account; you can view the code or edit these buttons directly within your account.

To create a Payment Button, use the Button Creation Tool in your Payza account. This tool will generate the HTML code for your button which you can then place on your web page.

CREATING A PAYMENT BUTTON

To create a Payment Button, just follow these steps:

1) In your Payza account click "Business" on the left side menu, then select "Payment Buttons".
2) Select the Payment Button you wish to create, either "Buy Now Buttons", "Donate Buttons" or " Subscription Buttons".
3) Click "Add".
4) Enter all required information and click "Update".
5) Select Regular Checkout or In-Page Checkout.
6) Copy and paste the generated code into your website.

All buttons created using the Button Creation Tool will be automatically stored in your Payza account.

The HTML code for a Standard Payment Button will only contain two parameters: ap_productid and ap_quantity.

Fields Requirement Description Type / Format
ap_productid Required The identifier of a button that was saved in your merchant's Payza account. An encrypted string of characters generated during the item’s creation in your Payza account.
Length: 24 characters.
24 characters string
Ex: ap_productid=DxVnKkNK4eOgcBSeiJfiyA==
ap_quantity Optional The number of items or services included in this transaction. If the parameter is not present, quantity will have a default value of 1.
NOTE: The value for quantity must be a positive integer. Null, negative and decimal numbers are not allowed.
Integer
Ex: ap_quantity=10
ap_testmode Optional Value indicating whether your button is on Test Mode or not.
Must be one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: ap_testmode=0
<form method="post" action="https://secure.payza.com/checkout">
     <input name="ap_productid" type="hidden" value="DxVnKkNK4eOgcBSeiJfiyA==" />
     <input name="ap_quantity" type="hidden" value="10" />
     <input src="https://www.payza.com/images/payza-buy-now.png"  type="image" />
</form>

Each button created has a unique product ID and is associated with an item or a subscription stored in your account. Editing an item within your Payza Account will not change its product ID.

Since all the details of a product are stored in your Payza account, whenever you make changes to its payment details, the modifications will automatically be reflected in the buttons previously installed on your website. You will not have to upload the HTML code again or make any change to your website.

MANAGING YOUR PAYMENT BUTTONS

To modify, delete, or view the HTML code for one of your stored items, follow these steps:

1) In your Payza account click "Business" on the left side menu, then select "Payment Buttons".
2) Select either "Buy Now Buttons", "Donate Buttons" or " Subscription Buttons".
3) For the Payment Button of your choice, click on "Edit" to modify the button, "Code" to view the HTML code, or "Remove" to delete the button code.

The payment details for a product are stored in your Payza account, so your Payment Button has less risk of being compromised or tampered with by a malicious third-party.

The HTML code for your button is protected from tampering since the only value that is exposed is the product ID which must match the value stored in your account. If an attacker tries to inject an invalid product ID, it will simply result in an error message being displayed on our checkout page.

Payza will send an email notification and an Instant Payment Notification (IPN) for payments made to you through your buttons. To learn more about using our Instant Payment Notification, please refer to our IPN Guide.

You will need to submit your site for a Website Review and have it approved for your payment buttons to work on your site. To get all the benefits of your e-wallet account, including higher limits for sending and receiving money, consider account verification to unlock all the features.

Suggest Edits

In-Page Checkout

 

In-Page Checkout allows you to host the Payza checkout page as a pop-up right on your website, so your customers not have to be redirected. You can easily convert your existing buttons to use this method or create a new payment button using our standard or advanced integration button creation tools.

To create an In-Page Checkout Standard Integration button, use the Button Creation Tool in your Payza account. This tool will generate the HTML code or link for your button, which you can then place on your web page.

UPDATING YOUR PAYMENT BUTTONS TO USE IN-PAGE CHECKOUT

To change a Payment Button so that it works with the In-Page Checkout feature, just follow these steps:

1) In your Payza account click "Business" on the left side menu, then select "Payment Buttons".
2) Select on the right side either "Buy Now Buttons", "Donate Buttons" or " Subscription Buttons".
3) Click "Code" for the button you would like to change.
4) Select "In-Page Checkout".
5) Copy and paste the new code into your website in place of the old code.

The HTML code of a Standard Integration Payza Payment Button using Regular Checkout looks like this.

<form method="post" action="https://secure.payza.com/checkout">
     <input name="ap_productid" type="hidden" value="DxVnKkNK4eOgcBSeiJfiyA==" />
     <input name="ap_quantity" type="hidden" value="5" />
     <input src="https://www.payza.com/images/payza-buy-now.png"  type="image" />
</form>

In order to convert it into a Standard Payment Button using In-Page Checkout all you have to do is replace the bottom line:

  </form>

by these three new lines:

  <input type="hidden" name="ap_inpage" value="1"/>
  </form>
  <script src="https://secure.payza.com/JS/PayzaCheckout.js"></script>

The updated HTML code for the same button using In-Page Checkout will look like this:

<form method="post" action="https://secure.payza.com/checkout">
     <input name="ap_productid" type="hidden" value="DxVnKkNK4eOgcBSeiJfiyA==" />
     <input name="ap_quantity" type="hidden" value="5" />
     <input src="https://www.payza.com/images/payza-buy-now.png"  type="image" />
     <input type="hidden" name="ap_inpage" value="1"/>
</form>

<script src="https://secure.payza.com/JS/PayzaCheckout.js"></script>

This is the same result you will obtain using the Button Creation Tool in your Payza account.

When using In-Page Checkout, once a buyer has clicked on a Payment Button on your website, Payza’s Checkout page will appear within a frame on the same page; the buyer will not have to leave your website to complete the purchase.

Suggest Edits

Advanced Integration

 

Advanced Integration is intended for online sellers who want more flexibility when creating payment buttons. It facilitates the creation of dynamic "Buy Now" buttons found in many shopping carts and e-commerce solutions.

Some knowledge of HTML coding is required to create Advanced Integration Payment Buttons.

Buttons created through Advanced Integration do not store data in your Payza account, which means that you cannot view, edit or remove any information related to these buttons from your Payza account.

You need HTML knowledge to make changes to the code to modify the business logic of an Advanced Integration Payment Button. You must update the HTML code on your own server rather than on Payza’s since we do not store this information.

In some cases, you may have to create a new button to get the HTML code. If you have saved a copy of the code, you can make changes without creating a new button. This includes but is not limited to the donation, checkout and subscription buttons.

With Advanced Integration is that anyone can see the HTML code for your "Buy Now" buttons, which means that a third-party can tamper with the item variables and make fraudulent payments. For this reason, we recommend that an experienced developer or website administrator manages and installs Advanced Integration Payment Buttons.

While the HTML button coding is simple to create, it is easy to miss crucial security details if you do not have sufficient coding knowledge. Missing these details can lead to an increased risk of fraudulent payments.

USING ADVANCED INTEGRATION PAYMENT BUTTONS WITH THIRD-PARTY SHOPPING CARTS

If you are using an Advanced Integration Payment Buttons on your website or have integrated Payza with your shopping cart application, we highly recommended that you use our Instant Payment Notification feature to verify the payments made to your account.

Creating An Advanced Integration Payment Button

When creating an Advanced Integration Payment Button, you must use the proper parameters in the HTML form of your payment button.

Contrary to the Standard Button, which only contains the ap_productid and ap_quantity variables, the Advanced Button requires additional parameters so your checkout page more precisely describes the item you are selling. Depending on the values and parameters sent to the Payza checkout page, each buyer will see different information.

Fields Requirement Description Type / Format
ap_merchant Required The email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: ap_merchant=name@example.com
ap_purchasetype Required Indicate what type of purchase the payment is for.
Must be one of the following: item, item-goods, item-auction, service or subscription.
If the value is set to subscription, you must provide the necessary extra parameters for your button to function properly.
Alphanumeric
Ex: ap_purchasetype=item
ap_itemname Required The name of the item or service to be displayed on the checkout page. Alphanumeric
Ex: ap_itemname=MP3 Player
ap_amount Required The price or cost of the product or service. This amount excludes any extra cost like shipping, handling or taxes.
Format: 0.00
Min Amount: 1.00 in any currency.
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_amount=39.77
ap_currency Required The currency of the payment.
The permitted values must be a 3-letter ISO-4217 Code (see Currency Code Table).
Alphanumeric
Ex: ap_currency=CAD
ap_description Optional A description you can provide for the item or service.
Max Length: 150 characters.
Alphanumeric
Ex: ap_description=A brand new audio equipment.
ap_itemcode Optional The code of the item, in case there is any additional information you need to capture on your application. Alphanumeric
Ex: ap_itemcode=ID3000
ap_quantity Optional The number of items or services included in this transaction. If the parameter is not present, quantity will have a default value of 1.
NOTE: The value for quantity must be a positive integer. Null, negative and decimal numbers are not allowed.
Integer
Ex: ap_quantity=10
ap_additionalcharges Optional Additional charges.
Format: 0.00
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_additionalcharges=3.30
ap_shippingcharges Optional Additional handling or shipping charges.
Format: 0.00
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_shippingcharges=5.49
ap_taxamount Optional The tax amount related to the item or service. This amount is not calculated by Payza but provided by you.
Format: 0.00
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_taxamount=1.05
ap_discountamount Optional Any special discount that you wish to subtract from the total amount.
Format: 0.00
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_discountamount=4.65
ap_returnurl Optional The URL to redirect the user if the purchase is successful. It would link to a "Thank you" page, for example.
By default, the user will be redirected to an Payza web page.
Alphanumeric
Ex: ap_returnurl=www.example.com/return
ap_cancelurl Optional The URL to redirect the users if they cancel the purchase. It would link to a "Payment has been canceled" page, for example.
By default, the user will be redirected to an Payza web page.
Alphanumeric
Ex: ap_cancelurl=www.example.com/cancel
apc_1
apc_2
apc_3
apc_4
apc_5
apc_6
Optional Custom fields you can pass with the payment button in case there is any additional information you need to capture on your application. Up to 6 custom fields can be used.
The values are not displayed to the payer on our Pay Process page. Payza returns these fields back in the IPN.
Max Length: 100 characters each.
Alphanumeric
Ex: apc_1=Green cover included.
ap_alerturl Optional The URL where you would like your IPNs to be sent. It is the URL of the location of your IPN Handler. By default, if this ap_alerturln is not provided, Payza will use the one from your merchant profile settings, however, if ap_alerturln is provided here, then this one will be used. Alphanumeric
Ex: ap_alerturl=http://www.example.com/ipnhandler
ap_ipnversion Optional The IPN version of this advanced button. Must be 1 or 2
By default, if ap_ipnversion is not provided, Payza will use the one from your merchant profile settings, however, if a valid ap_ipnversion is provided here, then this one will be used.
Integer
Ex: ap_ipnversion=2
ap_testmode Optional Value indicating whether your button is on Test Mode or not.
Must be one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: ap_testmode=1

To better ilustrate an Advanced Button, we will use the following "Buy Now" button code as an example:

<form method="post" action="https://secure.payza.com/checkout">
    <input type="hidden" name="ap_merchant" value="payza_merchant@test.com"/>
    <input type="hidden" name="ap_purchasetype" value="item"/>
    <input type="hidden" name="ap_itemname" value="MP3 Player"/>
    <input type="hidden" name="ap_amount" value="50"/>
    <input type="hidden" name="ap_currency" value="USD"/>
    <input type="hidden" name="ap_quantity" value="2"/>
    <input type="hidden" name="ap_itemcode" value="HIJ123"/>
    <input type="hidden" name="ap_description" value="Audio equipment"/>
    <input type="hidden" name="ap_taxamount" value="2.49"/>
    <input type="hidden" name="ap_additionalcharges" value="1.19"/>
    <input type="hidden" name="ap_shippingcharges" value="7.99"/> 
    <input type="hidden" name="ap_discountamount" value="4.99"/>
    <input type="hidden" name="apc_1" value="Blue"/>
    <input type="hidden" name="apc_2" value="UE plug"/>
    <input type="hidden" name="ap_ipnversion" value="2"/>
    <input type="hidden" name="ap_testmode" value="1"/>
    <input type="hidden" name="ap_returnurl" value="http://www.example.com/thankyou.html" />
    <input type="hidden" name="ap_cancelurl" value="http://www.example.com/cancel.html" />

    <input type="image" src="https://www.payza.com/images/payza-buy-now.png"/>
</form>

As with Standard Integration, the sample code above transmits the parameters and their value to our checkout page using the POST method: https://secure.payza.com/checkout.

The five parameters present in the code are required parameters, without them, the Advanced Payment Button will not function properly. If any of those variables are missing, your customers will get an error message rather than the checkout page.

Note that in this example code the parameter ap_testmode is set to 1, so this button will work in Test Mode and no real transaction will take place.

Multi-Item Button

Multi-Item Buttons are a special type of Advanced Integration Payment Button. It gives you the option of creating package buttons or handling situations where multiple unrelated items are selected by your customer to be purchased at the same time.

When using Multi-Item Buttons, all HTML variables remain the same as the ones used for a single-item button, the only difference is the addition of 5 new variables appended with _n at the end of theirs names: ap_itemname_n, ap_description_n, ap_itemcode_n, ap_amount_n and ap_quantity_n. These new fields will have the same behavior and structure as those without the appendix, but will be included for every kind of item to be purchased within the same action.

The item number specified by _n value ties the optional variables, such as the ap_description_n, to the corresponding ap_itemname_n variable, which is required.

To ensure that your items will be recognized, the _n values must continuously increase by increments of 1. Skipping an item number will result in an error on the Payza checkout page. For example, if you skip from item #1 to item #3, an error will occur.

The following HTML code for a Multi-Item Button will pass three different items to the checkout page. Information on each item will be displayed on a different line on the checkout page:

<form method="post" action="https://secure.payza.com/checkout" >
    <input type="hidden" name="ap_purchasetype" value="item"/> 
    <input type="hidden" name="ap_merchant" value="apdevforum@gmail.com"/> 
    <input type="hidden" name="ap_currency" value="USD"/>

    <input type="hidden" name="ap_itemname" value="Item 01"/>
    <input type="hidden" name="ap_itemname_1" value="Item 02"/>
    <input type="hidden" name="ap_itemname_2" value="Item 03"/> 

    <input type="hidden" name="ap_description" value="Lun der ter"/>
    <input type="hidden" name="ap_description_1" value="Lorem ipsum"/>
    <input type="hidden" name="ap_description_2" value="Na misnet par"/>

    <input type="hidden" name="ap_itemcode" value="8943"/> 
    <input type="hidden" name="ap_itemcode_1" value="7462"/> 
    <input type="hidden" name="ap_itemcode_2" value="5955"/> 

    <input type="hidden" name="ap_quantity" value="2"/> 
    <input type="hidden" name="ap_quantity_1" value="1"/> 
    <input type="hidden" name="ap_quantity_2" value="4"/> 

    <input type="hidden" name="ap_amount" value="67.00"/>
    <input type="hidden" name="ap_amount_1" value="35.00"/> 
    <input type="hidden" name="ap_amount_2" value="24.00"/> 

    <input type="hidden" name="ap_taxamount" value="2.49"/>
    <input type="hidden" name="ap_additionalcharges" value="1.19"/>
    <input type="hidden" name="ap_shippingcharges" value="7.99"/> 
    <input type="hidden" name="ap_discountamount" value="4.99"/>
    <input type="hidden" name="ap_ipnversion" value="2"/>
    <input type="hidden" name="ap_testmode" value="0"/>

    <input type="hidden" name="ap_returnurl" value="http://www.example.com/thankyou.html" /> 
    <input type="hidden" name="ap_cancelurl" value="http://www.example.com/cancel.html" /> 
    <input type="image" name="ap_image" src="https://www.payza.com/images/payza-buy-now.png"/>
</form>

The currency of the Multi-Item Button is not item-specific and is defined for the entire set of items by the ap_currency variable. There is no need to add _n to the ap_currency variable, the currency is applied to all the monetary variables in the payment button: ap_amount, ap_taxamount, ap_discountamount, ap_additionalcharges, ap_shippingcharges, ap_setupamount and ap_trialamount.

Subscription Buttons

You can also create Advanced Integration Subscription Payment Buttons for recurring payments. If the button is intended to be for a subscription, you must include additional parameters.

Fields Requirement Description Type / Format
ap_timeunit Required Time unit used for the billing cycle. Must be one of the following values:
Day – the allowable range for ap_periodlength is 1-90
Week – the allowable range for ap_periodlength is 1-52
Month – the allowable range for ap_periodlength is 1-12
Year – the allowable range for ap_periodlength is 1-10
Alphanumeric
Ex: ap_timeunit=Month
ap_periodlength Required Subscription duration in days, weeks, months or years.
The allowed values are dependent on the value of ap_timeunit.
Integer
Ex: ap_periodlength=5
ap_periodcount Optional Number of times the subscription payment will reoccur.
A value of 0 implies that the subscription will go on until it is cancelled by you, the merchant.
NOTE: The value for period count must be a positive integer. Null, negative and decimal numbers are not allowed.
Integer
Ex: ap_periodcount=7
ap_setupamount Optional A onetime amount that is charged when the subscription is first purchased.
Format: 0.00
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_setupamount=15
ap_trialamount Optional The amount that is charged for a trial period. For a free trial period, specify 0.
Format: 0.00
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_trialamount=5.35
ap_trialtimeunit Required Time unit used for the trial period. Must be one of the following values:
Day – the allowable range for ap_trialperiodlength is 1-90
Week – the allowable range for ap_trialperiodlength is 1-52
Month – the allowable range for ap_trialperiodlength is 1-12
Year – the allowable range for ap_trialperiodlength is 1-10
Alphanumeric
Ex: ap_trialtimeunit=Week
ap_trialperiodlength Required Trial period duration in days, weeks, months or years. The value is dependent on the value of ap_trialtimeunit. Integer
Ex: ap_trialperiodlength=9

The following HTML code for a Subscription Button shows the example of a subscription purchase that will last for 12 months with a 5.00 USD initial setup amount, a 10.00 USD charge for a 5 days trial, and a recurring monthly charge of 20.00 USD:

<form method="post" action="https://secure.payza.com/checkout" > 
    <input type="hidden" name="ap_merchant" value="apdevforum@gmail.com"/> 
    <input type="hidden" name="ap_purchasetype" value="subscription"/> 
    <input type="hidden" name="ap_itemname" value="Test Subcription"/> 
    <input type="hidden" name="ap_amount" value="20"/>     
    <input type="hidden" name="ap_currency" value="USD"/> 
    <input type="hidden" name="ap_itemcode" value="sub01"/> 
    <input type="hidden" name="ap_quantity" value="1"/> 
    <input type="hidden" name="ap_description" value="Lorem Ipsum"/> 

    <input type="hidden" name="ap_timeunit" value="month"/> 
    <input type="hidden" name="ap_periodlength" value="1"/> 
    <input type="hidden" name="ap_periodcount" value="12"/> 
    <input type="hidden" name="ap_setupamount" value="5"/> 
    <input type="hidden" name="ap_trialtimeunit" value="day"/> 
    <input type="hidden" name="ap_trialperiodlength" value="5"/> 
    <input type="hidden" name="ap_trialamount" value="10"/> 
    
    <input type="image" src="https://www.payza.com/images/payza-subscribe-now.png"/>     
</form>
Suggest Edits

Tokenized payments

 

Tokenized Payment Buttons are available for online sellers who want the same flexibility provided by Advanced Integration but without exposing the payment details in the HTML form. The Tokenized Payment Button creation process is very similar to the creation of Advanced integration "Buy Now" buttons.

Unlike Advanced Integration Payment Buttons, when creating Tokenized Payment Buttons you must first call the GetPaymentToken API, then create a simple HTML form that includes the token returned by that API.

This process is illustrated below:

The GetPaymentToken API is a fundamental part of the Tokenized Payment Button. By using this API you can create tokens that are easily included in the HTML code of your website while preserving the details of the product or service that are exposed in the checkout process.

<form method="post" action="https://secure.payza.com/checkout">
    <input type="hidden" name="ap_productid" value="FFqnIIDomECE4vG3uNcTw=="/>
    <input type="image" src="https://www.payza.com/images/payza-buy-now.png"/>
</form>

The sample code above transmits the token acquired from the GetPaymentToken API to our checkout page (https://secure.payza.com/checkout) using the POST method. The ap_productid variable displayed in the sample should contain the value of the TOKEN variable received from the API.

PAYZA DOES NOT STORE TOKENIZED PAYMENT BUTTON DETAILS IN YOUR ACCOUNT

Tokenized Payment Button information will not be stored on Payza's server. These buttons are not created within your Payza account, so you cannot view, edit or remove any information related to these buttons from your Payza account.

Tokenized Payment Buttons offer a more secure way to create "Buy Now" buttons, as the payment details are hidden from the HTML code. However, a third-party could still look for creative ways to make fraudulent payments. We highly recommend that you use our IPN feature to verify the payments made to your account.

By using the GetPaymentToken API you can also create Split Payments Buttons. With Split Payment Buttons, the total amount you receive for a product or service payment can be split into portions among different recipients in predetermined amounts.

IPN, or Instant Payment Notification, is an automatic notification message that contains payment details and customer information data. You can use the information provided in a Payza IPN for post-payment operations, such as updating your inventory or database, issuing a receipt, or fulfilling orders.

As soon as a payment has been made on your website using Payza, or if you have successfully paid someone through Payza’s MassPay API, Payza can send an IPN message to a URL that you must specify. This is known as your "Alert URL".

SETTING UP IPNs FOR YOUR ACCOUNT

To enable your IPN Status and set up your Alert URL, just follow these steps:
1) In your Payza account click "Business" on the left side menu, then select "IPN Integration".
2) Click the “Set up your IPN now" blue button.
3) Enter your "Transaction PIN" and click "Access".
4) Set the following parameters and enter the following information:
    1) For "IPN Status", select "Enabled".
    2) For "Enable IPN Version 2", select "Enabled".
    3) For "Allow Encrypted Payment Details (EPD)", select "Disabled".
    4) For "Alert URL", enter the URL of the location of your IPN Handler.
    5) Enable transaction update notifications if you would like to subscribe to transaction update notifications.
    6) For "Test Mode", choose to enable or disable test mode for this business profile.
5) Click "Update" to save your changes.

Note: If Test Mode is enabled for your IPN, your Payment Buttons associated with this IPN will also be in Test Mode. Payment details and customer information will be sent via IPN when these buttons are used, but you will not receive actual payments. Once you are satisfied that your IPN is properly configured, you will need to disable Test Mode to start receiving actual payments.

IPN workflow

Diagram of Payza’s response to a successful payment made through our checkout page.

Diagram of Payza’s response to a successful payment made through our checkout page.

IPN messages are normally only only sent when new transactions are made, but if you enable transaction update notifications in your Payza account, you will also receive transaction update notifications related to existing payments that have been modified.

For example, if a purchase ends successfully but for any reason, that transaction is later put on hold, you will receive an initial notification informing you that the transaction took place, and you will receive an update notification informing you that the transaction state has changed.

IPNs use a handshake method when communicating with your server. It will first send you a token which your server must send back to Payza. When the token is received by Payza's server, it will send you the full IPN containing all the payment details.

When Payza sends IPN messages, it will make sure that your web server receives it. If Payza does not receive an acknowledgment that your server received our IPN post, then it will try again up to 9 times until your web server successfully receives and acknowledges the post. The attempts will occur as follows:

  • The first 3 attempts will occur every 15 minutes.
  • If the previous attempts fail, the next 3 attempts will occur every hour.
  • Lastly, 3 final attempts will be made every 8 hours.

The intervals between the attempts will give you enough time to correct any errors or issues on your server that is preventing you from receiving the IPN posts.

If all of the 9 attempts fail, then the IPN notification will be lost for that transaction and you should contact Payza Customer Support or Integration Support to manually re-send the lost IPN.

After receiving the first communication from Payza containing the token, your server must send it back exactly as is to https://secure.payza.com/ipn2.ashx, the URL for the Payza IPN Handler. You must use URL-encoding with the token string before returning the string to Payza.

Once you return the token to Payza, we will confirm that the token is valid. Once the token is authenticated, the IPN data will be sent back to you.

If token's authentication fails, the IPN will not be sent. Instead, you will receive an Invalid token notification.

IPN structure

IPN Token

The IPN Token serves to authenticate the IPN source (Payza) and the IPN Handler on your Alert URL.

When a transaction is completed on your site through a Payza Checkout Page, an IPN Token is sent to the Alert URL provided by you. The IPN Token will be similar to this example:

token=47TXhMVgdPrmV3n5aauIZ5CC0MrytYXWjID81pjVnQsEhkSUklPXT3clXZ4SFUFOL5WqepRUpBz5SKomoyPuDw==

IPN Message Format

After authenticating the token, Payza’s servers will send a URL-encoded name-value pair string containing different variables for each specific type of transaction or payment.

These are the IPN fields for transactions:

Fields Description Type / Format
ap_merchant The email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: ap_merchant=name@example.com
ap_purchasetype Indicate what type of purchase the message is for.
The field will hold one of the following values: item, item-goods, item-auction, service or subscription.
If the value is set to subscription, extra parameters will be included within the message.
Alphanumeric
Ex: ap_purchasetype=item
ap_referencenumber A unique Reference Number generated by Payza for the transaction.
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes.
Alphanumeric
Ex: ap_referencenumber=21F34-ERV4A-9O0I3
ap_quantity The number of items included in this purchase.
For subscriptions will always return value of 1.
Integer
Ex: ap_quantity=10
ap_amount The cost of each individual item or subscription. Numeric
Ex: ap_amount=39.77
ap_currency The currency of the payment.
The values are 3-letter ISO-4217 Code (see Currency Code Table).
Alphanumeric
Ex: ap_currency=USD
ap_description The description provided for the item or subscription.
Max Length: 150 characters.
Alphanumeric
Ex: ap_description=A brand new audio equipment.
ap_itemname The name that was provided for the item or subscription.
Max length: 50 characters
Alphanumeric
Ex: ap_itemname=Red Hat
ap_itemcode The optional code provided for the item.
Max length: 30 characters
Alphanumeric
Ex: ap_itemcode=ID3000
ap_additionalcharges Any additional charges associated with the purchase.
Format: 0.00
Numeric
Ex: ap_additionalcharges=5.90
ap_shippingcharges Any additional handling or shipping charges.
Format: 0.00
Numeric
Ex: ap_shippingcharges=5.49
ap_taxamount The tax charges related to the purchase.
Format: 0.00
Numeric
Ex: ap_taxamount=1.05
ap_discountamount Any special discount that was associated with the purchase.
Format: 0.00
Numeric
Ex: ap_discountamount=4.65
ap_totalamount The final amount paid by the buyer, before the transaction fee is subtracted.
Format: 0.00
Numeric
Ex: ap_discountamount=4.65
ap_feeamount The fee amount that was applied to this transaction.
Format: 0.00
Numeric
Ex: ap_feeamount=1.45
ap_netamount The amount received after the fees are applied.
It is calculated the following way: ap_netamount = ap_totalamount - ap_feeamount
Format: 0.00
Numeric
Ex: ap_netamount=134.65
ap_transactiontype Will always hold purchase for IPN messages related to items and subscription. Alphanumeric
Ex: ap_transactiontype=purchase
ap_transactionstate The state of the transaction after the payment is made, it will be one of the following:
Completed: The transaction is completed and you have the funds in your account.
On Hold: The payment is completed, however the funds are held for review.
Refunded: The transaction has been refunded and you have no longer the funds in your account.
Reversed: The payment has been reversed by Payza and you have no longer the funds in your account.
Alphanumeric
Ex: ap_transactionstate=Completed
ap_notificationtype The type of the notification whether it is for a new transaction or an update that occurred on a transaction.
New: Indicates that it is a notification for a new payment.
Update: Indicates that it is a notification for an existing payment that has been modified. Check ap_transactionstate field.
Alphanumeric
Ex: ap_notificationtype=New
ap_status The status of the purchase.
For a successful item payment the field will hold:
Success
For subscription payments, one of the following status will be returned:
Subscription-Payment-Success: This status is sent for all successful subscription payments; first as well as recurring.
Subscription-Expired: Means total amount for the product for all the subscriptions are paid successfully
Subscription-Payment-Failed: Buyer does not have enough funds for the subscription payment and run date will be rescheduled two times.
Subscription-Payment-Rescheduled: Due to the failed attempt, the payment has been rescheduled.
Subscription-Canceled: The merchant or the buyer explicitly canceled the subscription or Payza cancelled it since the buyer didn’t have enough money after rescheduling two times.
Alphanumeric
Ex: ap_status=Subscription-Payment-Success
ap_transactiondate The date which this transaction was processed by our system.
Format: YYYY-MM-DD HH:MM:SS
DateTime
Ex: ap_transactiondate=2015-09-28 11:03:54
ap_customeruniqueid The unique user ID linked to the buyer's Payza account. Alphanumeric
Ex: ap_customeruniqueid=SB6cgD5sQvq/BwB0Gl6IbD
apc_1
apc_2
apc_3
apc_4
apc_5
apc_6
Custom field values that were passed with the payment button.
Max Length: 100 characters each.
Alphanumeric
Ex: apc_1=Green cover included.
ap_alerturl The URL where you would like your IPNs to be sent. It is the URL of the location of your IPN Handler. By default, if this ap_alerturln is not provided, Payza will use the one from your merchant profile settings, however, if ap_alerturln is provided here, then this one will be used. Alphanumeric
Ex: ap_alerturl=http://www.example.com/ipnhandler
ap_test Value indicating whether your business profile associated with the payment is on test mode or not.
Will hold one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: ap_test=1
ap_ipnversion The IPN version used. Integer
Ex: ap_ipnversion=2
ap_custfirstname Customer’s first name.
Max Length: 50 characters
Alphanumeric
Ex: ap_custfirstname=John
ap_custlastname Customer’s last name.
Max Length: 50 characters
Alphanumeric
Ex: ap_custlastname=Smith
ap_custaddress Customer’s address.
Max Length: 100 characters
Alphanumeric
Ex: ap_custaddress=1313 Maple street
ap_custcity Customer’s city.
Max Length: 50 characters
Alphanumeric
Ex: ap_custcity=Apendee City
ap_custstate Customer’s state. Depending of their location, it will have their province or region.
Max Length: 50 characters
Alphanumeric
Ex: ap_custstate=QC
ap_custcountry Customer's country code.
The values are 3-letter ISO 3166-1 code (see Country Code Table).
Alphanumeric
Ex: ap_custcountry=CAN
ap_custzip Customer’s zip or postal code.
Max Length: 50 Characters
Alphanumeric
Ex: ap_custzip=A1A 1A1
ap_custemailaddress Customer’s email address.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: ap_custemailaddress=cctesting420@hotmail.com
Multi-Item information, will be included only if the purchase responds to a Multi-Item button *
ap_itemname_n The name that was provided for the item n.
Max length: 50 characters
Alphanumeric
Ex: ap_itemname_1=Green Hat
ap_description_n The description provided for the item n.
Max Length: 150 characters.
Alphanumeric
Ex: ap_description_1=Item n description.
ap_itemcode_n The optional code provided for the item n.
Max length: 30 characters
Alphanumeric
Ex: ap_itemcode_1=ID3001
ap_amount_n The cost of each individual item n. Numeric
Ex: ap_amount_1=29.77
ap_quantity_n The number of items included in this purchase of item n. Integer
Ex: ap_quantity_1=8
Shipping information, will be included only if it was provided by the buyer
ap_shipaddress Customer’s shipping address.
Max Length: 100 characters
Alphanumeric
Ex: ap_shipaddress=1313 Maple street
ap_shipcity Customer’s shipping city.
Max Length: 50 characters
Alphanumeric
Ex: ap_shipcity=Apendee City
ap_shipstate Customer’s shipping state. Depending of their location, it will have their province or region.
Max Length: 50 characters
Alphanumeric
Ex: ap_shipstate=QC
ap_shipcountry Customer's shipping country code.
The values are 3-letter ISO 3166-1 code (see Country Code Table).
Alphanumeric
Ex: ap_shipcountry=CAN
ap_shipzip Customer’s shipping zip or postal code.
Max Length: 50 Characters
Alphanumeric
Ex: ap_shipzip=A1A 1A1
Subscription information, will be included only if the purchase is a subscription
ap_subscriptionreferencenumber A unique reference number generated by Payza for the subscription. The same subscription reference number is sent for the first and all re-occurring payments.
Format: S-xxxxx-xxxxx-xxxxx
Length: 19 characters including the dashes.
Alphanumeric
Ex: ap_subscriptionreferencenumber=S-9O0I3-C9862-E5DDB
ap_timeunit Time unit used for the billing cycle. Will be one of the following values:
- Day
- Week
- Month
- Year
Alphanumeric
Ex: ap_timeunit=Month
ap_periodlength Subscription duration in days, weeks, months or years.
The possible values are dependent on the value of ap_timeunit.
Integer
Ex: ap_periodlength=5
ap_periodcount Number of times the subscription payment will reoccur. Integer
Ex: ap_periodcount=7
ap_setupamount A onetime amount that was charged when the subscription was first purchased.
Format: 0.00
Numeric
Ex: ap_setupamount=15.00
ap_trialamount The amount charged for a trial period. For a free trial period, the value will be 0.
Format: 0.00
Numeric
Ex: ap_trialamount=5.35
ap_trialtimeunit Time unit used for the trial period. Will be one of the following values:
- Day
- Week
- Month
- Year
Alphanumeric
Ex: ap_trialtimeunit=Week
ap_trialperiodlength Trial period duration in days, weeks, months or years. The value is dependent on the value of ap_trialtimeunit. Integer
Ex: ap_trialperiodlength=9
ap_nextrundate The next date when the subscription payment will be charged.
There will be no value returned when it is the last payment for a subscription.
Format: YYYY-MM-DD
Date
Ex: ap_nextrundate=2017-01-28
ap_subscriptionpaymentnumber A number indicating the number of times the subscription has been paid for.
Will hold the value of 1 for the initial payment and will increase by one for every payment of its reoccurrence.
Integer
Ex: ap_subscriptionpaymentnumber=4
ap_cancelledby In case of ap_subscriptionstatus=Subscription-Canceled, the name of who canceled the subscription, either the seller or the buyer. Otherwise will be return empty. Alphanumeric
Ex: ap_cancelledby=John Doe
ap_cancelnotes In case of ap_subscriptionstatus=Subscription-Canceled, the reazon for canceling the subscription if provided. Otherwise will be return empty. Alphanumeric
Ex: ap_cancelnotes=No longer needed subscription
ap_subscriptionstatus The status of the subscription, one of the following will be returned:
Subscription-Payment-Success: This status is sent for all successful subscription payments; first as well as recurring.
Subscription-Expired: Means total amount for the product for all the subscriptions are paid successfully
Subscription-Payment-Failed: Buyer does not have enough funds for the subscription payment and run date will be rescheduled two times.
Subscription-Payment-Rescheduled: Due to the failed attempt, the payment has been rescheduled.
Subscription-Canceled: The merchant or the buyer explicitly canceled the subscription or Payza cancelled it since the buyer didn’t have enough money after rescheduling two times.
Alphanumeric
Ex: ap_subscriptionstatus=Subscription-Payment-Success

* The n at the end of the 5 additional Multi-Item fields represent a sequential number associated with the item, starting with 1 and increasing by one for each additional item. These fields will be present only if the IPN is being sent for a Multi-Item Button purchase.

These are the IPN message fields for masspay transactions.

Fields Description Type / Format
ap_merchant The email address that was used in the field USER to make the mass payment.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: ap_merchant=name@example.com
ap_batchnumber A unique reference number generated by Payza for the MassPay batch.
Format: B-xxxxx-xxxxx-xxxxx
Length: 19 characters including the dashes.
Alphanumeric
Ex: ap_batchnumber=B-F50I3-98X63-E5D0B
ap_receiveremail Email address of the recipient of the MassPay payment.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: ap_receiveremail=client100@payza.com
ap_amount The amount sent in the transaction. Numeric
Ex: ap_amount=329.75
ap_transactiontype Will always hold masspay for MassPay IPN messages. Alphanumeric
Ex: ap_transactiontype=masspay
ap_currency The currency of the payment.
The values are 3-letter ISO-4217 Code (see Currency Code Table).
Alphanumeric
Ex: ap_currency=CAD
ap_test Value indicating whether your business profile associated with the payment is on test mode or not.
Will hold one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: ap_test=1
ap_referencenumber A unique Reference Number generated by Payza for the transaction.
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes.
Alphanumeric
Ex: ap_referencenumber=21F34-ERV4A-9O0I3
ap_returncode The same return code as the API’s response. Any value besides 100 should be considered as a failed transaction, (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: ap_returncode=100
ap_returncodedescription The description of the ap_returncode. It will be the same description that is returned from the MassPay API, (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: ap_returncodedescription=Transaction was completed successfully
ap_transactiondate The date which this transaction was processed by our system.
Format: YYYY-MM-DD HH:MM:SS
DateTime
Ex: ap_transactiondate=2016-03-12 01:35:04
ap_customeruniqueid The unique user ID linked to the buyer's Payza account.
Alphanumeric
Ex: ap_customeruniqueid=SB6cgD5sQvq/BwB0Gl6IbD
ap_mpcustom Custom value that was passed with the MassPay payment.
Max Length: 100 characters.
Alphanumeric
Ex: ap_mpcustom=Sample custom value.

Here is a sample IPN message sent by Payza for a MassPay transaction:

  ap_merchant%3Downer%40mystore.com%26ap_batchnumber%3DB-59DE6-A0BB3-64499%26ap_receiveremail%3Djohnsmith%40email.com%26ap_amount%3D29.98%26ap_transactiontype%3Dmasspay%26ap_currency%3DCAD%26ap_test%3D0%26

  ap_referencenumber%3D13AD5-2WD40-5UE7B%26ap_returncode%3D100%26ap_returncodedescription%3DTransaction+was+completed+successfully%26

  ap_transactiondate%3D2013-11-06+09:00:38%26ap_customeruniqueid%3DXBEcgD5sIbQ0Gl6vqBD%2FBw%26ap_mpcustom%3D

The IPN is URL-encoded. After receiving an IPN, you must URL-decode it before you can use its values. Further details on URL-decoding are given in the URL-code section.

After URL-decode, the IPN message looks like this:

  ap_merchant=owner@mystore.com&ap_batchnumber=B-59DE6-A0BB3-64499&ap_receiveremail=johnsmith@email.com&ap_amount=29.98&ap_transactiontype=masspay&ap_currency=CAD&ap_test=0&ap_referencenumber=13AD5-2WD40-5UE7B&ap_returncode=100&ap_returncodedescription=Transaction was completed successfully&ap_transactiondate=2013-11-06 09:00:38&ap_customeruniqueid=XBEcgD5sIbQ0Gl6vqBD/Bw&ap_mpcustom=

IPN previous version

Payza still supports IPN Version 1, however, this version is less secure than IPN Version 2 because there is no authentication made during the communication process.

If you are using IPN Version 1, the only way to validate that the IPN you received was sent by Payza is by checking the ap_securitycode included in the message for this version. Once you receive the IPN you need to compare the ap_securitycode value with the IPN Security Code generated in your Payza account.

Suggest Edits

IPN Handler

 

To capture and process the data contained in Payza's IPNs, you will need a script written in the server-side web programming language(s) of your choice which will listen for and handle incoming alerts. The program or script, often called the IPN Handler or IPN Listener, must be configured on the Alert URL you have provided in your Payza account. The Alert URL is the specific URL that you provide where Payza will send all your IPN messages.

Depending on the needs of your website, your IPN Handler can be configured to perform different actions with the IPN data. Here are few examples:

  • Update an inventory
  • Update and fulfill a customer’s order
  • Automatically make a payout upon receipt of a payment using our SendMoney API
  • Update your database in case of transaction refunds, reversals, or placed on hold

Programming knowledge is required in order to properly configure your IPN Handler to perform these actions.

Payza also notifies you by email when a payment is made to your account. IPN messages do not replace these emails, they simply allow you to automate how your website processes the payment information you receive.

Implementing an IPN Handler

An IPN Handler can be written in the web programming or scripting language you prefer. Payza provides sample IPN Handler codes in different programming languages to help you get started. Your IPN Handler script must be hosted on your web server.

In order for your IPN Handler script to function properly, it must do the following:

  • Capture the HTTP POST from Payza. The token is sent by HTTP POST.
  • Send the token back to our server
  • Read the response from Payza and URL-decode the response. All variables will be included in this response.

Optionally, you may want your IPN Handler to check for the following variables:
  ap_purchasetype: Indicates whether the purchase was for an item or a subscription.
  ap_status: Depending on the purchase type, this variable checks for the proper status. Refer to the IPN Variables Reference for the complete list of possible statuses.
  ap_test: Indicates whether the received IPN was for a test transaction.
  ap_referencenumber: Returns the Payza Transaction Reference Number, or returns “TEST TRANSACTION” if IPN is in Test Mode.
  ap_itemname: Indicates the item name for the product or service purchased.
  ap_currency: Indicates the currency used for the payment.
  ap_totalamount: Indicates the total amount received for the purchase.
  ap_notificationtype: Indicates whether the notification is for a new transaction or for an update to an existing transaction.
  ap_transactionstate: Indicates the state of the transaction. If ap_notificationtype is set to Update, you may want to check the state of the transaction in order to take further action.

IPN TROUBLESHOOTING

Errors in receiving IPNs are the most common issue you may encounter. Here are possible reasons why your IPN Handler is not receiving Payza's IPN and how to correct these issues:

  • The Alert URL you provided is incorrect and does not link to your script. Make sure you entered the Alert URL that corresponds to the URL where your IPN Handler script is located.
  • Your Return URL is the same as your Alert URL. Our system does not allow these two URLs to be exactly the same. You must specify a unique URL for your Alert URL and your Return URL.
  • The firewall settings on your web server are blocking the HTTP POST data from Payza. Check your firewall settings to ensure that it is not blocking the HTTP POST date.
/*
 * Sample IPN Handler
 */

protected void IPNHandler(object sender)
{
    string token = Request.Form["token"];
    token = "token=" + Context.Server.UrlEncode(token);

    // send the post
    HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create("https://secure.payza.com/ipn2.ashx");
    objRequest.Method = "POST";
    objRequest.ContentLength = token.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    StreamWriter myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(token);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
          
    // process the response
    if (response.Length > 0)
    {
        if (Context.Server.UrlDecode(response) == "INVALID TOKEN")
        {
            // the token is not valid
        }
        else
        {
            response = Context.Server.UrlDecode(response);
            // the response is decoded, now you can process it in your system
        }
    }
    else
    {
        // something is wrong, no response is received from Payza
    }
}
<?php
	/*
	 * Sample IPN Handler
	 */

 	// Url address of IPN V2 handler and the identifier of the token string 
	define("IPN_V2_HANDLER", "https://secure.payza.com/ipn2.ashx");
	define("TOKEN_IDENTIFIER", "token=");
	
	// get the token from Payza
	$token = urlencode($_POST['token']);

	// preappend the identifier string "token=" 
	$token = TOKEN_IDENTIFIER.$token;
	
	$response = '';
	
	// send the URL encoded TOKEN string to the Payza's IPN handler
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, IPN_V2_HANDLER);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $token);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 60);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	// $response holds the response string from the Payza's IPN.
	$response = curl_exec($ch);

	curl_close($ch);
	
	if($response != FALSE)
	{
		if(urldecode($response) == "INVALID TOKEN")
		{
			// the token is not valid
		}
		else
		{
			// urldecode the received response from Payza's IPN V2
			$response = urldecode($response);
		}
	}
	else
	{
		// something is wrong, no response is received from Payza
	}
?>

The Payza platform provides you with a set of Application Programming Interfaces or APIs to make it easy to interact with our system. APIs also provide ways to integrate with Payza's platform regardless of the technology your Web application uses.

Here are some technical details related to our APIs.

URL Format

As defined by the World Wide Web Consortium, a Uniform Resource Locator or URL must conform to Uniform Resource Identifier or URI specifications. Also, the request and response are in URL-encoded format. You can find out more about URI at http://www.w3.org/Addressing/.

NVP Format

The Name-Value Pair or NVP is the informal name for the query in the URI specification, is a way of stating names and values in a string. The NVP string is attached to the URL and follows these guidelines:

  • The name is separated from the value by an equal sign (=): AMOUNT=24
  • Name-value pairs are separated by an ampersand (&): AMOUNT=24&CURRENCY=USD
  • The values for each field in an NVP string are URL-encoded.

URL-encode

The request strings sent to the APIs must be URL-encoded into a valid URL format. In order to transmit special characters, symbols that are not allowed in a URL and characters that have special meaning in a URL sent properly across the internet, URL-encoding must be performed prior to sending any data.

For example, the following string, USER=email@example.com, will be URL-encoded as follows: USER=email%40example.com.

URL Encoding / Decoding Methods

Language URL-Encode Method URL-Decode Method
  ASP.NET System.Web.HttpUtility.UrlEncode(buffer, Encoding.Default) System.Web.HttpUtility.UrlDecode(buffer, Encoding.Default)
  Classic ASP  Server.URLEncode(string)  No built-in function
  ColdFusion  URLEncodedFormat(string [, charset ])  URLDecode(urlEncodedString[, charset])
  Java  java.net.URLEncoder.encode  java.net.URLDecoder.decode
  JavaScript  escape(String) Note: does not encode '/' and '+' character  unescape(String)
  Perl  uri_escape  uri_unescape
  PHP  urlencode(string)  urldecode(string)

Security

All requests made through APIs are standard Secure Hyper Text Transfer Protocol or HTTPS requests. This is now a Payza API requirement, even though the HTTP/1.1 Specification states that the "User-Agent" HTTP request header is not mandatory and even though previous versions of this manual do not mention this.

HTTPS is the client host’s way of verifying a program. If the client does not send this string, Payza cannot verify or record it and the response from our servers will be HTTP 404 Forbidden. Sending the "User-Agent" is critical to our network security policy and is usually a simple setting in client programs. If you do not want to send the header because of tracking purposes, be advised that this can be used by potential attackers as a loophole.

YOU MUST HAVE A PAYZA BUSINESS ACCOUNT TO USE PAYZA APIs

You must have a Business account in order to activate the API setup from your Payza account and set your API password.

SETTING UP API USE FOR YOUR ACCOUNT

To set up your API password, just follow these steps:
1) In your Payza account click "Account" then select "API Integration".
2) Click “Get started now" and then "Initiate your API setup".
3) Enter your Transaction PIN and click "Access".
4) Under "Activate API", select "Enabled" for API Status.
5) Choose an API password and confirm it by re-entering the password.
6) Click "Update" to save the information.
7) (Optional) If you are testing your API integration, under "Test Mode" select "Enabled". See the section Test Mode in this guide for more details.
8) (Optional) You can specify from the IP addresses that are allowed to make API requests by selecting "Enabled for Restricted by IP" under "IP address". See the section IP Restriction in this guide for more details.

CHOOSE A STRONG AND MEMORABLE API PASSWORD

You are required enter your API password for every API request you make. It is important to choose a strong API password. Do not share your API password with anyone.

RESETTING YOUR API PASSWORD

If you forgot your API password, just follow the steps below:
1) In your Payza account click "Account" then select "API Integration".
2) Click “Get started now" and then "Initiate your API setup".
3) Enter your "Transaction PIN" and click "Access".
4) Under "Activate API", select "Enabled" for API Status.
5) Click on "Reset API Password".
6) Enter your new API password and confirm it by re-entering the password.
7) Click "Update" to save your new API password.

Test Mode

You can test the functionality of your APIs with a Payza feature designed to do just that. No actual funds are transferred while in Test Mode, however, the API will return the proper responses to your request.

Test Mode can be enabled or disabled either within your Payza account or from a post variable that is sent to the API. The API responses for test transactions WILL contain a Batch Reference Number in the REFERENCENUMBER variable; the TESTMODE variable will contain 1.

ENABLING AND DISABLING TEST MODE

To enable or disable Test Mode in your Payza account, follow these steps:

1) In your Payza account click "Account" then select "API Integration".
2) Click “Get started now" and then "Initiate your API setup".
3) Enter your Transaction PIN and click "Access".
4) Under "Test Mode", select either "Enabled" or "Disabled" for "Test Mode".
5) Click "Update" to save your settings.

When you enable Test Mode for APIs in your Payza account, ALL requests to the API will be test transactions. This setting takes precedence over the TESTMODE post variable that is sent through a HTTPS request.

Test Mode can also be enabled for specific transactions allowing you to test a request while Test Mode is set to "Disabled" in your account. Simply send TESTMODE=1 along with your HTTP request to the API. For example, the following request is a test transaction for the SubscriptionCancellation API:

  USER=email%40example.com&PASSWORD=5cpjOGKo9dtySB5S&SUBSCRIPTIONREFERENCE=S-84A6D-F9412-3AT96&NOTE=This%20is%20a%20test%20cancellation.&TESTMODE=1

In this case you will receive the proper response for the request but no actions (in this example, canceling the subscription) will take place.

Frequently Asked Questions | FAQ

Q: If Test Mode is enabled in my Payza account, can I disable it by sending TESTMODE=0 in my request??

No, you cannot disable Test Mode this way. Test Mode can only be disabled in your Payza account.

Q: If Test Mode is disabled in my Payza account and I send a request with TESTMODE=1, will the transaction be in Test Mode?

Yes, the transaction will be in Test Mode.

Q: Is Test Mode available for all APIs?

No, only the SendMoney API, MassPay API, Refund API, and SubscriptionCancellation API are designed to work in Test Mode.

IP Restriction

As an added security measure, you can set up your Payza APIs to only function when the requests are sent from authorized IP addresses. When our API receives a request from an unauthorized IP address, the following error message will appear: 223: Cannot perform this action from this IP address.

SETTING UP IP RESTRICTION

To enable IP Restriction, follow these steps:

1) In your Payza account click "Account" then select "API Integration".
2) Click “Get started now" and then "Initiate your API setup".
3) Enter your "Transaction PIN" and click "Access".
4) Under "Activate API", select "Enabled" for API Status.
7) Select "Enabled for Restricted by IP" under IP Address .
8) Click "Update" to save your settings.

To add more IPs, click on "Add IP Address" and a new input box will appear. Enter the IP you would like to authorize for API use.

Once your account has been configured to work with APIs, you will need to configure your website to communicate with Payza’s server.

Suggest Edits

GetPaymentToken

 

Payza's GetPaymentToken API is a simple interface that allows you to create Tokenized Payment Buttons, which provide an additional layer of security. Tokenized Payment Buttons can also be used to perform Split Payments. Payment Buttons that do not use this API cannot be used for Split Payments.

Using the GetPaymentToken API

You can securely post your request as a Name-Value pair string to Payza’s server by HTTPS. Payza will send a response whether the transaction was successful or not, and will also send a return code and a description.

All requests to the GetPaymentToken API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/GetPaymentToken

CREATING PAYZA TOKENIZED CHECKOUT BUTTONS

To create Tokenized Checkout Buttons, follow these three steps:

1) Set up APIs for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response that is returned from Payza.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password you created in the API setup section of your Payza account. Alphanumeric
Ex: R5rF7RRRtZyyrfYu
ap_url Required Your website URL. Alphanumeric
Ex: ap_url=www.example.com
ap_purchasetype Required Indicate what type of purchase the payment is for.
Must be one of the following: item-goods, item-auction, service, donation or other.
Alphanumeric
Ex: ap_purchasetype=other
ap_itemname Required The name of the item or service to be displayed on the checkout page. Alphanumeric
Ex: ap_itemname=MP3 Player
ap_description Required The description of the item or service. Alphanumeric
Ex: ap_description=Audio equipment
ap_itemcode Optional The code of the item, in case there is any additional information you need to capture on your application. Alphanumeric
Ex: ap_itemcode=XYZ123
ap_amount Required The price amount of the item or service.
Format: 0.00
Min Amount: 1.00 in any currency.
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_amount=39.77
ap_currency Required The currency of the payment.
The permitted values must be a 3-letter ISO-4217 Code (see Currency Code Table).
Alphanumeric
Ex: ap_currency=EUR
ap_shippingcharges Optional The shipping charges. Numeric
Ex: ap_shippingcharges=5.49
ap_additionalcharges Optional Additional charges. Numeric
Ex: ap_additionalcharges=11.30
ap_taxamount Optional The tax amount. Numeric
Ex: ap_taxamount=1.05
ap_returnurl Optional The URL to redirect the user if the purchase is successful. Alphanumeric
Ex: ap_returnurl=www.example.com/return
ap_cancelurl Optional The URL to redirect the user if the purchase is canceled. Alphanumeric
Ex: ap_cancelurl=www.example.com/cancel
apc_1
apc_2
apc_3
apc_4
apc_5
apc_6
Optional Custom fields, in case there is any additional information you need to capture on your application. Up to 6 custom fields can be used. Alphanumeric
Ex: apc_1=custom info

As an example, you may use a simple HTML form to post your request to the GetPaymentToken API. DO NOT use this set up in a live environment because values, such as your password are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/GetPaymentToken">
	<input type="hidden" name="USER" value="name@example.com"/>
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu"/>
	<input type="hidden" name="ap_url" value="www.example.com">
	<input type="hidden" name="ap_purchasetype" value="other">
	<input type="hidden" name="ap_itemname" value="MP3 Player">
	<input type="hidden" name="ap_description " value="Audio equipment">
	<input type="hidden" name="ap_itemcode" value="XYZ123">
	<input type="hidden" name="ap_amount" value="39.77">
	<input type="hidden" name="ap_currency" value="EUR">
	<input type="hidden" name="ap_shippingcharges" value="5.49">
	<input type="hidden" name="ap_additionalcharges" value="11.30">
	<input type="hidden" name="ap_taxamount" value="1.05">
	<input type="hidden" name="ap_returnurl" value="www.example.com/return">
	<input type="hidden" name="ap_cancelurl" value="www.example.com/cancel">
	<input type="hidden" name="apc_1" value="custom info">
	<input type="hidden" name="apc_2" value="more info">
</form>

This is an example request for the GetPaymentToken API before it is URL-encoded:

  USER=name@example.com&PASSWORD=R5rF7RRRtZyyrfYu&ap_url=www.example.com&ap_purchasetype=other&ap_itemname=MP3 Player&ap_description=Audio equipment&ap_itemcode=XYZ123&ap_amount=39.77&ap_currency=EUR&ap_shippingcharges=5.49&ap_additionalcharge=11.30&ap_taxamoun=1.05&ap_returnurl=www.example.com/return&ap_cancelurl=www.example.com/cancel&apc_1=custom info&apc_2=more info

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request. It will always have the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
TOKEN The token generated for this transaction. Alphanumeric
Ex: TOKEN=FFqnIIDomECE4vG3uNcTw==

A successful query will contain a RETURNCODE of 100, a DESCRIPTION of the return code, and will include the TOKEN generated for this transaction, which can be safely used with Tokenized Payment Buttons.

This is an example of a message received for a successful query:

  RETURNCODE=100&DESCRIPTION=Transaction%20was%20completed%20successfully&TOKEN=FFqnIIDomECE4vG3uNcTw==

An unsuccessful transaction will always contain a value above 200 in the RETURNCODE and its DESCRIPTION will contain details regarding the issue. The variable TOKEN will NOT be returned.

This is an example of a message received for a unsuccessful query:
  RETURNCODE=221&DESCRIPTION=Invalid%20USER%20or%20PASSWORD

protected void GetPaymentTokenClient(string myUserName, 
                                     string apiPassword, 
                                     string strWebsiteUrl, 
                                     string strPurchaseType, 
                                     string strItemName,  
                                     string strItemDescription,  
                                     string strItemCode, 
                                     decimal decAmountPaid, 
                                     string strCurrency, 
                                     decimal decShippingAmount, 
                                     decimal decAddAmount, 
                                     decimal decTaxAmount, 
                                     string strReturnUrl, 
                                     string strCancelUrl, 
                                     string strApc_1, 
                                     string strApc_2, 
                                     string strApc_3, 
                                     string strApc_4, 
                                     string strApc_5, 
                                     string strApc_6)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/GetPaymentToken"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
  
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&ap_url={2}&ap_purchasetype={3}&ap_itemname={4}&ap_description={5}&ap_itemcode={6}&ap_amount={7}&ap_currency={8}&ap_shippingcharges={9}&ap_additionalcharges={10}&ap_taxamount={11}&ap_returnurl={12}&ap_cancelurl={13}&apc_1={14}&apc_2={15}&apc_3={16}&apc_4={17}&apc_5={18}&apc_6={19}",
                              HttpUtility.UrlEncode(myUserName), HttpUtility.UrlEncode(apiPassword), 
                              HttpUtility.UrlEncode(strWebsiteUrl), HttpUtility.UrlEncode(strPurchaseType), 
                              HttpUtility.UrlEncode(strItemName), HttpUtility.UrlEncode(strItemDescription),
                              HttpUtility.UrlEncode(strItemCode), HttpUtility.UrlEncode(decAmountPaid.ToString()), 
                              HttpUtility.UrlEncode(strCurrency), HttpUtility.UrlEncode(decShippingAmount.ToString()), 
                              HttpUtility.UrlEncode(decAddAmount.ToString()), HttpUtility.UrlEncode(decTaxAmount.ToString()), 
                              HttpUtility.UrlEncode(strReturnUrl), HttpUtility.UrlEncode(strCancelUrl), 
                              HttpUtility.UrlEncode(strApc_1), HttpUtility.UrlEncode(strApc_2), 
                              HttpUtility.UrlEncode(strApc_3), HttpUtility.UrlEncode(strApc_4), 
                              HttpUtility.UrlEncode(strApc_5), HttpUtility.UrlEncode(strApc_6));
    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function GetPaymentTokenClient($myUserName, // Your Payza user name which is your email address
                             $apiPassword, // Your API password
                             $websiteUrl, // Your website URL
                             $purchaseType, // The type of the purchase
                             $itemName, // The name of the item or service
                             $itemDescription, // Description for the item
                             $itemCode, // Item code
                             $amount, // The amount of the purchase
                             $currency, // The 3 letter ISO-4217 currency code
                             $shippingAmount, // Shipping charges
                             $addAmount, // Additional charges
                             $taxAmount, // Tax charges
                             $returnUrl, // URL to redirect if the purchase is successful
                             $cancelUrl, // URL to redirect if the purchase is canceled
                             $apc_1, // Additional info field 1
                             $apc_2, // Additional info field 2
                             $apc_3, // Additional info field 3
                             $apc_4, // Additional info field 4
                             $apc_5, // Additional info field 5
                             $apc_6) // Additional info field 6
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/GetPaymentToken'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&ap_url=%s&ap_purchasetype=%s&ap_itemname=%s&ap_description=%s&ap_itemcode=%s&ap_amount=%s&ap_currency=%s&ap_shippingcharges=%s&ap_additionalcharges=%s&ap_taxamount=%s&ap_returnurl=%s&ap_cancelurl=%s&apc_1=%s&apc_2=%s&apc_3=%s&apc_4=%s&apc_5=%s&apc_6=%s",
                      urlencode((string)$myUserName),
                      urlencode((string)$apiPassword),
                      urlencode((string)$websiteUrl),
                      urlencode((string)$purchaseType),
                      urlencode((string)$itemName),
                      urlencode((string)$itemDescription),
                      urlencode((string)$itemCode),
                      urlencode((string)$amount),
                      urlencode((string)$currency),
                      urlencode((string)$shippingAmount),
                      urlencode((string)$addAmount),
                      urlencode((string)$taxAmount),
                      urlencode((string)$returnUrl),
                      urlencode((string)$cancelUrl),
                      urlencode((string)$apc_1),
                      urlencode((string)$apc_2),
                      urlencode((string)$apc_3),
                      urlencode((string)$apc_4),
                      urlencode((string)$apc_5),
                      urlencode((string)$apc_6));

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
Suggest Edits

Split Payments

 

Split Payments will be automatically enabled when you include additional recipients to your GetPaymentToken API request. Each recipient will be identified by a sequential number starting with 1. The table below explains which fields should be added to your request:

Fields Requirement Description Type / Format
ap_recipient_email_n Required The email address of the recipient n.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: ap_recipient_email_1= email@example.com
ap_recipient_amount_n Required The amount you are sending to this recipient.
Format: 0.00
Min Amount: 1.00 in any currency.
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: ap_recipient_amount_1=20
ap_recipient_payfees_n Optional Determines if the recipient will pay the fees associated to the transfer. If set to false, the merchant associated with the "Buy Now" button will pay the transfer fees. Default value: true, meaning the recipient will cover transfer fees. false / true
Ex: ap_recipient_payfees_1= false

The n at the end of some field names represents a sequential number associated to the recipient, starting at 1.

Below is an example HTML code for a standard Tokenized Checkout Button. DO NOT use this script in a live environment because values, such as your password, are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/GetPaymentToken">
	<input type="hidden" name="USER" value="name@example.com"/>
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu"/>
	<input type="hidden" name="ap_url" value="www.example.com">
	<input type="hidden" name="ap_purchasetype" value="other">
	<input type="hidden" name="ap_itemname" value="MP3 Player">
	<input type="hidden" name="ap_description " value="Audio equipment">
	<input type="hidden" name="ap_itemcode" value="XYZ123">
	<input type="hidden" name="ap_amount" value="39.77">
	<input type="hidden" name="ap_currency" value="EUR">
	<input type="hidden" name="ap_shippingcharges" value="5.49">
	<input type="hidden" name="ap_additionalcharges" value="11.30">
	<input type="hidden" name="ap_taxamount" value="1.05">
	<input type="hidden" name="ap_returnurl" value="www.example.com/return">
	<input type="hidden" name="ap_cancelurl" value="www.example.com/cancel">
	<input type="hidden" name="apc_1" value="custom info">
	<input type="hidden" name="apc_2" value="more info">
</form>

The above HTML code would generate a request that resembles the following before being URL-encoded:

  USER=name@example.com&PASSWORD=R5rF7RRRtZyyrfYu&ap_url=www.example.com&ap_purchasetype=other&ap_itemname=MP3 Player&ap_description=Audio equipment&ap_itemcode=XYZ123&ap_amount=39.77&ap_currency=EUR&ap_shippingcharges=5.49&ap_additionalcharge=11.30&ap_taxamoun=1.05&ap_returnurl=www.example.com/return&ap_cancelurl=www.example.com/cancel&apc_1=custom info&apc_2=more info

If you want to split a portion of the amount received for every sale of this type with two more recipient Payza accounts, add the corresponding information for those two new recipients. The resulting HTML code would looks like this:

<form method="post" action="https://api.payza.com/svc/api.svc/GetPaymentToken">
	<input type="hidden" name="USER" value="name@example.com"/>
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu"/>
	<input type="hidden" name="ap_url" value="www.example.com">
	<input type="hidden" name="ap_purchasetype" value="other">
	<input type="hidden" name="ap_itemname" value="MP3 Player">
	<input type="hidden" name="ap_description " value="Audio equipment">
	<input type="hidden" name="ap_itemcode" value="XYZ123">
	<input type="hidden" name="ap_amount" value="39.77">
	<input type="hidden" name="ap_currency" value="EUR">
	<input type="hidden" name="ap_shippingcharges" value="5.49">
	<input type="hidden" name="ap_additionalcharges" value="11.30">
	<input type="hidden" name="ap_taxamount" value="1.05">
	<input type="hidden" name="ap_returnurl" value="www.example.com/return">
	<input type="hidden" name="ap_cancelurl" value="www.example.com/cancel">
	<input type="hidden" name="apc_1" value="custom info">
	<input type="hidden" name="apc_2" value="more info">
	<input type="hidden" name="ap_recipient_email_1" value="recipient1@example.com"/>
	<input type="hidden" name="ap_recipient_amount_1" value="10">
	<input type="hidden" name="ap_recipient_payfees_1" value="true">
	<input type="hidden" name="ap_recipient_email_2" value="recipient2@example.com"/>
	<input type="hidden" name="ap_recipient_amount_2" value="11.65">
</form>

In this case, 10 Euros from the purchase amount will be transferred to the recipient1@example.com Payza account and the transfer fees will be charged to that account, and 11.65 Euros will be transferred to the recipient2@example.com account without paying the taxes.

Below is an example of the new request before being URL-encoded:

  USER=name@example.com&PASSWORD=R5rF7RRRtZyyrfYu&ap_url=www.example.com&ap_purchasetype=other&ap_itemname=MP3 Player&ap_description=Audio equipment&ap_itemcode=XYZ123&ap_amount=39.77&ap_currency=EUR&ap_shippingcharges=5.49&ap_additionalcharge=11.30&ap_taxamoun=1.05&ap_returnurl=www.example.com/return&ap_cancelurl=www.example.com/cancel&apc_1=custom info&apc_2=more info&ap_recipient_email_1=recipient1@example.com&ap_recipient_amount_1=10&ap_recipient_payfees_1=true&ap_recipient_email_2=recipient2@example.com&ap_recipient_amount_2=11.65

The response of the GetPaymentToken API using Split Payments will maintain the same structure and behavior as a standard GetPaymentToken API response.

protected void GetPaymentTokenSPClient(string myUserName, 
                                     string apiPassword, 
                                     string strWebsiteUrl, 
                                     string strPurchaseType, 
                                     string strItemName,  
                                     string strItemDescription,  
                                     string strItemCode, 
                                     decimal decAmountPaid, 
                                     string strCurrency, 
                                     decimal decShippingAmount, 
                                     decimal decAddAmount, 
                                     decimal decTaxAmount, 
                                     string strReturnUrl, 
                                     string strCancelUrl, 
                                     string strApc_1, 
                                     string strApc_2, 
                                     string strApc_3, 
                                     string strApc_4, 
                                     string strApc_5, 
                                     string strApc_6, 
                                     string[,] arrSplit)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/GetPaymentToken"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
  
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&ap_url={2}&ap_purchasetype={3}&ap_itemname={4}&ap_description={5}&ap_itemcode={6}&ap_amount={7}&ap_currency={8}&ap_shippingcharges={9}&ap_additionalcharges={10}&ap_taxamount={11}&ap_returnurl={12}&ap_cancelurl={13}&apc_1={14}&apc_2={15}&apc_3={16}&apc_4={17}&apc_5={18}&apc_6={19}",
                              HttpUtility.UrlEncode(myUserName), HttpUtility.UrlEncode(apiPassword), 
                              HttpUtility.UrlEncode(strWebsiteUrl), HttpUtility.UrlEncode(strPurchaseType), 
                              HttpUtility.UrlEncode(strItemName), HttpUtility.UrlEncode(strItemDescription),
                              HttpUtility.UrlEncode(strItemCode), HttpUtility.UrlEncode(decAmountPaid.ToString()), 
                              HttpUtility.UrlEncode(strCurrency), HttpUtility.UrlEncode(decShippingAmount.ToString()), 
                              HttpUtility.UrlEncode(decAddAmount.ToString()), HttpUtility.UrlEncode(decTaxAmount.ToString()), 
                              HttpUtility.UrlEncode(strReturnUrl), HttpUtility.UrlEncode(strCancelUrl), 
                              HttpUtility.UrlEncode(strApc_1), HttpUtility.UrlEncode(strApc_2), 
                              HttpUtility.UrlEncode(strApc_3), HttpUtility.UrlEncode(strApc_4), 
                              HttpUtility.UrlEncode(strApc_5), HttpUtility.UrlEncode(strApc_6));

    int iteration = arrSplit.GetLength(0);
    for (int i = 0; i < iteration; i++)
    {
        sbDataToSend.AppendFormat("&ap_recipient_email_{0}={1}&ap_recipient_amount_{0}={2}&ap_recipient_payfees_{0}={3}", 
                                  i+1, arrSplit[i,0], arrSplit[i,1], arrSplit[i,2]);
    }

    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function GetPaymentTokenSPClient($myUserName, // Your Payza user name which is your email address
                             $apiPassword, // Your API password
                             $websiteUrl, // Your website URL
                             $purchaseType, // The type of the purchase
                             $itemName, // The name of the item or service
                             $itemDescription, // Description for the item
                             $itemCode, // Item code
                             $amount, // The amount of the purchase
                             $currency, // The 3 letter ISO-4217 currency code
                             $shippingAmount, // Shipping charges
                             $addAmount, // Additional charges
                             $taxAmount, // Tax charges
                             $returnUrl, // URL to redirect if the purchase is successful
                             $cancelUrl, // URL to redirect if the purchase is canceled
                             $apc_1, // Additional info field 1
                             $apc_2, // Additional info field 2
                             $apc_3, // Additional info field 3
                             $apc_4, // Additional info field 4
                             $apc_5, // Additional info field 5
                             $apc_6, // Additional info field 6
                             $splitRecipients) // Recipients info for split payment
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/GetPaymentToken'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&ap_url=%s&ap_purchasetype=%s&ap_itemname=%s&ap_description=%s&ap_itemcode=%s&ap_amount=%s&ap_currency=%s&ap_shippingcharges=%s&ap_additionalcharges=%s&ap_taxamount=%s&ap_returnurl=%s&ap_cancelurl=%s&apc_1=%s&apc_2=%s&apc_3=%s&apc_4=%s&apc_5=%s&apc_6=%s",
                      urlencode((string)$myUserName),
                      urlencode((string)$apiPassword),
                      urlencode((string)$websiteUrl),
                      urlencode((string)$purchaseType),
                      urlencode((string)$itemName),
                      urlencode((string)$itemDescription),
                      urlencode((string)$itemCode),
                      urlencode((string)$amount),
                      urlencode((string)$currency),
                      urlencode((string)$shippingAmount),
                      urlencode((string)$addAmount),
                      urlencode((string)$taxAmount),
                      urlencode((string)$returnUrl),
                      urlencode((string)$cancelUrl),
                      urlencode((string)$apc_1),
                      urlencode((string)$apc_2),
                      urlencode((string)$apc_3),
                      urlencode((string)$apc_4),
                      urlencode((string)$apc_5),
                      urlencode((string)$apc_6));
  
	//check if the received variable is an array
	if (!is_array($splitRecipients)) 
	{ 
		die ("Argument is not an array!"); 
	}
	else
	{
		$iteration = count($splitRecipients);
		$splitpay='';
    	
		// create another array with proper parameter names
		$p = 0; // variable used for the subscript of the payment number
		for ($x = 0; $x < $iteration; $x++)
		{
			$p++;
			$splitpay .= "&ap_recipient_email_$p=".urlencode($splitRecipients[$x]["receiver"])."&ap_recipient_amount_$p=".urlencode($splitRecipients[$x]["amount"])."&ap_recipient_payfees_$p=".urlencode($splitRecipients[$x]["payfees"]);
		}
	}
	dataToSend .= $splitpay;

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
Suggest Edits

SendMoney

 

The Payza SendMoney API is a simple interface that allows you to send money instantly without logging in to your Payza account. You can pass your payment details directly to our API and the transaction will be processed automatically.

The SendMoney API tool is ideal if you would like to integrate a payout system within your web application.

Using the SendMoney API

You can securely post your request as a NVP string to Payza’s server by HTTPS. Payza will send a response whether the transaction was successful or not, and will also send a return code and description.

All requests to the SendMoney API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/sendmoney

USING THE SENDMONEY API TO SEND FUNDS WITH PAYZA

To send money using Payza’s SendMoney API, follow these three steps:

1) Set up APIs for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response that is returned from Payza.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password you created in the API setup section of your Payza account. Alphanumeric
Ex: R5rF7RRRtZyyrfYu
AMOUNT Required The amount you are sending.
Format: 0.00
Min Amount: 1.00 in any currency.
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: AMOUNT=10.25
CURRENCY Required The currency of the payment.
The permitted values must be a 3-letter ISO-4217 Code (see Currency Code Table).
Alphanumeric
Ex: CURRENCY=AUD
RECEIVEREMAIL Required The payment recipient's email address.
Max Length: 64 characters for the Local part (before the "@" symbol). 255 characters for the Domain part (after the "@" symbol)
Alphanumeric
Ex: RECEIVEREMAIL=receiver@example.com
SENDEREMAIL Optional A secondary email address. The payment recipient will see this email address as the sender.
This must not be confused with the email used for USER.
Max Length: 64 characters for the Local part (before the @), 255 characters for the Domain part (after the @).
Alphanumeric
Ex: SENDEREMAIL=sender@example.com
PURCHASETYPE Required Indicate what type of transaction the payment is for.
Must be one of the following integer number 0, 1, 2 or 3:
0 = Service
1 = Goods
2 = Auction-Goods
3 = Others
Length: 1 digit
Numeric
Ex: PURCHASETYPE=1
NOTE Optional A note that you can add to this transaction.
Max length: 1000 characters
Alphanumeric
Ex: NOTE=Payment for a service provided
TESTMODE Optional Value indicating whether your business profile associated with the payment is on Test Mode or not.
Must be one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=1

As an example, you may use a simple HTML form to post your request to the SendMoney API. DO NOT use this script in a live environment because values, such as your password, are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/sendmoney">
	<input type="hidden" name="USER" value="name@example.com" />
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu" />
	<input type="hidden" name="AMOUNT" value="10.25" />
	<input type="hidden" name="CURRENCY" value="AUD" />
	<input type="hidden" name="RECEIVEREMAIL" value="receiver@example.com" />
	<input type="hidden" name="SENDEREMAIL" value="sender@example.com" />
	<input type="hidden" name="PURCHASETYPE" value="1" />
	<input type="hidden" name="NOTE" value="Payment for service provided" />
	<input type="hidden" name="TESTMODE" value="1" />
</form>

This is an example request for the SendMoney API before it is URL-encoded:

  USER=name@example.com&PASSWORD=R5rF7RRRtZyyrfYu&AMOUNT=10.25&CURRENCY=AUD&RECEIVEREMAIL=receiver@example.com&SENDEREMAIL=sender@example.com&PURCHASETYPE=1&NOTE= Payment for service provided.&TESTMODE=1

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request. It will always have the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
REFERENCENUMBER A unique Reference Number generated by Payza for the transaction.
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes
NOTE: No value will be provided if the response is returned with an error code or if Test Mode is ON.
Alphanumeric
Ex: REFERENCENUMBER=17EF4-FDCF1-61583
TESTMODE Value indicating whether your business profile associated with the payment is on test mode or not. Will be one of the following value:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=1

A successful query will contain a RETURNCODE of 100, a DESCRIPTION of the return code, and the TESTMODE state. The REFERENCENUMBER value will only be returned if the Test Mode is OFF.

Successful response for a real transaction example

  RETURNCODE=100&REFERENCENUMBER=17EF4-FDCF1-61583&DESCRIPTION=Transaction%20was%20completed%20successfully&TESTMODE=0

Successful response for a TEST transaction example (notice that no REFERENCENUMBER value was returned)

  RETURNCODE=100&REFERENCENUMBER=&DESCRIPTION=Transaction%20was%20completed%20successfully&TESTMODE=1


An unsuccessful transaction will contain a value above 200 in the RETURNCODE and the REFERENCENUMBER will be empty.

  RETURNCODE=221&REFERENCENUMBER=&DESCRIPTION=Invalid%20USER%20or%20PASSWORD&TESTMODE=0

protected void SendMoneyClient(string myUserName,
                               string apiPassword, 
                               decimal decAmountPaid, 
                               string strCurrency,
                               string strReceiverEmail,
                               string strSenderEmail, 
                               int intPurchaseType,
                               string strNote,
                               string strTestMode)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/sendmoney"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
    // build the post string
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&AMOUNT={2}&CURRENCY={3}&RECEIVEREMAIL={4}&SENDEREMAIL={5}&PURCHASETYPE={6}&NOTE={7}&TESTMODE={8}",
                              HttpUtility.UrlEncode(myUserName), HttpUtility.UrlEncode(apiPassword),
                              HttpUtility.UrlEncode(decAmountPaid.ToString()), HttpUtility.UrlEncode(strCurrency),
                             HttpUtility.UrlEncode(strReceiverEmail), HttpUtility.UrlEncode(strSenderEmail),
                               HttpUtility.UrlEncode(intPurchaseType.ToString()), HttpUtility.UrlEncode(strNote),
                             HttpUtility.UrlEncode(strTestMode));
    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function SendMoneyClient($myUserName, // Your Payza user name which is your email address
                         $apiPassword, // Your API password
                         $amountPaid, // The payment amount
                         $currency, // The 3 letter ISO-4217 currency code
                         $receiverEmail, // Recipient's email address
                         $senderEmail, // Your secondary email address
                         $purchaseType, // A valid purchase type code
                         $note, // Note that you would like to send to the recipient
                         $testMode) // Test mode status
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/sendmoney'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&AMOUNT=%s&CURRENCY=%s&RECEIVEREMAIL=%s&SENDEREMAIL=%s&PURCHASETYPE=%s&NOTE=%s&TESTMODE=%s",
                      urlencode((string)$myUserName),
                      urlencode((string)$apiPassword),
                      urlencode((string)$amountPaid),
                      urlencode((string)$currency),
                      urlencode((string)$receiverEmail),
                      urlencode((string)$senderEmail),
                      urlencode((string)$purchaseType),
                      urlencode((string)$note),
                      urlencode((string)$testMode));

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
Suggest Edits

Bitcoin SendMoney (To External BTC Wallet)

 

The Payza Bitcoin SendMoney API is a simple interface that allows you to send Bitcoin to external Bitcoin wallets instantly without logging in to your Payza account. You can pass your payment details directly to our API and the transaction will be processed automatically.

The Bitcoin SendMoney API tool is ideal if you would like to integrate a payout system within your web application.

Using the Bitcoin SendMoney API

You can securely post your request as a NVP string to Payza’s server by HTTPS. Payza will send a response whether the transaction was successful or not, and will also send a return code and description.

All requests to the Bitcoin SendMoney API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/sendmoney

USING THE BITCOIN SENDMONEY API TO SEND FUNDS WITH PAYZA

To send bitcoin to external Bitcoin wallets using Payza’s Bitcoin SendMoney API, follow these three steps:

1) Set up APIs for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response that is returned from Payza.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password you created in the API setup section of your Payza account. Alphanumeric
Ex: R5rF7RRRtZyyrfYu
AMOUNT Required The amount you are sending.
Format: 0.00
Min Amount: 1.00 in any currency.
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: AMOUNT=10.25
CURRENCY Required The currency of the payment.
The permitted values must be a 3-letter ISO-4217 Code (see Currency Code Table).
Alphanumeric
Ex: CURRENCY=AUD
RECEIVERBITCOINADDRESS Required The payment recipient's external bitcoin address. Alphanumeric
Ex: RECEIVERBITCOINADDRESS=1FMKwMGZemt4aEFqbGnKoMTrQLwTgscd53
SENDEREMAIL Optional A secondary email address. The payment recipient will see this email address as the sender.
This must not be confused with the email used for USER.
Max Length: 64 characters for the Local part (before the @), 255 characters for the Domain part (after the @).
Alphanumeric
Ex: SENDEREMAIL=sender@example.com
PURCHASETYPE Required Indicate what type of transaction the payment is for.
Must be one of the following integer number 0, 1, 2 or 3:
0 = Service
1 = Goods
2 = Auction-Goods
3 = Others
Length: 1 digit
Numeric
Ex: PURCHASETYPE=1
NOTE Optional A note that you can add to this transaction.
Max length: 1000 characters
Alphanumeric
Ex: NOTE=Payment for a service provided
TESTMODE Optional Value indicating whether your business profile associated with the payment is on Test Mode or not.
Must be one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=1

As an example, you may use a simple HTML form to post your request to the SendMoney API. DO NOT use this script in a live environment because values, such as your password, are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/sendmoney">
	<input type="hidden" name="USER" value="name@example.com" />
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu" />
	<input type="hidden" name="AMOUNT" value="10.25" />
	<input type="hidden" name="CURRENCY" value="AUD" />
	<input type="hidden" name="RECEIVERBITCOINADDRESS" value="1FMKwMGZemt4aEFqbGnKoMTrQLwTgscd53" />
	<input type="hidden" name="SENDEREMAIL" value="sender@example.com" />
	<input type="hidden" name="PURCHASETYPE" value="1" />
	<input type="hidden" name="NOTE" value="Payment for service provided" />
	<input type="hidden" name="TESTMODE" value="1" />
</form>

This is an example request for the SendMoney API before it is URL-encoded:

  USER=name@example.com&PASSWORD=R5rF7RRRtZyyrfYu&AMOUNT=10.25&CURRENCY=AUD&RECEIVERBITCOINADDRESS=1FMKwMGZemt4aEFqbGnKoMTrQLwTgscd53&SENDEREMAIL=sender@example.com&PURCHASETYPE=1&NOTE= Payment for service provided.&TESTMODE=1

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request. It will always have the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
REFERENCENUMBER A unique Reference Number generated by Payza for the transaction.
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes
NOTE: No value will be provided if the response is returned with an error code or if Test Mode is ON.
Alphanumeric
Ex: REFERENCENUMBER=17EF4-FDCF1-61583
TESTMODE Value indicating whether your business profile associated with the payment is on test mode or not. Will be one of the following value:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=1

A successful query will contain a RETURNCODE of 100, a DESCRIPTION of the return code, and the TESTMODE state. The REFERENCENUMBER value will only be returned if the Test Mode is OFF.

Successful response for a real transaction example

  RETURNCODE=100&REFERENCENUMBER=17EF4-FDCF1-61583&DESCRIPTION=Transaction%20was%20completed%20successfully&TESTMODE=0

Successful response for a TEST transaction example (notice that no REFERENCENUMBER value was returned)

  RETURNCODE=100&REFERENCENUMBER=&DESCRIPTION=Transaction%20was%20completed%20successfully&TESTMODE=1


An unsuccessful transaction will contain a value above 200 in the RETURNCODE and the REFERENCENUMBER will be empty.

  RETURNCODE=221&REFERENCENUMBER=&DESCRIPTION=Invalid%20USER%20or%20PASSWORD&TESTMODE=0

protected void SendMoneyClient(string myUserName,
                               string apiPassword, 
                               decimal decAmountPaid, 
                               string strCurrency,
                               string strReceiverBitcoinAddress,
                               string strSenderEmail, 
                               int intPurchaseType,
                               string strNote,
                               string strTestMode)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/sendmoney"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
    // build the post string
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&AMOUNT={2}&CURRENCY={3}&RECEIVERBITCOINADDRESS={4}&SENDEREMAIL={5}&PURCHASETYPE={6}&NOTE={7}&TESTMODE={8}",
                              HttpUtility.UrlEncode(myUserName), HttpUtility.UrlEncode(apiPassword),
                              HttpUtility.UrlEncode(decAmountPaid.ToString()), HttpUtility.UrlEncode(strCurrency),
                             HttpUtility.UrlEncode(strReceiverEmail), HttpUtility.UrlEncode(strSenderEmail),
                               HttpUtility.UrlEncode(intPurchaseType.ToString()), HttpUtility.UrlEncode(strNote),
                             HttpUtility.UrlEncode(strTestMode));
    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function SendMoneyClient($myUserName, // Your Payza user name which is your email address
                         $apiPassword, // Your API password
                         $amountPaid, // The payment amount
                         $currency, // The 3 letter ISO-4217 currency code
                         $receiverBitcoinAddress, // Recipient's email address
                         $senderEmail, // Your secondary email address
                         $purchaseType, // A valid purchase type code
                         $note, // Note that you would like to send to the recipient
                         $testMode) // Test mode status
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/sendmoney'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&AMOUNT=%s&CURRENCY=%s&RECEIVERBITCOINADDRESS=%s&SENDEREMAIL=%s&PURCHASETYPE=%s&NOTE=%s&TESTMODE=%s",
                      urlencode((string)$myUserName),
                      urlencode((string)$apiPassword),
                      urlencode((string)$amountPaid),
                      urlencode((string)$currency),
                      urlencode((string)$receiverBitcoinAddress),
                      urlencode((string)$senderEmail),
                      urlencode((string)$purchaseType),
                      urlencode((string)$note),
                      urlencode((string)$testMode));

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
 

The MassPay API allows you to send a batch of payments without having to create and upload a CSV file to your Payza account. It helps those who want to further automate their payout system. The MassPay API also sends out an IPN message for each transaction in the payment batch.

Using the MassPay API

You can securely post your request as a Name-Value pair string to Payza’s server by HTTPS. Payza will send a response, whether the transaction was successful or not, with a return code and a description.

All requests to the MassPay API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/executemasspay

USING THE MASSPAY API TO INITIATE A PAYZA MASS PAY TRANSACTION

To process a transaction using Payza’s MassPay API, follow these steps:

1) Set up the API for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response that is returned from Payza.
4) (Optional) Handle the IPN message that is returned for each transaction in the batch.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password you created in the API setup section of your Payza account. Alphanumeric
Ex: R5rF7RRRtZyyrfYu
CURRENCY Required The currency of the payment.
The permitted values must be a 3-letter ISO-4217 Code (see Currency Code Table).
Alphanumeric
Ex: CURRENCY=USD
SENDEREMAIL Optional A secondary email address. The payment recipient will see this email address as the sender.
This must not be confused with the email used for USER.
Max Length: 64 characters for the Local part (before the @), 255 characters for the Domain part (after the @).
Alphanumeric
Ex: SENDEREMAIL=sender@example.com
TESTMODE Optional Value indicating whether your business profile associated with the payment is on Test Mode or not.
Must be one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=0
RECEIVEREMAIL_n Required The payment recipient's email address.
Max Length: 64 characters for the Local part (before the "@" symbol). 255 characters for the Domain part (after the "@" symbol)
Alphanumeric
Ex: RECEIVEREMAIL_1=receiver1@example.com
AMOUNT_n Required The amount you are sending.
Format: 0.00
Min Amount: 1.00 in any currency.
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: AMOUNT_1=7.25
NOTE_n Optional A note that you can add to this transaction.
Max length: 1000 characters
Alphanumeric
Ex: NOTE_1=Payment for a service provided
MPCUSTOM_n Optional Custom value you can pass along with the MassPay payment. Contrary to the NOTE_n, the value is not displayed to the payer or the recipient when viewing the transaction in their Payza account. Payza simply returns these fields back in the IPN Alphanumeric
Ex: MPCUSTOM_1=Sample custom value

The n at the end of some field names represents a sequential number associated with the recipient, starting at 1. The first recipient must be defined as a variable ending with _1 and must be present before adding any other numbers. Skipping a number will result in our API ignoring subsequent payments. For example, if you skip from receiver 1 to receiver 3, only the payment to receiver 1 will be processed.

As an example, you may use a simple HTML form to post your request to the MassPay API. DO NOT use this script in a live environment because values, such as your password, are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/executemasspay" >
	<input type="hidden" name="USER" value="name@example.com"/>
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu"/>
	<input type="hidden" name="CURRENCY" value="USD"/>
	<input type="hidden" name="SENDEREMAIL" value="sender@example.com" />
	<input type="hidden" name="TESTMODE" value="0"/>

	<input type="hidden" name="RECEIVEREMAIL_1" value="recipient1@example.com" />
	<input type="hidden" name="AMOUNT_1" value="7.25" />
	<input type="hidden" name="NOTE_1" value="Lorem ipsum" />
	<input type="hidden" name="MPCUSTOM_1" value="Sample custom 1" />

	<input type="hidden" name="RECEIVEREMAIL_2" value="receiver2@example.com" />
	<input type="hidden" name="AMOUNT_2" value="10.00" />	
	<input type="hidden" name="NOTE_2" value="Lorem ipsum" />
	<input type="hidden" name="MPCUSTOM_2" value="Sample custom 2" />

	<input type="hidden" name="RECEIVEREMAIL_3" value="recipient3@example.com" />
	<input type="hidden" name="AMOUNT_3" value="1.00" />
	<input type="hidden" name="NOTE_3" value="Lorem ipsum" />
	<input type="hidden" name="MPCUSTOM_3" value="Sample custom 3" />
</form>

This is an example request for the MassPay API before it is URL-encoded:

  USER=name@example.com&PASSWORD=R5rF7RRRtZyyrfYu&CURRENCY=USD&SENDEREMAIL=sender@example.com&TESTMODE=0&RECEIVEREMAIL_1=recipient1@example.com&AMOUNT_1=7.25&NOTE_1=Lorem Ipsum&MPCUSTOM_1=Sample custom 1.&RECEIVEREMAIL_2=receiver2@example.com&AMOUNT_2=10.00&NOTE_2=Lorem Ipsum&MPCUSTOM_2=Sample custom 2.&RECEIVEREMAIL_3=recipient3@example.com&AMOUNT_3=1.00&NOTE_3=Lorem Ipsum&MPCUSTOM_3=Sample custom 3.

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request. It will always have the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
REFERENCENUMBER A unique Reference Number generated by Payza for the transaction.
Format: B-xxxxx-xxxxx-xxxxx
Length: 19 characters including the dashes
NOTE: No value will be provided if the response is returned with an error code.
Alphanumeric
Ex: REFERENCENUMBER=B-4A7B8-02FB3-7F4F6
TESTMODE Value indicating whether your business profile associated with the payment is on test mode or not. Will be one of the following value:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=1

A successful query will contain a RETURNCODE of 100, the associated DESCRIPTION, a REFERENCENUMBER and the TESTMODE status.

Successful response for a real transaction example

  RETURNCODE=100&REFERENCENUMBER=B-4A7B8-02FB3-7F4F6&DESCRIPTION= Transaction%20was%20completed%20successfully&TESTMODE=0

Successful response for a TEST transaction example (notice that a REFERENCENUMBER value was returned)

  RETURNCODE=100&REFERENCENUMBER=B-4A7B8-02FB3-7F4F6&DESCRIPTION= Transaction%20was%20completed%20successfully&TESTMODE=1


An unsuccessful transaction will contain a value above 200 in the RETURNCODE and the REFERENCENUMBER will be empty.

  RETURNCODE=221&REFERENCENUMBER=&DESCRIPTION=Invalid%20USER%20or%20PASSWORD&TESTMODE=0

protected void MassPayClient(string myUserName,
                             string apiPassword, 
                             string[,] arrPayments, 
                             string strCurrency, 
                             string strSenderEmail, 
                             string strTestMode)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/executemasspay"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&CURRENCY={2}&SENDEREMAIL={3}&TESTMODE={4}",
                              HttpUtility.UrlEncode(myUserName), HttpUtility.UrlEncode(apiPassword),
                              HttpUtility.UrlEncode(strCurrency), HttpUtility.UrlEncode(strSenderEmail),
                              HttpUtility.UrlEncode(strTestMode));

    int iteration = arrPayments.GetLength(0);
    for (int i = 0; i < iteration; i++)
    {
        sbDataToSend.AppendFormat("&RECEIVEREMAIL_{0}={1}&AMOUNT_{0}={2}&NOTE_{0}={3}&MPCUSTOM_{0}={4}", i+1, arrPayments[i,0], arrPayments[i,1],
                    arrPayments[i,2], arrPayments[i,3]);
    }

    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function MassPayClient($myUserName, // Your Payza user name which is your email address
                       $apiPassword, // Your API password
                       $payments, // Array containing the payments to be made
                       $currency, // The 3 letter ISO-4217 currency code
                       $senderEmail, // Your secondary email
                       $testMode) // Test mode status
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/executemasspay'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&CURRENCY=%s&SENDEREMAIL=%s&TESTMODE=%s",
                      urlencode((string)$myUserName),
                      urlencode((string)$apiPassword),
                      urlencode((string)$currency),
                      urlencode((string)$senderEmail),
                      urlencode((string)$testMode));
  
	//check if the received variable is an array
	if (!is_array($payments)) 
	{ 
		die ("Argument is not an array!"); 
	}
	else
	{
		$iteration = count($payments);
		$payees='';
    	
		// create another array with proper parameter names
		$p = 0; // variable used for the subscript of the payment number
		for ($x = 0; $x < $iteration; $x++)
		{
			$p++;
			$payees .= "&RECEIVEREMAIL_$p=".urlencode($payments[$x]["receiver"])."&AMOUNT_$p=".urlencode($payments[$x]["amount"])."&NOTE_$p=".urlencode($payments[$x]["note"])."&MPCUSTOM_$p=".urlencode($payments[$x]["mpCustom"]);
		}
	}
	dataToSend .= $payees;

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>

The Refund API is a simple interface that allows you to send refunds instantly without logging in to your Payza account. You can pass the refund details directly to our API and the transaction will be processed automatically.

Using the Refund API

You can securely post your request as a Name-Value pair string to Payza’s server by HTTPS. Payza will send a response whether the transaction was successful or not, and will also send a return code and a description.

All requests to the Refund API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/RefundTransaction

USING THE REFUND API TO PROCESS A PAYZA REFUND

To process a refund using Payza’s Refund API, follow these three steps.

1) Set up the API for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response that is returned from Payza.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password you created in the API setup section of your Payza account. Alphanumeric
Ex: R5rF7RRRtZyyrfYu
TRANSACTIONREFERENCE Required The Reference Number of the transaction that you would like to refund.
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes.
Alphanumeric
Ex: TRANSACTIONREFERENCE=ADB5D-AV260-F5BE9
TESTMODE Optional Value indicating whether your business profile associated with the payment is on Test Mode or not.
Must be one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=0

As an example, you may use a simple HTML form to post your request to the Redund API. DO NOT use this script in a live environment because values, such as your password, are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/RefundTransaction">
	<input type="hidden" name="USER" value="name@example.com"/>
 	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu"/>
	<input type="hidden" name="TRANSACTIONREFERENCE" value="ADB5D-AV260-F5BE9"/>
	<input type="hidden" name="TESTMODE" value="0" />
</form>

This is an example request for the Refund API before it is URL-encoded:

  USER=name@example.com&PASSWORD=R5rF7RRRtZyyrfYu& TRANSACTIONREFERENCE=ADB5D-AV260-F5BE9&TESTMODE= 0

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request, and will always contain the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
REFERENCENUMBER A unique Reference Number generated by Payza for the transaction.
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes
NOTE: No value will be provided if the response is returned with an error code.
Alphanumeric
Ex: REFERENCENUMBER=ADB5D-AV260-F5BE9
TESTMODE Value indicating whether your business profile associated with the payment is on test mode or not. Will be one of the following value:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=1

A successful query will contain a RETURNCODE of 100, a DESCRIPTION of the return code, a REFERENCENUMBER, and the TESTMODE state.

Successful response for a real transaction example

  RETURNCODE=100&REFERENCENUMBER=17EF4-FDCF1-61583&DESCRIPTION= Transaction%20was%20completed%20successfully&TESTMODE=0

Successful response for a TEST transaction example (notice that a REFERENCENUMBER value was returned)

  RETURNCODE=100&REFERENCENUMBER=17EF4-FDCF1-61583&DESCRIPTION= Transaction%20was%20completed%20successfully&TESTMODE=1


An unsuccessful transaction will contain a value above 200 in the RETURNCODE and the REFERENCENUMBER will always be empty.

  RETURNCODE=221&REFERENCENUMBER=&DESCRIPTION=Invalid%20USER%20or%20PASSWORD&TESTMODE=0

protected void RefundClient(string myUserName, string apiPassword, string strTransRefNum, string strTestMode)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/RefundTransaction"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&TRANSACTIONREFERENCE={2}&TESTMODE={3}",
                              HttpUtility.UrlEncode(myUserName),
                              HttpUtility.UrlEncode(apiPassword),
                              HttpUtility.UrlEncode(strTransRefNum),
                              HttpUtility.UrlEncode(strTestMode));
    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function RefundClient($myUserName, $apiPassword, $transRefNum, $testMode)
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/RefundTransaction'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&TRANSACTIONREFERENCE=%s&TESTMODE=%s",
                      urlencode((string) $myUserName), // Your Payza user name which is your email address
                      urlencode((string) $apiPassword), // Your API password
                      urlencode((string) $transRefNum), // The reference number of the transaction to be refunded
                      urlencode((string) $testMode)); // Test mode status

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
Suggest Edits

SubscriptionCancellation

 

The SubscriptionCancellation API allows you to cancel any of your sold subscriptions without logging in to your Payza account. You can cancel a subscription by sending a request to our API and it will be processed automatically.

This feature can be used to give your customers a way to cancel their subscriptions through your website.

Using the SubscriptionCancellation API

You can securely post your request as a Name-Value pair string to Payza’s server by HTTPS. Payza will send a response whether the transaction was successful or not, and will also send a return code and a description.

All requests to the SubscriptionCancellation API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/CancelSubscription

USING THE SUBSCRIPTIONCANCELLATION API TO CANCEL A PAYZA SUBSCRIPTION

To cancel a subscription using Payza's SubscriptionCancellation API, follow these three steps.

1) Set up the API for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response that is returned from Payza.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password you created in the API setup section of your Payza account. Alphanumeric
Ex: R5rF7RRRtZyyrfYu
SUBSCRIPTIONREFERENCE Required The Reference Number of the subscription that you would like to cancel.
Format: S-xxxxx-xxxxx-xxxxx
Length: 19 characters including the dashes.
Alphanumeric
Ex: SUBSCRIPTIONREFERENCE=S-ADB5D-AV260-F5BE9
NOTE Optiona A message you want to add to this transaction.
Max length: 1000 characters.
Alphanumeric
Ex: NOTE=Canceling a service
TESTMODE Optional Value indicating whether your business profile associated with the payment is on Test Mode or not.
Must be one of the following values:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=1

As an example, you may use a simple HTML form to post your request to the SubscriptionCancellation API. DO NOT use this script in a live environment because values, such as your password, are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow the system user access.

<form method="post" action="https://api.payza.com/svc/api.svc/CancelSubscription">
	<input type="hidden" name="USER" value="name@example.com" />
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu" />
	<input type="hidden" name="SUBSCRIPTIONREFERENCE" value="S-ADB5D-AV260-F5BE9" />
	<input type="hidden" name="NOTE" value="Lorem Ipsum" />
	<input type="hidden" name="TESTMODE" value="1" />
</form>

The text below represents how the request looks like before being URL-encoded:

  USER=name@example.com&PASSWORD= R5rF7RRRtZyyrfYu &SUBSCRIPTIONREFERENCE=S-ADB5D-AV260-F5BE9&NOTE=Lorem Ipsum.&TESTMODE=1

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request. It will always have the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
REFERENCENUMBER A unique Reference Number generated by Payza for the transaction.
Format: S-xxxxx-xxxxx-xxxxx
Length: 19 characters including the dashes
NOTE: No value will be provided if the response is returned with an error code.
Alphanumeric
Ex: REFERENCENUMBER=S-ADB5D-AV260-F5BE9
TESTMODE Value indicating whether your business profile associated with the payment is on test mode or not. Will be one of the following value:
0 – Test Mode is OFF
1 – Test Mode is ON
Length: 1 digit
Boolean
Ex: TESTMODE=1

A successful query will contain a RETURNCODE of 100, the associated DESCRIPTION, a REFERENCENUMBER, and the TESTMODE state.

Successful response for a real transaction example

  RETURNCODE=100&REFERENCENUMBER=S-ADB5D-AV260-F5BE9&DESCRIPTION= Transaction%20was%20completed%20successfully&TESTMODE=0

Successful response for a TEST transaction example (notice that a REFERENCENUMBER value was returned)

  RETURNCODE=100&REFERENCENUMBER=S-ADB5D-AV260-F5BE9&DESCRIPTION= Transaction%20was%20completed%20successfully&TESTMODE=1


An unsuccessful transaction will contain a value above 200 in the RETURNCODE and the REFERENCENUMBER will be empty.

  RETURNCODE=221&REFERENCENUMBER=&DESCRIPTION=Invalid%20USER%20or%20PASSWORD&TESTMODE=0

protected void SubscriptionCancelClient(string myUserName, string apiPassword, string strSubRefNum, string strNote, string strTestMode)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/CancelSubscription"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&SUBSCRIPTIONREFERENCE={2}&NOTE={3}&TESTMODE={4}",
                              HttpUtility.UrlEncode(myUserName),
                              HttpUtility.UrlEncode(apiPassword),
                              HttpUtility.UrlEncode(strSubRefNum),
                              HttpUtility.UrlEncode(strNote),
                              HttpUtility.UrlEncode(strTestMode));
    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function SubscriptionCancelClient($myUserName, $apiPassword, $subRefNum, $note, $testMode)
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/CancelSubscription'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&SUBSCRIPTIONREFERENCE=%s&NOTE=%s&TESTMODE=%s",
                      urlencode((string) $myUserName), // Your Payza user name which is your email address
                      urlencode((string) $apiPassword), // Your API password
                      urlencode((string) $subRefNum), // The subscription reference number
                      urlencode((string) $note), // 
                      urlencode((string) $testMode)); // Test mode status

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
Suggest Edits

GetBalance

 

The GetBalance API interface allows you to easily query our system to receive your Payza account balance for each currency you hold, or the balance for a specific currency.

Using the GetBalance API

You can securely post your request as a Name-Value pair string to Payza’s server by HTTPS. Payza will send a response whether the query was successful or not, and will also send a return code and a description.

All requests to the GetBalance API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/GetBalance

USING THE GETBALANCE API TO GET YOUR PAYZA BALANCE DETAILS

To query our system for your Payza account balance using Payza’s GetBalance API, follow these three steps:

1) Set up the API for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response this is returned from Payza.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password that was generated in the API setup section of your Payza account.
Length: 16 characters
Alphanumeric
Ex: R5rF7RRRtZyyrfYu
CURRENCY Optional The currency of the balance that you wish to return.
NOTE: If this field is NOT present in the request or holds a NULL value, the API will return the balances for all opened currencies in the account.
The permitted values must be a 3-letter ISO-4217 Code (see Currency Code Table)
Alphanumeric
Ex: CURRENCY=USD

As an example, you may use a simple HTML form to post your request to the GetBalance API. Please DO NOT use this set up in a live environment because values, such as your password are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/GetBalance">
	<input type="hidden" name="USER" value="name@example.com"/>
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu"/>
	<input type="hidden" name="CURRENCY" value="USD"/>
</form>

This is an example request for the GetBalance API before it is URL-encoded:

  USER=primaryemail@example.com&PASSWORD=R5rF7RRRtZyyrfYu&CURRENCY=USD

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request. It will always have the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
AVAILABLEBALANCE_n The available balance for the associated currency code. Where n represents the number of the currency code associated with this balance.
The subscript n starts at 1.
Alphanumeric
Ex: AVAILABLEBALANCE_1=176.45
CURRENCY_n The currency code of the requested balance. Where n represents the number of the balance associated with this currency.
The subscript n starts at 1.
Alphanumeric
Ex: CURRENCY_1=USD

A successful query will contain a RETURNCODE of 100, its DESCRIPTION, and will include a list of the requested balances. The variables AVAILABLEBALANCE_n and CURRENCY_n will also be returned where "n" is the number of results returned.

  RETURNCODE=100&DESCRIPTION=Transaction%20was%20completed%20successfully&AVAILABLEBALANCE_1=100.00&CURRENCY_1=CAD&AVAILABLEBALANCE_2=50.00&CURRENCY_2=AUD&AVAILABLEBALANCE_3=0.00&CURRENCY_3=USD

An unsuccessful transaction will contain a value above 200 in the RETURNCODE and its DESCRIPTION will contain details regarding the issue. The variables AVAILABLEBALANCE_n and CURRENCY_n will NOT be returned.

  RETURNCODE=221&DESCRIPTION=Invalid%20USER%20or%20PASSWORD

protected void GetBalanceClient(string myUserName, string apiPassword, string strCurrency)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/GetBalance"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&CURRENCY={2}", HttpUtility.UrlEncode(myUserName), HttpUtility.UrlEncode(apiPassword), HttpUtility.UrlEncode(strCurrency));
    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function GetBalanceAPIClient($myUserName, $apiPassword, $currency)
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/GetBalance'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&CURRENCY=%s",
                      urlencode((string) $myUserName), // Your Payza user name which is your email address
                      urlencode((string) $apiPassword), // Your API password
                      urlencode((string) $currency)); // Currencies to request balance

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
Suggest Edits

GetTransactionInfo

 

The GetTransactionInfo API is the fastest way for you to obtain information related to a specific transaction.

Using the GetTransactionInfo API

You can securely post your request as a Name-Value pair string to Payza’s server by HTTPS. Payza will send a response whether the transaction was successful or not, and will also send a return code and a description.

All requests to the GetTransactionInfo API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/gettransactioninfo

USING THE GETTRANSACTIONINFO API TO GET PAYZA TRANSACTION INFORMATION

To get information related to a Payza transaction using Payza’s GetTransactionInfo API, follow these three steps:

1) Set up the API for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response this is returned from Payza.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password that was generated in the API setup section of your Payza account.
Length: 16 characters
Alphanumeric
Ex: PASSWORD=R5rF7RRRtZyyrfYu
TRANSACTIONREFERENCE Required The transaction reference number
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes.
Alphanumeric
Ex: TRANSACTIONREFERENCE=AEACC-DC3E4-A4A0F

As an example, you may use a simple HTML form to post your request to the GetTransactionInfo API. DO NOT use this set up in a live environment because values, such as your password are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/gettransactioninfo" >
	<input type="hidden" name="USER" value="name@example.com"/>
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu"/>
	<input type="hidden" name="TRANSACTIONREFERENCE" value="AEACC-DC3E4-A4A0F"/>
</form>

This is an example request for the GetTransactionInfo API before it is URL-encoded:

  USER=primaryemail@example.com&PASSWORD=R5rF7RRRtZyyrfYu&TRANSACTIONREFERENCE=AEACC-DC3E4-A4A0F

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request. It will always have the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
REFERENCENUMBER_0 The reference number of the transaction.
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes.
Alphanumeric
Ex: REFERENCENUMBER_0=17EF4-FDCF1-61583
EMAIL_0 The email contained in the transaction.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: EMAIL_0=name@example.com
CURRENCY_0 The currency of the transaction. Alphanumeric
Ex: CURRENCY_0=CAD
TRANSACTIONTYPE_0 The type of the transaction.
Format: integer number (see Transaction Type Table)
Alphanumeric
Ex: TRANSACTIONTYPE_0=Payment Received From
TRANSACTIONSTATE_0 The state of the transaction.
Format: integer number (see Transaction State Table).
Alphanumeric
Ex: TRANSACTIONSTATE_0=Completed
NOTE_0 The note of the transaction.
Max length: 1000 characters.
Alphanumeric
Ex: NOTE_0=Payment for a service provided
DATE_0 The date of the transaction.
Format: YYYY/MM/DD
Date
Ex: DATE_0=2016/04/09
TIME_0 The time of the transaction.
Format: HH:MM:SS
Time
Ex: TIME_0=02:53:13
GROSSAMOUNT_0 The gross amount of the transaction.
Format: 0.00
Min Amount: 1.00 in any currency.
Numeric
Ex: GROSSAMOUNT_0=10.25
FEESAMOUNT_0 The fees amount of the transaction.
Format: 0.00
Numeric
Ex: FEESAMOUNT_0=0.00
NETAMOUNT_0 The net amount of the transaction.
Format: 0.00
Min Amount: 1.00 in any currency.
Numeric
Ex: NETAMOUNT_0=10.25
SUBSCRIPTIONNUMBER_0 The subscription number of the transaction (if the transaction is a subscription, otherwise it returns null).
Format: S-xxxxx-xxxxx-xxxxx
Length: 19 characters including the dashes.
Alphanumeric
Ex: SUBSCRIPTIONREFERENCE_0=S-ADB5D-AV260-F5BE9

A successful query will contain a RETURNCODE of 100.

  RETURNCODE=100&DESCRIPTION=Transaction%20was%20completed%20successfully&REFERENCENUMBER_0=CA9F2-1FCEB-A79D8&EMAIL_0=name%40example.com&CURRENCY_0=CAD&TRANSACTIONTYPE_0=Subscription%20Payment%20From&TRANSACTIONSTATE_0=Completed&NOTE_0=Lorem%20ipsum%20dolor%20sit%20amet.%20Proin%20eleifend%20congue%20congue.&DATE_0=2013/10/05&TIME_0=01:34:05&GROSSAMOUNT_0=61.17&FEESAMOUNT_0=4.97&NETAMOUNT_0=56.20&SUBSCRIPTIONNUMBER_0=S-2FBB1-8B3ED-39939

An unsuccessful transaction will contain a value above 200 in the RETURNCODE and its DESCRIPTION will contain details regarding the issue.

  RETURNCODE=270&DESCRIPTION=Unsuccessful%20query.%20No%20transaction%20was%20specified

protected void GetTransactionInfoClient(string myUserName, string apiPassword, string strTransactionReference)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/GetTransactionInfo"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&TRANSACTIONREFERENCE={2}",
                              HttpUtility.UrlEncode(myUserName),
                              HttpUtility.UrlEncode(apiPassword),
                              HttpUtility.UrlEncode(strTransactionReference));
    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function GetTransactionInfoClient($myUserName, $apiPassword, $transactionReference)
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/GetTransactionInfo'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&TRANSACTIONREFERENCE=%s",
                      urlencode((string)$myUserName), // Your Payza user name which is your email address
                      urlencode((string)$apiPassword), // Your API password
                      urlencode((string)$transactionReference)); // The transaction reference number

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
Suggest Edits

TransactionHistory

 

The TransactionHistory API can be used to retrieve your transaction history via your web application.

Using the TransactionHistory API

You can securely post your request as a Name-Value pair string to Payza’s server by HTTPS. Payza will send a response whether the query was successful or not, and will also send a return code and a description.

All requests to the TransactionHistory API must be sent to the following URL:

  https://api.payza.com/svc/api.svc/transactionhistory

USING THE TRANSACTIONHISTORY API TO GET YOUR PAYZA TRANSACTION HISTORY INFORMATION

To get information related to your transaction history using Payza’s TransactionHistory API, follow these three steps:

1) Set up the API for your account.
2) Create a request by posting the proper variables to Payza’s server.
3) Handle the descriptive response this is returned from Payza.

Request Parameters

Fields Requirement Description Type / Format
USER Required Primary email address associated with your Payza account.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: USER=name@example.com
PASSWORD Required The API password that was generated in the API setup section of your Payza account.
Length: 16 characters
Alphanumeric
Ex: PASSWORD=R5rF7RRRtZyyrfYu
STARTDATE Required The start date of the search time period.
Format: YYYY/MM/DD
Date
Ex: STARTDATE=2011/04/11
ENDDATE Optional The end date of the search time period.
Format: YYYY/MM/DD
Date
Ex: ENDDATE=2016/11/21
EMAIL Optional The email address contained in the transaction.
Max Length: 64 characters for the Local part (before the @), 255 characters for the Domain part (after the @).
Alphanumeric
Ex: EMAIL=someone@example.com
TRANSACTIONREFERENCE Optional The transaction reference number
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes.
Alphanumeric
Ex: TRANSACTIONREFERENCE=AEACC-DC3E4-A4A0F
AMOUNT Optional The price or cost of the transaction.
Format: 0.00
Min Amount: 1.00 in any currency.
NOTE: The value for amount must be positive. Null or negative numbers are not allowed.
Numeric
Ex: AMOUNT=88.88
CURRENCY Optional The currency of the transaction.
The permitted values must be a 3-letter ISO-4217 Code (see Currency Code Table).
Alphanumeric
Ex: ap_currency=USD
TRANSACTIONTYPE Optional The type of the transaction.
Format: integer number
(see Transaction Type Table)
Integer
Ex: TRANSACTIONTYPE=2
TRANSACTIONSTATE Optional The state of the transaction.
Format: integer number
(see Transaction State Table)
Integer
Ex: TRANSACTIONSTATE=2

As an example, you may use a simple HTML form to post your request to the TransactionHistory API. DO NOT use this set up in a live environment because values, such as your password are not protected. You would usually store these sensitive values in one of your web application files. Make sure that the file permissions are set to only allow access to the system user.

<form method="post" action="https://api.payza.com/svc/api.svc/transactionhistory" >
	<input type="hidden" name="USER" value="name@example.com" />
	<input type="hidden" name="PASSWORD" value="R5rF7RRRtZyyrfYu" />
	<input type="hidden" name="STARTDATE" value="2011/04/22"/>
	<input type="hidden" name="ENDDATE" value="2016/11/22"/>
	<input type="hidden" name="EMAIL" value="someone@example.com" />
	<input type="hidden" name="TRANSACTIONREFERENCE" value="AEACC-DC3E4-A4A0F"/>
	<input type="hidden" name="AMOUNT" value="88.88" />
	<input type="hidden" name="CURRENCY" value="USD" />
	<input type="hidden" name="TRANSACTIONTYPE" value="2" />
	<input type="hidden" name="TRANSACTIONSTATE" value="2" />
</form>

This is an example request for the TransactionHistory API before it is URL-encoded:

  USER=primaryemail@example.com&PASSWORD=R5rF7RRRtZyyrfYu&STARTDATE=2012/04/22&ENDDATE=2016/11/22&EMAIL=someone@example.com&TRANSACTIONREFERENCE=AEACC-DC3E4-A4A0F&AMOUNT=88.88&CURRENCY=USD&TRANSACTIONTYPE=2&TRANSACTIONSTATE=2

Response Format

The response from Payza’s servers is a URL-encoded name-value pair string, similar to the request. It will always have the fields listed in the following table.

Fields Description Type / Format
RETURNCODE Transaction code number. (see API Return Code Table for a list of success and error codes)
Length: 3 digits
Numeric
Ex: RETURNCODE=202
DESCRIPTION A descriptive message of the RETURNCODE. (see API Return Code Table for a complete description of all the codes) Alphanumeric
Ex: DESCRIPTION=Expected parameter PASSWORD
REFERENCENUMBER_n The reference number of the transaction.
Format: xxxxx-xxxxx-xxxxx
Length: 17 characters including the dashes.
Alphanumeric
Ex: REFERENCENUMBER_0=17EF4-FDCF1-61583
EMAIL_n The email contained in the transaction.
Max Length: 64 characters for the Local part (before the @) and 255 characters for the Domain part (after the @).
Alphanumeric
Ex: EMAIL_0=someone@example.com
CURRENCY_n The currency of the transaction. Alphanumeric
Ex: CURRENCY_0=CAD
TRANSACTIONTYPE_n The type of the transaction.
Format: integer number (see Transaction Type Table)
Alphanumeric
Ex: TRANSACTIONTYPE_0=Payment Received From
TRANSACTIONSTATE_n The state of the transaction.
Format: integer number (see Transaction State Table).
Alphanumeric
Ex: TRANSACTIONSTATE_0=Completed
NOTE_0 The note of the transaction.
Max length: 1000 characters.
Alphanumeric
Ex: NOTE_0=Payment for a service provided
DATE_n The date of the transaction.
Format: YYYY/MM/DD
Date
Ex: DATE_0=2016/04/09
TIME_n The time of the transaction.
Format: HH:MM:SS
Time
Ex: TIME_0=02:53:13
GROSSAMOUNT_n The gross amount of the transaction.
Format: 0.00
Min Amount: 1.00 in any currency.
Numeric
Ex: GROSSAMOUNT_0=10.25
FEESAMOUNT_n The fees amount of the transaction.
Format: 0.00
Numeric
Ex: FEESAMOUNT_0=0.00
NETAMOUNT_n The net amount of the transaction.
Format: 0.00
Min Amount: 1.00 in any currency.
Numeric
Ex: NETAMOUNT_0=10.25
SUBSCRIPTIONNUMBER_n The subscription number of the transaction (if the transaction is a subscription, otherwise it returns null).
Format: S-xxxxx-xxxxx-xxxxx
Length: 19 characters including the dashes.
Alphanumeric
Ex: SUBSCRIPTIONREFERENCE_0=S-ADB5D-AV260-F5BE9

The n at the end fields name represents a sequential number associated to the transaction, starting at 0.

A successful query will contain a RETURNCODE of 100.

  RETURNCODE=100&DESCRIPTION=Transaction%20was%20completed%20successfully&REFERENCENUMBER_0=CA9F2-1FCEB-A79D8&EMAIL_0=name%40example.com&CURRENCY_0=CAD&TRANSACTIONTYPE_0=Subscription%20Payment%20From&TRANSACTIONSTATE_0=Completed&NOTE_0=Lorem%20ipsum%20dolor%20sit%20amet.%20Proin%20eleifend%20congue%20congue.&DATE_0=2013/10/05&TIME_0=01:34:05&GROSSAMOUNT_0=61.17&FEESAMOUNT_0=4.97&NETAMOUNT_0=56.20&SUBSCRIPTIONNUMBER_0=S-2FBB1-8B3ED-39939&REFERENCENUMBER_1=1FCEB-DA9F2-A7A48&EMAIL_1=receiver3%40example.com&CURRENCY_1=USD&TRANSACTIONTYPE_1=Payment%20Received%20From&TRANSACTIONSTATE_1=On%20Hold&NOTE_1=Lorem%20ipsum%20dolor%20sit%20amet.%20Proin%20eleifend%20congue%20congue.&DATE_1=2015/12/17&TIME_1=10:46:05&GROSSAMOUNT_1=178.79&FEESAMOUNT_1=24.97&NETAMOUNT_1=256.20&SUBSCRIPTIONNUMBER_1=

An unsuccessful transaction will contain a value above 200 in the RETURNCODE and its DESCRIPTION will contain details regarding the issue.

  RETURNCODE=270&DESCRIPTION=Unsuccessful%20query.%20No%20transaction%20was%20specified

protected void TransactionHistoryClient(string myUserName, 
                                        string apiPassword, 
                                        string strStartDate, 
                                        string strEndDate, 
                                        string strEmail, 
                                        string strTransactionReference, 
                                        string strCurrency, 
                                        decimal decAmount, 
                                        int intTransactionType, 
                                        int intTransactionState)
{
    string dataToSend; // The data that will be sent to the API
    string Server = "https://api.payza.com"; // The server address of the API
    string Url = "/svc/api.svc/TransactionHistory"; // The exact URL of the API
  
    StringBuilder sbDataToSend = new StringBuilder();
  
    sbDataToSend.AppendFormat("USER={0}&PASSWORD={1}&STARTDATE={2}&ENDDATE={3}&EMAIL={4}&TRANSACTIONREFERENCE={5}&CURRENCY={6}&AMOUNT={7}&TRANSACTIONTYPE={8}&TRANSACTIONSTATE={9}",
                              HttpUtility.UrlEncode(myUserName), HttpUtility.UrlEncode(apiPassword),
                              HttpUtility.UrlEncode(strStartDate), HttpUtility.UrlEncode(strEndDate),
                              HttpUtility.UrlEncode(strEmail), HttpUtility.UrlEncode(strTransactionReference),
                              HttpUtility.UrlEncode(strCurrency), HttpUtility.UrlEncode(decAmount.ToString()),
                              HttpUtility.UrlEncode(intTransactionType.ToString()), HttpUtility.UrlEncode(intTransactionState.ToString()));
    dataToSend = sbDataToSend.ToString();

    StreamWriter myWriter = null;
    HttpWebRequest objRequest = null;

    // send the post
    objRequest = (HttpWebRequest)WebRequest.Create(Server+Url);
    objRequest.Method = "POST";
    objRequest.ContentLength = dataToSend.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    myWriter = new StreamWriter(objRequest.GetRequestStream());
    myWriter.Write(dataToSend);
    myWriter.Close();

    // read the response
    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    StreamReader sr = new StreamReader(objResponse.GetResponseStream());

    string response = sr.ReadLine();
    sr.Close();
  
    if(response != null){
        // decode the API response string
        response = HttpUtility.UrlDecode(response);
    }
    else{
        // something is wrong, no response is received from Payza
    }  
}
<?php

function TransactionHistoryClient($myUserName, // Your Payza user name which is your email address
                             $apiPassword, // Your API password
                             $startDate, // The start date, formated as year/month/day
                             $endDate, // The end date, formated as year/month/day
                             $email, // The email address contained in the transaction
                             $transactionReference, // The transaction reference number
                             $amount, // The amount of the transaction
                             $currency, // Currencies to request balance
                             $transactionType, // A valid transaction type
                             $transactionState) // A valid transaction state
{

	$responseArray; // The API's response variables
	$server = 'api.payza.com'; // The server address of the API
	$url = '/svc/api.svc/TransactionHistory'; // The exact URL of the API
	$dataToSend = ''; // The data that will be sent to the API

	dataToSend = sprintf("USER=%s&PASSWORD=%s&STARTDATE=%s&ENDDATE=%s&EMAIL=%s&TRANSACTIONREFERENCE=%s&AMOUNT=%s&CURRENCY=%s&TRANSACTIONTYPE=%s&TRANSACTIONSTATE=%s",
                      urlencode((string)$myUserName),
                      urlencode((string)$apiPassword),
                      urlencode((string)$startDate),
                      urlencode((string)$endDate),
                      urlencode((string)$email),
                      urlencode((string)$transactionReference),
                      urlencode((string)$amount),
                      urlencode((string)$currency),
                      urlencode((string)$transactionType),
                      urlencode((string)$transactionState));

	$response = '';

	$ch = curl_init();

	curl_setopt($ch, CURLOPT_URL, 'https://' . $server . $url);
	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $dataToSend);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_HEADER, false);
	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

	$response = curl_exec($ch);

	curl_close($ch);

	if($response)
	{
		// urldecode the response received from Payza into an associative array
		parse_str($response, $responseArray);
	}
	else
	{
		// something is wrong, no response is received from Payza
	}

}

?>
Suggest Edits

Alert URL

 

The Alert URL is where Payza posts your IPN data. Your IPN Handler must be installed at this URL in order to properly receive IPN data.

IPN data consists of information regarding completed transactions, such as the amount received for the purchase, your customer's shipping details, and much more. You can use this information for post-purchase automation. You can verify the security code that is sent with the data to authenticate the transaction.

For security reasons, we take specific measures to ensure that your Alert URL remains confidential. Your Alert URL should not be included in the HTML form created for your payment buttons. Your Alert URL should only be submitted in your Payza account and you should be kept confidential.

The Alert URL is directly connected to the email address associated with your Payza Business Account. When you receive a payment through a Payza checkout page, the IPN messages will be sent from our server to the Alert URL associated with your Payza account.

SETTING UP YOUR ALERT URL

To set up your Alert URL, follow these steps:

1) In your Payza account click "Business" on the left side menu, then select "IPN Integration".
2) Click "Set up your IPN now".
3) Enter your Transaction PIN and click "Access".
4) If you have multiple business profiles, click the "Edit" icon for the appropriate business profile.
5) Enter the following information:

  • For IPN Status, select "Enabled".
  • For Alert URL, enter the URL of the location of your IPN Handler.

6) Click "Update" to save these settings.

If you have a Business account and operate more than one business, you may want to receive IPN messages separately for each business. You can do so by creating separate business profiles for each business and assigning unique Alert URLs in your Payza account for each business profile.

To create additional Alert URLs, you must first create additional business profiles (sub-business account) in your Payza account.

CREATING ADDITIONAL BUSINESS PROFILES

1) In your Payza account click "Business" on the left side menu, then select "Business Information".
2) Click "Add".
3) Enter required information for the new business profile, including a new email address to associate with it and a new URL.
4) Click "Submit" to save the settings.

Now you can set unique Alert URLs for each business profile.

SETTING UP ADDITIONAL ALERT URLS

1) In your Payza account click "Business" on the left side menu, then select "IPN Integration".
2) Click "Set up your IPN now" in the center of the page.
3) Enter your Transaction PIN and click "Access".
4) Click the "Edit" icon for the appropriate business profile.
5) Enter the following information:

  • For IPN Status, select "Enabled".
  • For Alert URL, enter the URL of the location of your IPN Handler you would like to associate with this business profile.
  • For "Security Code", generate a security code if necessary and record it.
  • For "Test Mode", select "Enabled" if you would like to test your IPN or "Disabled" if you would like to receive actual data. Note that if "Test Mode" is set to "Enabled" no actual transactions will take place.

6) Click "Update" to save your settings.

YOUR ALERT URL MUST BE DIFFERENT THAN YOUR RETURN URL

The Alert URL can not be the same as the Return URL.

Your Alert URL is a confidential URL that will be used to receive and decode IPN data.

Your Return URL is the page your customers will be redirected to after they complete a purchase on your site through Payza.

Suggest Edits

Return URL

 

The Return URL is where Payza directs your customers after they have successfully completed a payment. It can be associated to a page that provides your customers with post-purchase information, or just a simple "Thank You for Your Purchase" message.

The Return URL must be different from the Alert URL. The Return URL will bring your customer to the specified link however the Alert URL should remain confidential and not be shown to your customers.

The main purpose of a Return URL is to redirect your customers back to your website once they have completed a payment through Payza’s checkout page. If a Return URL is not included in your payment button, your customers will stay on Payza’s payment confirmation page after their payment has been completed and they will not be redirected to another page.

YOUR RETURN URL MUST BE DIFFERENT FROM YOUR ALERT URL.

The Return URL cannot be the same as the Alert URL.

Suggest Edits

Cancel URL

 

The Cancel URL is where Payza directs your customers if they click the “Cancel” button any time during the payment process. This page acts similarly to the Return URL; it will redirect your customers to a specified URL upon cancellation of a purchase during the checkout flow.

If a Cancel URL is not included in your payment button, your buyers will stay on Payza’s cancellation page and will not be redirected to another page.

Suggest Edits

Currency codes

 

Here is a list of the ISO-4217 codes for currencies supported by Payza.

Currency Code Currency Name
AUD Australian Dollar
BDT Bangladeshi Taka   (Only for Bangladesh)
BRL Brazilian Real
BGN Bulgarian Lev
CAD Canadian Dollar 
CHF Swiss Franc
CNY Chinese Yuan Renminbi
CZK Czech Koruna
DKK Danish Krone
EUR Euro
GBP Pound Sterling
HKD Hong Kong Dollar
HUF Hungarian Forint
INR Indian Rupee   (Only for India)
LTL Lithuanian Litas
MYR Malaysian Ringgit
MKD Macedonian Denar
MXN Mexican Peso
NOK Norwegian Krone
NZD New Zealand Dollar
PLN Polish Zloty
RON Romanian New Leu
SEK Swedish Krona
SGD Singapore Dollar
USD U.S. Dollar
ZAR South African Rand
BTC Bitcoin
Suggest Edits

Country codes

 

Here is a complete listing of the ISO 3166-1 alpha-3 codes for countries supported by Payza.

Country Code Country Name
ALB Albania
DZA Algeria
ASM American Samoa
AND Andorra
AGO Angola
AIA Anguilla
ATG Antigua and Barbuda
ARG Argentina
ARM Armenia
ABW Aruba
AUS Australia
AUT Austria
AZE Azerbaijan
BHS Bahamas
BHR Bahrain
BGD Bangladesh
BRB Barbados
BEL Belgium
BLZ Belize
BEN Benin
BMU Bermuda
BTN Bhutan
BOL Bolivia
BIH Bosnia and Herzegovina
BWA Botswana
BRA Brazil
IOT British Indian Ocean Territory
BRN Brunei
BGR Bulgaria
BFA Burkina Faso
BDI Burundi
KHM Cambodia
CAN Canada
CPV Cape Verde
CYM Cayman Islands
CHL Chile
CHN China
CXR Christmas Island
CCK Cocos (Keeling) Islands
COL Colombia
COM Comoros
CGO Congo
COK Cook Islands
CRI Costa Rica
HRV Croatia
CYP Cyprus
CZE Czech Republic
DNK Denmark
DJI Djibouti
DMA Dominica
DOM Dominican Republic
ECU Ecuador
EGY Egypt
SLV El Salvador
EST Estonia
ETH Ethiopia
FLK Falkland Islands
FRO Faroe Islands
FJI Fiji
FIN Finland
FRA France
GUF French Guiana
PYF French Polynesia
FST French Southern Territories
GAB Gabon
GMB Gambia
GEO Georgia
DEU Germany
GHA Ghana
GIB Gibraltar
GRC Greece
GRL Greenland
GRD Grenada
GLP Guadeloupe
GUM Guam
GTM Guatemala
JEY Guernsey
GIN Guinea
GNB Guinea-Bissau
GUY Guyana
HND Honduras
HKG Hong Kong
HUN Hungary
ISL Iceland
IND India
IDN Indonesia
IRL Ireland
ISR Israel
ITA Italy
JAM Jamaica
JPN Japan
JOR Jordan
KAZ Kazakhstan
KEN Kenya
KIR Kiribati
KOR Korea, South
KWT Kuwait
KGZ Kyrgyzstan
LAO Laos
LVA Latvia
LSO Lesotho
LBR Liberia
LIE Liechtenstein
LTU Lithuania
LUX Luxemburg
MAC Macau
MKD Macedonia
MDG Madagascar
MWI Malawi
MYS Malaysia
MDV Maldives
MLI Mali
MLT Malta
MHL Marshall Islands
MTQ Martinique
MRT Mauritania
MUS Mauritius
MYT Mayotte
MEX Mexico
FSM Micronesia, Federated States of
MDA Moldova
MCO Monaco
MNG Mongolia
MON Montenegro
MSR Montserrat
MAR Morocco
MOZ Mozambique
NAM Namibia
NRU Nauru
NPL Nepal
NLD Netherlands
ANT Netherlands Antilles
NCL New Caledonia
NZL New Zealand
NIC Nicaragua
NER Niger
NGA Nigeria
NIU Niue
NFK Norfolk Island
MNP Northern Mariana Islands
NOR Norway
OMN Oman
PAK Pakistan
PLW Palau
PAN Panama
PNG Papua New Guinea
PRY Paraguay
PER Peru
PHL Philippines
PCN Pitcairn
POL Poland
PRT Portugal
PRI Puerto Rico
QAT Qatar
REU Reunion
ROU Romania
RUS Russia
KNA Saint Kitts and Nevis
LCA Saint Lucia
VCT Saint Vincent and the Grenadines
WSM Samoa
SMR San Marino
STP Sao Tome and Principe
SAU Saudi Arabia
SEN Senegal
SER Serbia
SYC Seychelles
SLE Sierra Leone
SGP Singapore
SVK Slovakia
SVN Slovenia
SLB Solomon Islands
ZAF South Africa
ESP Spain
LKA Sri Lanka
SHP St. Helena
SPM St. Pierre and Miquelon
SUR Suriname
SJM Svalbard and Jan Mayen Islands
SWZ Swaziland
SWE Sweden
CHE Switzerland
TWN Taiwan
TJK Tajikistan
TZA Tanzania
THA Thailand
TGO Togo
TON Tonga
TTO Trinidad and Tobago
TUN Tunisia
TUR Turkey
TKM Turkmenistan
TCA Turks and Caicos Islands
TUV Tuvalu
UGA Uganda
UKR Ukraine
ARE United Arab Emirates
GBR United Kingdom
USA United States
UMO United States Minor Outlying Islands
URY Uruguay
UZB Uzbekistan
VUT Vanuatu
VAT Vatican City State
VEN Venezuela
VNM Viet Nam
VGB Virgin Islands (British)
VIR Virgin Islands (U.S.)
WLF Wallis and Futuna Islands
ZMB Zambia
Suggest Edits

API Return codes

 

Here is a complete listing of the API Return codes used by Payza.

Return Code Description
100 Transaction was completed successfully
201 Missing parameter USER in the request.
202 Missing parameter PASSWORD in the request.
203 Missing parameter RECEIVEREMAIL in the request.
204 Missing parameter AMOUNT in the request.
205 Missing parameter CURRENCY in the request.
206 Missing parameter PURCHASETYPE in the request.
211 Invalid format for parameter USER. Value must be a valid e-mail address in the following format: username@example.com
212 Invalid format for parameter PASSWORD. Value must be a 16 characters’ alpha-numeric string.
213 Invalid format for parameter AMOUNT. Value must be numeric.
214 Invalid value for parameter CURRENCY. Value must be a three characters string representing an ISO-4217 currency code accepted by Payza.
215 Invalid format for parameter RECEIVEREMAIL. Value must be a valid e-mail address in the following format: username@example.com
216 The format for parameter NOTE is invalid.
217 Invalid value for parameter TESTMODE. Value must be either 0 or 1.
218 Invalid value for parameter PURCHASETYPE. Value must be an integer number between 0 and 3.
219 Invalid format for parameter SENDEREMAIL. Value must be a valid e-mail address in the following format: username@example.com
221 Cannot perform the request. Invalid USER and PASSWORD combination.
222 Cannot perform the request. API Status is disabled for this account.
223 Cannot perform the request. Action cannot be performed from this IP address.
224 Cannot perform the request. USER account is not active.
225 Cannot perform the request. USER account is locked.
226 Cannot perform the request. Too many failed authentications. The API has been momentarily disabled for your account. Please try again later.
231 Incomplete transaction. Amount to be sent must be positive and greater than 1.00.
232 Incomplete transaction. Amount to be sent cannot be greater than the maximum amount.
233 Incomplete transaction. You have insufficient funds in your account.
234 Incomplete transaction. You are attempting to send more than your sending limit.
235 Incomplete transaction. You are attempting to send more than your monthly sending limit.
236 Incomplete transaction. You are attempting to send money to yourself.
237 Incomplete transaction. You are attempting to send money to an account that cannot accept payments.
238 Incomplete transaction. The recipient of the payment does not accept payments from unverified members.
239 Invalid value for parameter NOTE. The field cannot exceed 1000 characters.
240 Error with parameter SENDEREMAIL. The specified e-mail is not associated with your account.
241 Error with parameter SENDEREMAIL. The specified e-mail has not been validated.
242 Incomplete transaction. The recipient’s account is temporarily suspended and cannot receive money.
243 Incomplete transaction. The recipient only accepts funds from members in the same country.
244 Incomplete transaction. The recipient cannot receive funds at this time, please try again later.
245 Incomplete transaction. The amount you are trying to send exceeds your transaction limit as an Unverified Member.
246 Incomplete transaction. Your account must be Verified in order to transact money.
247 Unsuccessful refund. Transaction does not belong to this account.
248 Unsuccessful refund. Transaction does not exist in our system.
249 Unsuccessful refund. Transaction is no longer refundable.
250 Unsuccessful cancellation. Subscription does not belong to this account.
251 Unsuccessful cancellation. Subscription does not exist in our system.
252 Unsuccessful cancellation. Subscription is already canceled.
260 Unsuccessful query. The specified CURRENCY balance is NOT open in your account.
281 Unsuccessful query. Invalid start date.
282 Unsuccessful query. No transactions found.
283 Unsuccessful query. Invalid end date.
299 An unexpected error occurred.
Suggest Edits

Transaction Type codes

 

Here is a complete listing of the TRANSACTIONTYPE codes supported by Payza's TransactionHistory API.

Integer Code Transaction type
2 Deposit
3 Withdrawal
4 Transfer Sent
5 Transfer Received
6 Fees
7 Refund Sent
8 Refund Received
9 Request Sent
10 Request Received
11 Subscription Payment To
12 Subscription Payment From
13 Single Item Purchase out
14 Single Item Purchase in
15 Micro Payment
16 Bank Transfer/Wire Withdrawal Return Fee
17 Transfer Sent - No Fees
18 Transfer Received - No Fees
19 Currency Conversion
20 Currency Conversion
22 Debit
23 Credit
24 Chargeback Fine
25 Service Fee
28 Bank Transfer Deposit Return Fee
29 Credit card withdrawal return fee
30 Email Invoicing Sent
31 Email Invoicing Received
32 Deposit by cc (for non transfer transactions)
Suggest Edits

Transaction State codes

 

Here is a complete listing of the TRANSACTIONSTATE codes supported by Payza's TransactionHistory API.

Integer Code Transaction state
1 Pending
2 Completed
3 Withdrawal - Created
4 Deposit - Created
5 Withdrawal - Pending Processing
6 Request - Pending Acceptance
7 Transfer - Pending Account Upgrade
8 Transaction Cancelled
9 Transaction Expired
10 ACH- Withdrawal Processed
11 Transaction Declined
12 Deposit - Pending Processing
13 ACH - Deposit Processed
14 Transfer Sent
15 Request Sent
16 Request Sent - Email Verification
17 Request Declined
18 Subscription failed
19 Reversed
20 Bank Account Confirmation
21 Bank Account Export
22 Bank Transaction Returned
23 Disbursement Pending for Verification
24 ACH Processing
25 Transaction Refunded
26 Transaction Refunded affecting Balance
27 Bank Transaction Reversed
28 On Hold
30 Pending Email Validation
31 Chargeback
32 Pending-Awaiting Review
33 Pending Credit Card Refund
34 Pending Credit Card Validation
35 Completed - does not effect CC usage
36 Pending Credit Card Reversal
Suggest Edits

Supported Shopping Cart Modules

 

The shopping carts in this section have Payza-supported integration modules. If you run into any issues integrating these products with your website and our payment processing services, you can contact our Customer Support Team for assistance and they will be happy to help you further.

INTEGRATING A SUPPORTED SHOPPING CART MODULE WITH PAYZA

1) Locate your preferred shopping cart below and download the compressed module.
2) Extract the file.
3) Locate and open the Installation Instructions or Readme text file. Depending on the module you have chosen, you may see this file before or after you complete the extraction.
4) Follow the instructions in the text file to complete your shopping cart integration.

 

More than 240,000 merchants worldwide put their trust in our eCommerce software. Magento’s eCommerce platform gives you the tools you need to attract more prospects, sell more products, and make more money.

DOWNLOAD THE MAGENTO MODULE

Download the X-Cart Shopping Cart Module zip file for Payza here: Download Magento Module

Suggest Edits

PrestaShop

 

PrestaShop's free, secure and open source shopping cart platform comes complete with over 275 features that have been carefully developed to assist business owners in increasing sales with little effort.

DOWNLOAD THE PRESTASHOP MODULE

Download the PrestaShop Shopping Cart Module zip file for Payza: Download PrestaShop Module

 

OpenCart is your turn-key shopping cart solution. Simply install, select your template, add products and your ready to start accepting orders. OpenCart is feature rich, easy to use, search engine friendly and has a visually appealing interface.

DOWNLOAD THE OPENCART MODULE

Download the OpenCart Shopping Cart Module zip file for Payza here: Download OpenCart Module

Suggest Edits

osCommerce

 

osCommerce is an e-commerce solution that offers a wide range of out-of-the-box features allowing online stores to get setup fairly quickly and with ease. It is available for free as an open source solution. It currently powers more than 12,000 shops around the world!

DOWNLOAD THE OSCOMMERCE MODULE

Download the osCommerce Shopping Cart Module zip file for Payza here: Download osCommerce Module

 

Zen Cart® puts the requirements of merchants and shoppers first. It is a free, user-friendly, open source shopping cart software that can be installed and set up by anyone with the most basic website building and computer skills. Zen Cart truly is the art of e-commerce!

DOWNLOAD THE ZENCART MODULE

Download the ZenCart Shopping Cart Module zip file for Payza here: Download ZenCart Module

Whmcs combines billing and support into a single package for merchants looking for a complete and versatile shopping cart.

DOWNLOAD THE WHMCS MODULE

Download the WHMCS Shopping Cart Module zip file for Payza here: Download WHMCS Module

X-Cart is the e-commerce shopping cart software that is SEO-friendly, easy to customize, fast and secure, AND 100% PCI-DSS compliant. With X-Cart you get a unique storefront design and custom-made functionality to ensure the web store meets your business needs completely.

DOWNLOAD THE X-CART MODULE

Download the X-Cart Shopping Cart Module zip file for Payza here: Download X-Cart Module

Suggest Edits

Third-Party Shopping Cart Modules

 

The shopping carts in this section do not have Payza-supported integration modules but can still be integrated with your website and our payment processing services.

If you run into any issues with third-party shopping cart modules, you will need to contact the shopping cart developer for further assistance as our Customer Support Team would not be able to help you integrate these products.

Suggest Edits

AbanteCart

 

AbanteCart is a free eCommerce application that is designed, built and supported by experienced enthusiasts that are passionate about their work and contribution to the project.

VISIT ABANTECART TO DOWNLOAD THEIR MODULE

Visit AbanteCart to download their Shopping Cart module: AbanteCart

 

CS-Cart is the best shopping cart solution for building an e-commerce website of any size: from a small web store to a virtual shopping mall. CS-Cart provides a ready storefront, support for many payment and shipping options, full inventory control, promotional tools, and more.

VISIT CS-CART TO DOWNLOAD THEIR MODULE

Visit the CS-Cart marketplace to purchase their Payza Payment Gateway add-on: CS-Cart

Whether you are opening your first store or migrating from another shopping cart, 3DCart has over 100 features designed to grow your online business.

VISIT 3DCART TO DOWNLOAD THEIR MODULE

Visit 3DCart to download their Shopping Cart module: 3DCart

Suggest Edits

InstanteStore

 

This quick & easy e-commerce solution will help you build your online store with shopping cart software in minutes. See why people choose this e-commerce software.

VISIT INSTANTESTORE TO DOWNLOAD THEIR MODULE

Visit InstanteStore to download their Shopping Cart module: InstanteStore

 

Ubercart is an exciting open source e-commerce shopping cart that fully integrates your online store with Drupal. This is a killer combination for anyone looking to build a community around a product, sell access to premium content, offer paid file downloads, and much much more!

VISIT UBERCART TO DOWNLOAD THEIR MODULE

Visit Ubercart to download their Shopping Cart module: Ubercart

Suggest Edits

More Third-Party Shopping Cart Modules

 

MORE THIRD-PARTY SHOPPING CARTS

Here are a few additional third-party shopping carts and e-commerce tools that can be used with Payza:

Send Us Your Shopping Cart Module!

Have you designed a super cool shopping cart, software or platform that supports Payza? Do you know about a product you think we should support? Let us know - we'd love to see just how cool they are! Send us an email at payzaintegrations@payza.com.

DO YOU HAVE OR KNOW OF A SHOPPING CART MODULE THAT PAYZA MERCHANTS WOULD LOVE?

Send us an email at payzaintegrations@payza.com to let us know about the latest shopping cart module and we'll take care of the rest!