This document describes how to interface a shopping cart system to RoutePay. This interface uses standard HTML forms to provide a simple way for sellers to integrate RoutePay as a method of payment for their merchandise or services.
This guide also includes examples of HTML form for interfacing to the RoutePay® payment system. This form is functionally equivalent to one that merchants will need to provide within their shopping cart check-out system to interface to the RoutePay® payment system. Finally, you will also find an example of the form and the parameters that the IPN system posts back to the seller's server.
This documentation is made short and direct, enabling anyone, even those who are not experienced developers to easily copy and paste and edit form details and be up and running in no time. RoutePay also provides a form generation system, making the process of accepting payments for your goods using RoutePay even easier.
To quickly use the form generation system, follow the following steps:
- Login to your RoutePay account.
- Click on "Merchant Tools"
- Click on "Generate Form "
- Enter all the required fields and optional fields of your choice.
- Select the image for your payment button and click on "Create Form "
- Copy and paste the generated form to your site and you are ready to accept payments through SCI.
After you have successfully generated your form, you will find details similar to the form shown below. For the payment button to work, you must create a form using the POST method and all the parameters you send should use hidden fields.
RoutePay server listens to SCI requests through: https://www.routepay.com/sci.asp so the form action should be set to that url.
The Most Basic Form, showing only the required fields:
<form action="https://www.routepay.com/sci.asp" method="POST">
<input type=hidden name="rp_acc_merchant" value="RB000001" />
<input type=hidden name="amount" value="20.99" />
<input type=hidden name="currency" value="USD" />
<input type=image name="paybutton" src="http://routepay.com/paybtn/P1.gif" />
</form
Parameters List
Form Field |
Required |
Description |
Example |
| rp_acc_merchant |
Yes |
The receiver of the payment. Your RoutePay Account ID |
RB000001 |
| rp_amount |
Yes |
The price of the item in USD or EURO. No currency symbols allow- only numbers. |
20.99 |
| rp_currency |
Yes |
The currency you would like the payment to be made through. Valid Currencies are USD and EUR. Indicating USD enables your payment to be made in US dollar. While EUR would indicate you want the payment in EURO |
USD |
| rp_merchant_ref |
Optional |
Merchant reference for this transaction.
The value of this field can be used by the merchant for the order number, or any other reference.
This field is visible in the history both to the Merchant and Buyer. If not included by Merchant, the server will create it with an empty value ("" ) |
15465 |
| rp_memo |
Optional |
The memo that the Merchant may want included with the payment. It is optional. If specified the Buyer cannot change the information contained within it. If not supplied or empty, the Buyer is presented with a memo field |
Payment for TV |
| rp_ipn_url |
Optional |
The URL where payment details will be sent on successful payment. Successful payment details are sent there using the POST method. Your server can then capture and process the details if your site has a script to process IPN (Instant Payment Notification) |
http://www......com/processIPN.php |
| rp_payment_url |
Optional |
The URL the buyer will be redirected when the payment is completed successfully. This may be your Thank you page. |
http://www......com/ThankYou.php |
| rp_nopayment_url |
Optional |
The URL where the customer will be redirected to if he/she cancels the payment or if the payment is not successful. |
http://www.......com/TryAgain.php |
rp_custom1
rp_custom2
rp_custom3
rp_custom4
rp_custom5
rp_custom6
rp_custom7
rp_custom8
rp_custom9
rp_custom10 |
Optional |
Custom fields allow Merchant to include additional information in the form. This information is not processed by RoutePay, but returned with every successful payment to the Merchant for his own purposes.
You may add up to 10 custom fields and values to the form. These parameters will be sent back to the url specified in the rp_ipn_url field unchanged. |
|
Sample Form showing the required fields and 4 additional fields:
<form action="https://www.routepay.com/sci.asp" method="POST">
<input type=hidden name="rp_acc_merchant" value="RB000001" />
<input type=hidden name="rp_amount" value="20.99" />
<input type=hidden name="rp_currency" value="USD" />
<input type=hidden name="rp_merchant_ref" value="15465" />
<input type=hidden name="rp_memo" value="Payment for TV" />
<!-- Addition of custom fields each containing a value-->
<input type=hidden name="rp_custom1" value="Customer 15465" />
<input type=hidden name="rp_custom2" value="Invoice No. 49 " />
<input type=image name="paybutton" src="http://routepay.com/paybtn/P1.gif" />
</form>
Replace RB000001 with your RoutePay Account ID
The sample form above is another simple form with rp_merchant_ref, rp_memo added and rp_custom1 and rp_custom2 supplied with values. If there is no need for additional fields, simply remove the lines indicated in red.
The form action is set to https://www.routepay.com/sci.asp
That is where RoutePay listens to sci requests. The form method is set to POST.
Explanation of the form:
-
The first hidden field is rp_acc_merchant. The value of it should be your Account ID.
-
The second hidden field is rp_amount. The value of it should be the total amount you expect to receive.
-
The third hidden field is rp_currency. This is the currency to use for the payment. The value of it should be either USD or EUR.
-
The forth hidden field is rp_merchant_ref. This is not required, but if included, the value of it could be your invoice number or other reference.
-
The fifth hidden field is rp_memo. This too is not required, but if included, the value of it could be any comments.
-
The sixth hidden field is rp_custom1. You can use the value of it to store any information you want RoutePay to send back during transaction. RoutePay does not process data stored there. It simply post it back to the Merchant's server
-
The seventh hidden field is rp_custom2. You can use the value of it to store any information you want RoutePay to send back during transaction.
-
The last item there is the image. The src refers to where RoutePay Buy Now button is located.
Parameters Sent Back By RoutePay to the url indicated in rp_ipn_url field by Merchant |