Introduction
API Reference
The SecureMerchantBackup API is created around the idea of REST.
The API responds to CURL requests with form-encoded request bodies, and responds with JSON-encoded responses.
Authentication
Authentication with the SecureMerchant API is done using an API Key and an Authorization: Bearer header to send the API Key. Please contact support@securemerchantbackup.com for your API key!
cURL
curl --location --request POST 'https://API_URL/api/card-backup' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer API_KEY' \
Customer Object
The customer object represents the personally identifiable information about the customer making the transaction request.
Attribute | Type | Description |
---|---|---|
id | int | Reference ID # of the customer in the IncreaseBilling system |
string | Email Address of the customer | |
customer_identifier | string | Alternative to email, use this as a reference to a particular unique customer |
fname | string | First Name of the customer |
lname | string | Last Name of the customer |
phone | string | Phone # of the customer |
address1 | string | Street Address of the customer |
address2 | string | Secondary Address of the customer e.g. Apt. #, P.O. Box |
city | string | City of Residence of the customer |
state | string | State of Residence of the customer |
country | string | Country of Residence of the customer |
postal_code | string | Postal Code of the customer |
shipping_address1 | string | Street Address of the customer |
shipping_address2 | string | Secondary Address of the customer e.g. Apt. #, P.O. Box |
shipping_city | string | City of Residence of the customer |
shipping_state | string | State of Residence of the customer |
shipping_country | string | Country of Residence of the customer |
shipping_postal_code | string | Postal Code of the customer |
ip_address | string | IP Address of the customer |
Card Object
The order object represents the transaction details for the customer making the request. This is only used in the PHP client API to represent an order, however, all of the request variables directly translate to the cURL requests.
Attribute | Type | Description |
---|---|---|
cc_number | string | Card Number composed of 8 to 19 digits depending on the issuer |
cc_mo | string | Card Expiration month 01 to 12 |
cc_yr | string | Card Expiration year in the 4-digit format xxxx |
cc_cvv | string | Card Security code |
description | string | Order description, product description or any associated description of the transaction |
currency | string | The transaction currency, defaults to USD. Format: ISO 4217 |
cURL
curl --location --request POST 'https://API_URL/api/validate' --header 'Accept: application/json' --header 'Authorization: Bearer API_KEY' --form 'fname=""' \ --form 'lname=""' \ --form 'email=""' \ --form 'address1=""' \ --form 'city=""' \ --form 'state=""' \ --form 'country="US"' \ --form 'postal_code=""' \ --form 'shipping=""' \ --form 'cc_number=""' \ --form 'cc_mo=""' \ --form 'cc_yr=""' \ --form 'cc_ccv=""' \
Card Backup
This action is used for securely backing up card information.
Attribute | Type | Required | Description |
---|---|---|---|
string | * | Email Address of the customer (alternatively use customer_identifier) | |
customer_identifier | string | * | Unique customer identifier (alternatively use email) |
fname | string | First Name of the customer | |
lname | string | Last Name of the customer | |
address1 | string | Street Address of the customer | |
address2 | string | Secondary Address of the customer e.g. Apt. #, P.O. Box | |
city | string | City of Residence of the customer | |
state | string | State of Residence of the customer | |
country | string | Country of Residence of the customer | |
postal_code | string | Postal Code of the customer | |
phone | string | Phone # of the customer | |
cc_number | string | Card Number composed of 8 to 19 digits depending on the issuer | |
cc_mo | string | Card Expiration month 01 to 12 | |
cc_yr | string | Card Expiration year in the 4-digit format xxxx | |
cc_cvv | string | Card Security code |
cURL
curl --location --request POST 'https://securemerchantbackup.com/api/card-backup' --header 'Accept: application/json' --header 'Authorization: Bearer API_KEY' --form 'fname=""' \ --form 'lname=""' \ --form 'email=""' \ --form 'address1=""' \ --form 'city=""' \ --form 'state=""' \ --form 'country="US"' \ --form 'postal_code=""' \ --form 'shipping=""' \ --form 'cc_number=""' \ --form 'cc_mo=""' \ --form 'cc_yr=""' \ --form 'cc_ccv=""' \
Checkout JS
Not PCI Compliant? Use our Card Tokenizing javascript and card information will never hit your server. Simply include the script, add 3 canned HTML snippets, and we'll take care of the rest including styling the card info inputs, and data validation.
Getting Started
1. Copy-paste the script link from your members's area Checkout JS menu link, it looks like this:
2. Add tags to your checkout page which we'll use to collect the card info:
3. Configure the script tag, replacing data-tokenization-key with the key and data-url API URL found in your IncreaseBilling site.
4. Add id="payToken" to your checkout button
When you POST the form, you'll see a 'payment_token' field which you can use to process a sale with, rather than the Card info.
Advanced Script Options
data-bootstrap: If you're using Bootstrap we'll add form-control classes to the inputs
data-fail-message: Customize a server side failure message, these are rare, but just in case you get an empty response from the API, we'll show this error message.