API Samples and Demo

Paymentsite Universal API

Example

The Paymentsite Universal API is a server-side application (Web service) that provides access to transaction processing services. All communications take place over secure HTTPS links on the Internet. Requests are sent to the payment processing servers by "POSTing" XML or JSON data that has been formatted per the schema defined in this specification. The response is returned as XML or JSON data in the body of the HTTP reply.

Before you can begin testing, you will need a test account with Paymentsite. Please contact us at support@paymentsite.com to set up your test account. Test accounts are not connected to the payment processor and even though you will receive a response from each request sent, transactions sent to a test account are not actually processed and no money is moved. Your test account information should include a merchant ID and a key that you will include in all requests you send to the Paymentsite system. This merchant ID and key is merchant specific.

Transaction Request

The posting URL to use for testing API transaction requests is as follows. This URL is strictly for posting transactions such as auth, capture, sale, return, etc.
Posting URL for test transaction requests: https://apiint.paymentsite.com/UniversalAPI/postXML
When passing transactions through a test account a simulated payment gateway will be used. To pass a successful transaction to the engine that approves pass an even dollar amount such as $100.00. To simulate failed transactions and get a decline, pass an odd number such as $100.01. To simulate a partial payment pass a value between $300.00 to $399.99. Don't forget odd numbers will decline.

Credit Card Sale

OnFile Sale
(Using Token)

Setup Recurring

Non Transaction Request

The posting URL to use for testing other API requests (requests such as add-consumer, which are not transactional in nature) is:
Posting URL for test requests which are NON-transactional: https://apiint.paymentsite.com/UniversalAPI/postAPI

Add Customer

Add Payment OnFile
(New Customer)

Add Payment OnFile
(Existing Customer)

Code Sample

The XML can be posted using any of several different web languages, including:

  • .Net
  • C#
  • Java
  • Perl
  • PHP