Receive Pay Merchant Services - Documentation
Documentation
- RESTful API
- API Reference
- Getting Started
- Method Reference
- Charges
- Recurring Charges
- ACH Transactions
- Recurring ACH Transactions
- Paper Check Conversion Transactions
- Discounts & Coupons
- Customers
- Recurring Plans
- Emails
- Gateways
- Clients
- General Reference
- Gateway Integrations
- Example Posts
- Data Types
- Glossary
- Troubleshooting
- Error Codes
- FAQ
The Cost of Getting Paid
When businesses look at what it costs them to collect payments, they rarely look beyond the cost of postage and the paper the invoice is printed on, ignoring the labor that goes into the preparation and processing of each invoice, which includes:
• Preparing invoices
• Stationary & Postage
• Resolving disputes
• Processing the resulting payment
• Matching orders
• Reconciling bank statements
• Correcting mis-keyed data
• Making bank deposits
• Pursuing delinquent accounts
• ETC.
Integrate with ReceivePay today!
Getting Started
Your Choice ~ Integrate your Accounting / Billing / CRM / Invoicing software system with us or, send us your API and we'll integrate with YOU!
Compare us to the competition!
The ReceivePay Billing Engine is multi-gateway single payment and recurring billing payment engine built for integration by web developers. Through it's simple API and control panel (used optionally, depending on how heavily you rely on the API), ReceivePay handles every aspect of accepting payments online from subscription (recurring billing/invoicing) plans to billing records and billing-related emails.
Intended Audience
This API documentation is intended for web developers who have access to a ReceivePay billing server. With your API Identifier and API Secret Key, you have permission to submit requests.
Developers should have knowledge in a programming language such as PHP, .NET, Python, Perl, or Ruby and have knowledge of web service usage and how to create simple XML requests.
What is the API for?
With the API, you can access every functional aspect of the billing platform. For those who want to use only certain elements of the API (e.g., to charge credit cards, setup recurring charges, or create new customer records), the ReceivePay control panel (located at your root installation folder) can handle the less common administrative aspects of your billing setup such as payment gateways, email triggers, and recurring plans.
An example usage of the API would be to:
Create a new customer record.
Setup a recurring payment for that customer.
When that customer attempts to access a subscribers-only area of your website, check to see if that customer has an active subscription to that plan.
Documentation Legend
All request parameters will be highlighted like this: request_parameter.
All response variables will be highlighted like this: response_variable.
Example code will appear in similar boxes color-coded as either requests or responses.
Authentication
All API requests are authenticated with an API Identifier and API Secret Key passed in the request.
Example Request:
<?xml version="1.0" encoding="UTF-8"?> <request> <authentication> <api_id>Simulated000API000ID</api_id> <secret_key>Simulated000API000SECRET000KEY</secret_key> </authentication> <type>GetCustomers</type> <limit>50</limit> </request>
Request Format
Requests must be made in XML format and sent via an HTTP POST call to the ReceivePay platform server. A secure (https://) connection is required (as per the recommended configuration) for requests that contain credit card information. Requests should be posted to the API URL. This located at your root installation folder/api. So, if you have ReceivePay installed at http://ReceivePay.example.com, you would use the following URL's:
http://ReceivePay.example.com/api // URL for non-credit card requests https://ReceivePay.example.com/api // URL for credit card requests
Each request must be accompanied by an authentication node with an api_id and secret_key as well as a type value which specifies the API method to be called (e.g. "NewCustomer", "Charge", or "GetPlan"). All other request parameters vary depending on the API method.
In the "Method Reference" section of this documentation, you will find an example of each type of API request, required and optional parameters, as well as the response format with examples.
Using PHP, an API request might look like this:
<?php $post_url = 'https://ReceivePay.example.com/api'; $poststring = '<?xml version="1.0" encoding="UTF-8"?> <request> <authentication> <api_id>Simulated000API000ID</api_id> <secret_key>Simulated000API000SECRET000KEY</secret_key> </authentication> <type>Charge</type> <gateway_id>594082</gateway_id> <credit_card> <card_num>0000123412341234</card_num> <exp_month>12</exp_month> <exp_year>2015</exp_year> <cvv>123</cvv> </credit_card> <amount>95.00</amount> </request>'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$post_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $poststring); $response = curl_exec($ch); if(curl_errno($ch)) { echo curl_error($ch); curl_close($ch); die(); } else { curl_close($ch); /** * deal with the $response * because this was a charge, we'll look for "response_code" == 1 * to indicate success */ }
Response Format
Responses can be in XML, JSON, or serialized PHP format. The default response format is XML. To request another format, send a format parameter with a value of either "json" or "php".
Example response in XML format (for a GetCustomer call):
<?xml version="1.0" encoding="utf-8"?> <response> <customer> <id>140</id> <internal_id/> <first_name>Joe</first_name> <last_name>Customer</last_name> <company/>123 Broadway <address_2/>San Diego <state>CA</state>92101 USA <email>joe@example.com</email> <phone/> <plans> <plan> <id>123456789</id> <type>paid</type> <name>Simulated Plan</name> <amount>14.95</amount> <interval>30</interval> <notification_url>http://www.example.com/post.php</notification_url> <status>active</status> </plan> </plans> </customer> </response>