Getting Started with Everpay

Intended Audience

Hello! Ready to test drive Everpay? All tutorials have been tailored to your account. So in most cases, all you need to do is copy the code snippets and paste them into your projects and tools.

The Elektropay Commerce Engine is multi-gateway, bank neutral, single payment and recurring billing payment engine built for integration by web developers. The platform handles every aspect of accepting payments online from subscription plans to billing records.This API documentation is intended for web developers who have access to thier 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 Everpay 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:

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 colour-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>FAKE000API000ID</api_id>
	        <secret_key>FAKE000API000SECRET000KEY</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 Everpay Commerce Engine. 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 the following URL:

https://everpayinc.com/apps/api // URL for credit card and non 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://everpayinc/apps/api';

$poststring = '<?xml version="1.0" encoding="UTF-8"?>
<request>
	<authentication>
		<api_id>FAKE000API000ID</api_id>
		<secret_key>FAKE000API000SECRET000KEY</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/>
    <address_1>12345 Ontario St.</address_1>
    <address_2/>
    <city>Toronto</city>
    <state>ON</state>
    <postal_code>A1B2C3</postal_code>
    <country>CA</country>
    <email>[email protected]</email>
    <phone/>
    <plans>
      <plan>
        <id>123456789</id>
        <type>paid</type>
        <name>Fake 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>

Charges

Charges are individual payments made with a credit card. Charges can be linked to recurring charges and/or customers. However, charges can also exist without a link to either a customer or a recurring charge.

Charges are processed immediately via the Everpay gateway specified by the gateway_id in the request or by the default gateway associated with the API client. If there is only one gateway associated with the API account, this gateway will be for the charge.

Charges can be created and records of charges can be retrieved. However, charges cannot be updated and/or deleted because the records serve as receipts for payments made via external payment gateways. To refund or void charges, one should access their specific payment gateway's control panel.

Method: Charge

This method is the heart of the billing engine. A Charge request represents a payment made via a payment gateway. One makes a request of this type to charge a credit card.

To create subscription charges, you will not use this method. You will use the Recur method. However, all individual charges for a recurring subscription are stored in the charges database and returned in GetCharge and GetCharges requests.

Charge requests can be linked to customers via either a customer_id or an embedded customer node embedded within this request to the API. For more information on embedding customer data in a Charge request, see the customers page.

How to add a free charge to a customer (e.g., for records purposes):
Pass amount as "0". Complete dummy credit card information with "0000000000000000" as the credit card number and any future expire date. Your gateway will not be passed this charge.

Request data:

Variable Type Required Format/Example
amount money yes e.g. "45.67"
coupon string A coupon code that relates to a coupon in the database (e.g., "TEST123"). If the coupon code is invalid, it will be ignored.
credit_card node yes All credit card sub-nodes must be included with accurate credit card information regarding the purchaser.
card_num int yes The purchaser's credit card number, e.g. "1234567809876543".
name string yes The purchaser's name. This must match the name on the credit card.
exp_month int yes The purchaser's credit card expiry month with 2-digit representation, e.g. "10".
exp_year int yes The purchaser's credit card expiry year with 2-digit representation, e.g. "14".
cvv int yes The purchaser's credit card CVV2/security number. It's required for any card where it is available. If not available on the card, send this parameter as empty.
gateway_id int The system ID for the payment gateway used for the charge. If left empty, the default/only gateway will be used.
customer_id int The ID of the customer to link the charge to, e.g. "4". Only include this parameter if you are not embedding customer information below. Charges do not need to be linked to a customer.
customer node Include sub-nodes with any/all available customer data. For more information, see the "Embedding customer data in Charge/Recur requests" on the customers page. Only include this parameter if you are not including a customer_id. Charges do not need to be linked to a customer.
customer_ip_address string You can optionally send the purchaser's IP address.

Response data:

  • response_code - "1" upon success, "2" upon failure.
  • response_text - A verbose description of the response_code.
  • charge_id - The ID of the charge record.
  • customer_id - The ID of the new customer, if a customer node was embedded in the request.
  • amount - The amount of the charge, useful for coupon-adjusted requests.

Method: Refund

Refunds a successful charge.

Note: Not all our gateways or bank connections allow refunds via API. This method will return an error (code = 5020) if this is the case. It will also return an error if the charging gateway was disabled/deleted, or if the charge cannot be found in the database.

Required data:

  • charge_id- The ID of the charge to refund.

Response data:

  • response_code - "50" upon success, "51" upon failure.
  • response_text - A verbose description of the response_code.

Method: GetCharge

Retrieves available information about a previous charge.

Required data:

  • charge_id - The ID of the charge record.

Response data:

Variable Type Required Format/Example
id automatic 123456789
gateway_id int The system ID for the payment gateway used for the charge.
date date The date of the charge.
amount money yes e.g. "45.67"
card_last_four int The last four digits of the charged credit card.
recurring_id int The ID of the recurring charge related to this individual charge. Only returned if a recurring charge is available.
status string (automatic) "ok" if the charge was successful, "failed" if the charge was unsuccessful.
If a customer_id is passed in a Charge request, a customer node is returned with all available data in the format of a GetCustomer request.

Example simple response:

<?xml version="1.0" encoding="utf-8"?>
<response>
  <charge>
    <id>140</id>
    <gateway_id>12345</gateway_id>
    <amount>24.95</amount>
    <date>2009-05-29 22:11:44</date>
    <card_last_four>9876</card_last_four>
    <status>ok</status>
  </charge>
</response>

Example response with customer information and linked to a recurring charge:

<?xml version="1.0" encoding="utf-8"?>
<response>
  <charge>
    <id>140</id>
    <gateway_id>12346</gateway_id>
    <amount>15.35</amount>
    <date>2009-05-14 11:25:14</date>
    <card_last_four>5467</card_last_four>
    <recurring_id>192824</recurring_id>
    <status>ok</status>
    <refunded>0</refunded>
    <customer>
	    <id>140</id>
	    <internal_id/>
	    <first_name>Joe</first_name>
	    <last_name>Customer</last_name>
	    <company/>
	    <address_1>12345 Ontario St.</address_1>
	    <address_2/>
	    <city>Toronto</city>
	    <state>ON</state>
	    <postal_code>A1B2C3</postal_code>
	    <country>CA</country>
	    <email>[email protected]</email>
	    <phone/>
  	</customer>
  </charge>
</response>

Method: GetCharges

Returns records of charges, with optional filters. If a request is made without any filters, the latest 100 active customer records are returned.

Optional filters:

  • id
  • recurring_id - Get all charges linked to a recurring charge.
  • gateway_id
  • customer_id
  • customer_last_name
  • customer_internal_id
  • recurring_only - Set to "1" to only retrieve charges linked to recurring charges.
  • status - Values: "ok", "refunded", or "failed". If not present in the request, all transactions are returned regardless of status.
  • offset - Retrieval will begin after offset # of records. Useful for pagination. Default: 0.
  • limit - The total number of records to retrieve, beginning at the offset. Maximum: 100. Default: 100.
  • sort - The field on which to sort retrieved records. Default: "date". Available values:
    • customer_first_name
    • customer_last_name
    • date
    • amount
  • sort_dir - The direction in which to sort retrieved records. Default: "desc". Can also be "asc".

Response data:

  • results - Number of records in this response
  • total_results - Total # of records to retrieve. Use offset to gather all records over multiple iterated requests.
  • charges
    • A charge node for each returned charge
      • All data available for the charge, in the format of GetCharge.

Example response:

<?xml version="1.0" encoding="utf-8"?>
<response>
  <results>2</results>
  <total_results>2</total_results>
  <charges>
     <charge>
       <id>140</id>
       <gateway_id>12345</gateway_id>
       <amount>24.95</amount>
       <date>2009-05-29 22:11:44</date>
       <card_last_four>9876</card_last_four>
       <status>ok</status>
       <refunded>1</refunded>
       <refund_date>2009-06-14 12:11:09</refund_date>
     </charge>
     <charge>
       <id>140</id>
       <gateway_id>12346</gateway_id>
       <amount>15.35</amount>
       <date>2009-05-14 11:25:14</date>
       <card_last_four>5467</card_last_four>
       <recurring_id>192824</recurring_id>
       <status>ok</status>
       <customer>
	      <id>140</id>
	      <internal_id/>
	      <first_name>Joe</first_name>
	      <last_name>Customer</last_name>
	      <company/>
	      <address_1>12345 Ontario St.</address_1>
	      <address_2/>
	      <city>Toronto</city>
	      <state>ON</state>
	      <postal_code>A1B2C3</postal_code>
	      <country>CA</country>
	      <email>[email protected]</email>
	      <phone/>
       </customer>
     </charge>
  </charges>
</response>

Method: GetLatestCharge

Retrieves available information about a previous charge for a customer.

Required data:

  • customer_id - The ID of the customer.

Optional data:

  • gateway_id - Only retrieve data for this gateway ID.

Response data:

  • All charge data (in the format of GetCharge).

Coupons

Coupons are codes included in either a Charge or Recur request that do one of the following:

  • Reduce the payment amount (for single charges)
  • Reduce the initial payment amount (for recurring charges)
  • Reduce the recurring payment amount (for recurring charges)
  • Reduce both the initial/recurring charge amounts (for recurring charges)
  • Add/modify the free trial (in days) (for recurring charges)

Coupon values can be either a percentage of the current amount being charged or a set dollar amount.

They can also be limited specific plans.

Using Coupons

To use coupons, you must first define coupons in your control panel.

After that, simply send a coupon node in your XML Charge or Recur request. It will automatically be validated and modify the payment accordingly.

Charge/Recur Responses

When a coupon code is used, Everpay will adjust the amount, recurring amount, free trial, etc. on its end. However, some applications may require that these adjusted values be stored locally. For this reason, the following additional parameters will be now returned in a Charge and Recur API requests:

  • Charge
    • amount - The (possibly adjusted) amount of the payment.
  • Recur
    • amount - The (possibly adjusted) amount of the initial charge.
    • recur_amount - The (possibly adjusted) amount of the recurring charge.
    • free_trial - The (possibly adjusted) number of days before the first charge.
    • start_date - The (possibly adjusted) start date for the subscription.

Recurring Charges

Recurring charges are subscription payments that are linked to a customer record. Customers are billed $X.XX every X days. Recurring charges can be linked to Recurring Plans via a plan_id or can be independent subscriptions.

Recurring charges that do not have a free trial are processed immediately via the gateway specified by the gateway_id in the request or by the default gateway associated with the API client. If there is only one gateway associated with the API account, this gateway will be for the charge and all subsequent charges related to the subscription.

Notifications

You have the option of specifying a notification_url for each subscription created. These notification URL's can also be specified in Recurring Plans. If a subscription is linked to a notification_url, an HTTP POST request will be sent to this URL when any of the following actions occur:

  • Charge (posted as: "charge")
  • New Recurring (posted as: "new_recurring")
  • Recurring Charge (posted as: "recurring_charge")
  • Recurring Expiration (posted as: "recurring_expire")
  • Recurring Cancellation (posted as: "recurring_cancel")
  • Recurring to Expire in a Week (posted as: "recurring_expiring_in_week")
  • Recurring to Expire in a Month (posted as: "recurring_expiring_in_month")
  • Recurring to Autocharge in a Week (posted as: "recurring_autorecur_in_week")
  • Recurring to Autocharge in a Month (posted as: "recurring_autorecur_in_month")
  • New Customer (posted as: "new_customer")

Each HTTP POST request will include the following variables:

  • "action" - The action that tripped the notification (one from the list above).
  • "client_id" - Your client ID.
  • "secret_key" - Your API secret key.
  • "plan_id" - The ID of the plan.
  • "customer_id" - The ID of the customer.
  • "recurring_id" - The ID of the recurring subscription.
  • "charge_id" - The ID of the specific charge, if the event relates to a charge.

Method: Recur

A Recur request creates a subscription via a payment gateway. One makes a request of this type to charge a credit card at a consistent interval.

All individual charges for a recurring subscription are stored in the charges database and returned in GetCharge and GetCharges requests. These request will return a recurring_id - the ID of the recurring payment scheme that generated the individual charge.

Recur requests can be linked to customers via either a customer_id or an embedded customer node embedded within this request to the API. For more information on embedding customer data in a Recur request, see the customers page. If neither a customer_id or customer node are included in the request, a customer record will be created automatically from the included credit_card > name variable. Because of this procedure, all recurring charges are linked to a customer record.

How to charge a different fee for the first interval (e.g. charge $2.99 up-front but $9.99 per month afterwards):
To charge a different fee for the first interval than subsequent intervals, specify a different value for the parent amount parameter. Then, if you aren't using a plan, specify the recurring fee in recur > amount. If you are using a plan, the latter parameter is not required.

How to add a free recurring charge to an account (e.g., to link a customer to a plan):
Pass amount and recur > amount as "0". Complete dummy credit card information with "0000000000000000" as the credit card number and any future expire date. Your gateway will not be passed this charge.

Request data:

Variable Type Required Format/Example
amount money yes e.g. "45.67". This amount is charged upon creation of the subscription. This price will be charged for the first recurring interval.
coupon string A coupon code that relates to a coupon in the database (e.g., "TEST123"). If the coupon code is invalid, it will be ignored.
credit_card node yes All credit card sub-nodes must be included with accurate credit card information regarding the purchaser.
card_num int yes The purchaser's credit card number, e.g. "1234567809876543".
name string yes The purchaser's name. This must match the name on the credit card.
exp_month int yes The purchaser's credit card expiry month with 2-digit representation, e.g. "10".
exp_year int yes The purchaser's credit card expiry year with 2-digit representation, e.g. "14".
cvv int yes The purchaser's credit card CVV2/security number. It's required for any card where it is available. If not available on the card, send this parameter as empty.
gateway_id int The system ID for the payment gateway used for the charge. If left empty, the default/only gateway will be used.
customer_id int The ID of the customer to link the charge to, e.g. "4". Only include this parameter if you are not embedding customer information below. Charges do not need to be linked to a customer.
customer node Include sub-nodes with any/all available customer data. For more information, see the "Embedding customer data in Charge/Recur requests" on the customers page. Only include this parameter if you are not including a customer_id. Charges do not need to be linked to a customer.
customer_ip_address string You can optionally send the purchaser's IP address.
renew int If an existing "recurring_id" is passed in this parameter, expiration notices/POSTS will not be sent for the old subscription, because we know that this new subscription is renewing it.
recur node yes The "recur" node specifies the characteristics of this subscription payment.
plan_id int To use a set of pre-determined and shared characteristics for a subscription payment, it can be linked to a plan_id. This gives the added ability to check which plans a customer is currently subscribed to with GetCustomer, or pull all customers who are currently subscribed to a plan with GetCustomers and the optional plan_id filter.

If a plan_id is given, no other parameters are required in the recur node. However, if you pass any other parameters, they will override the plan's default values. For example, passing an amount parameter in the recur node will change the subscription fee altogether.
interval int Required if no plan_id is passed. The interval is the number of days between subscription payments. For example, a monthly subscription could be represented as an interval of "30" or "31".
amount money The amount to charge the user every "interval" days. If not included in the request, it will default to the plan's amount (if a plan_id is passed) and, if not linked to plan, the main amount parameter will be used.
free_trial int The number of days to wait before charging the first subscription payment. If passed, this will override the start_date value.
occurrences int The total number of times to charge the user (inclusive of the first charge).
start_date shortdate This is the date at which you would like to start the subscription payments. It will override the start_date automatically created by a free_trial, if given.
end_date shortdate The date at which this recurring charge will never be charged again to the customer. If passed, this will override the occurrences value.

Response data:

  • response_code - "100" upon success, "2" upon failure.
  • response_text - A verbose description of the response_code.
  • recurring_id - The ID of the recurring charge.
  • charge_id - The ID of the charge record, if the a charge was made immediately. Recurring charges are only delayed if a start_date after today is passed or if a free_trial value is set.
  • customer_id - The ID of the new customer created and linked to the recurring charge. This is only returned if a customer_id was not passed in the request (and thus a new customer record was created).
  • amount - The amount of the initial charge, useful for coupon-adjusted requests.
  • recur_amount - The amount of the recurring charge.
  • free_trial - The number of days prior to the start of the subscription.
  • start_date - The start date of the subscription.

Method: UpdateCreditCard

Updates the credit card associated with a subscription.

Required data:

  • recurring_id
  • credit_card
    • card_num
    • name
    • exp_month
    • exp_year
    • cvv (optional)

Optional data:

  • plan_id

Response data:

  • response_code - "104" upon success, "105" upon failure.
  • response_text - A verbose description of the response_code.
  • recurring_id - The ID of the NEW recurring charge. OpenGateway creates a new subscription from this new data.

Method: GetRecurring

Retrieves available information about a recurring charge.

Required data:

  • recurring_id - The ID of the recurring charge.

Response data:

Variable Type Required Format/Example
id automatic 123456789
gateway_id int The system ID for the payment gateway used for each charge related to this recurring charge.
date_created shortdate The date that the recurring charge was created.
amount money yes The amount of the recurring charge, e.g. "45.67"
interval int The number of days between subscription charges.
start_date shortdate The start date of the subscription.
end_date shortdate The date at which this subscription will not be charged again.
next_charge_date shortdate The date that the next subscription payment will be made.
number_occurrences int The number of times that the "amount" will be charged to the customer, inclusive of the first payment.
notification_url string The URL at which notifications will be posted to. Empty if no URL is set.
status int Either "active" or "inactive", depending on if the subscription is ongoing or completed/cancelled.
customer node A node containing all available customer information for the customer linked to this recurring charge.
id automatic 123456789
internal_id string A username or user ID in your own records, e.g. "fakeusername", "98765432".
first_name string yes Joe
last_name string yes Smith
address_1 string 12345 Fake St.
address_2 string For apartment/unit/suite #'s, eg. "Unit 2".
city string Toronto
state string The state/province/region of the customer, eg. "ON".
country country The ISO 3166-1 alpha-2 code of the customer's country, e.g. "CA", "US".
postal_code string The zip or postal code of the user, e.g. "A1B2C3", "90210".
email email A valid email address for the customer.
phone string 1-555-555-0000
date_created date The date the customer record was created, e.g. 2009-05-29 04:44:04
plan node If this recurring charge is linked to a Recurring Plan, the plan information is returned in a node.
id int The ID of the linked plan.
type string Either "free" or "paid" depending on the price of the subscription.
name string The name of the recurring plan.
amount money The amount charged at each interval.
interval int The number of days between each individual charge for the recurring charge.
notification_url string The URL to POST notifications to for recurring charges of this plan type.

Method: GetRecurrings

Returns records of recurring charges, with optional filters. If a request is made without any filters, the latest created 100 active recurring charges are returned.

Optional filters:

  • id
  • gateway_id
  • customer_id
  • customer_last_name
  • customer_internal_id
  • created_before - A date in the format of date.
  • created_after - A date in the format of date.
  • amount - Only pull recurring charges that charge this amount.
  • active - Set to "0" to retrieve inactive recurring charges. Default: "1" (only active recurring charges).
  • plan_id - Only retrieve recurring charges linked to this plan.
  • offset - Retrieval will begin after offset # of records. Useful for pagination. Default: 0.
  • limit - The total number of records to retrieve, beginning at the offset. Maximum: 100. Default: 100.
  • sort - The field on which to sort retrieved records. Default: "date". Available values:
    • customer_first_name
    • customer_last_name
    • date (the date the recurring charge was created)
    • amount
  • sort_dir - The direction in which to sort retrieved records. Default: "desc". Can also be "asc".

Response data:

  • results - Number of records in this response
  • total_results - Total # of records to retrieve. Use offset to gather all records over multiple iterated requests.
  • recurrings
    • A recurring node for each returned recurring charge
      • All data available for the recurring charge, in the format of GetRecurring.

Method: ChangeRecurringPlan

Change the plan of a recurring charge. This will update the interval, amount, notification_url, and plan_id of the recurring charge. It will not affect the start_date, end_date, date_created, or total_occurrences.

Required data:

  • recurring_id - The ID of the recurring charge.
  • plan_id - The ID of the new plan to link the recurring charge too.

Response data:

  • recurring_id - The ID of the updated recurring charge.

Method: UpdateRecurring

Updates a recurring charge.

Required data:

  • recurring_id

Optional data that can be updated:

  • recurring_id
  • customer_id
  • notification_url
  • amount
  • recur
    • interval

Method: CancelRecurring

Cancels an active recurring charge.

Required data:

  • recurring_id

General Reference

  • Data Types

  • Glossary

  • Troubleshooting

  • Error Codes

  • The system attempts to generate helpful error codes that help you fix/improve your application. A comprehensive list of all error codes is below:

    Code Text
    1000 Invalid request.
    1001 Unable to authenticate.
    1002 Invalid request type.
    1004 Required fields are missing for this request
    1005 Gateway type is required.
    1006 Invalid format passed. Acceptable formats: xml, php, and json.
    1007 Invalid country.
    1008 Invalid email address
    1010 A secure SSL connection is required.
    1009 Unspecified error in request.
    1011 Invalid timezone.
    1012 For USA and Canada addresses, a valid 2-letter state/province abbreviation is required.
    2000 Client is not authorized to create new clients.
    2001 Invalid External API.
    2002 Username is already in use.
    2003 Password must contain only letters and numbers and be greater than 5 characters in length.
    2004 Invalid client ID.
    2005 Error contacting payment gateway.
    2006 Only administrators can create new Service Provider accounts.
    2007 Invalid client_type.
    3000 Invalid gateway ID for this client.
    3001 Gateway ID is required.
    3002 Client ID is required.
    4000 Invalid customer ID.
    4001 Invalid charge ID.
    5000 A valid Recurring ID is required.
    5001 Start date cannot be in the past.
    5002 End date cannot be in the past
    5003 End date must be later than start date.
    5004 A customer ID or cardholder name must be supplied.
    5005 Error creating customer profile.
    5006 Error creating customer payment profile.
    5007 Dates must be valid and in YYYY-MM-DD format.
    5008 Invalid credit card number
    5009 Invalid amount.
    5010 Recurring details are required.
    5011 Invalid interval.
    5012 A valid description is required.
    5013 This transaction requires a billing address. If no customer ID is supplied, first_name, last_name, address_1, city, state, postal_code, and country are required as part of the customer parameter.
    5014 Error cancelling subscription
    5015 You cannot modify the plan_id via UpdateRecurring. You must use ChangeRecurringPlan to upgrade or downgrade a recurring charge.
    5016 Recurring billings cannot be updated for this gateway. You must cancel the existing subscription and create a new one.
    5017 Gateway is disabled.
    5018 This gateway requires customer information to be processed. Please include a customer_id of an existing customer or a customer node with new customer information in your request.
    5019 This gateway requires the purchasing customer's IP address. Please include a customer_ip_address node in your request.
    5020 This gateway does not allow refunds via the API.
    5021 Only active gateways can be updated with new credit card details.
    5022 This subscription is free - updating credit card details is futile.
    5023 The new gateway you have chosen requires customer information but this customer record currently doesn't exist. Please use UpdateCustomer to add full customer details for this user before calling UpdateCreditCard.
    6000 A valid Charge ID is required.
    6001 A valid Customer ID is required.
    6002 A valid Recurring ID is required
    6003 Nothing to update.
    6005 Error updating Recurring details.
    6006 A valid Plan ID is required.
    7000 Invalid plan type.
    7001 Invalid Plan ID.
    7002 Invalid Free Trial amount.
    7003 Invalid occurrences amount.
    8000 Invalid Email Trigger.
    8001 A valid Email ID is required.
    8002 Email body must be encoded.
  • Frequently Asked Questions

    • What is an API?

      An API, or Application Programming Interface, is a way for programmers to write software that communicates with other software. In this case, the Everpay API allows web developers to communicate with Elektropay to handle credit card payments across multiple gateways and websites. Everpay takes care of a lot of the hassle of web payments and thus makes web developers' lives easier.

      I'm still confused, who should I talk to?

      Any intermediate or advanced web developer should have experience with XML-based Web API's and thus have the knowledge to integrate Everpay into your website. Contact a web developer or Everpay Corp to find a developer for your project. Or, better yet, there may be a plugin already out there that harnesses the power of Everpay and integrates it with your website's platform (ie. no development fees!).

      Where do I find my API ID and Secret Key?

      You can view these in the control panel under Settings > API Access. They should be kept secure at all times.

      My Secret Key isn't secret anymore, what should I do?

      You should immediately regenerate your API access credentials in the control panel and update your plugin software to use these new credentials. Anyone attempting to access your account via the old credentials will not be able to. You should also update your account password as an added security measure.

      How do I know what format to send my requests in? Which variables are required?

      This API documentation contains a list of all API Methods and the request data that must be sent with them. Any non-required fields can be left out of the request. If you miss a field, you will receive an error.

      Most of the methods also include an example request to help you, though these often include non-required fields. Everpay is meant to be as simple as possible for programmers to use so look to see if the information you are sending is actually required.

  • PHP Examples

  • Javascript Examples