GenieCashBox GET/POST API
API OVERVIEW
API Link: https://geniecashbox.com/api/api.php
POST API Demo
API integration requires access to a server and knowledge of programming languages PHP, javascript, java, etc. Variables need to be set dynamically in html.
POST and GET methods are supported.
A Genie Number with GenieGateway is required.
Payment information is entered at the GenieCashBox server.
When a customer makes their first purchase they are provided a Genie Number in the form of 999-XXX-XXXX.
The email and phone numbers are tied to this number.
When the customer makes additional purchases they will be recognized by their Genie Number or email or phone number or cellphone number.
The gateway is the only required variable. All other variables are optional. If variables are provided fields will be auto filled.
If they are not provided, the customer will need to type in the information.
If Genie Number, phone number, cell phone or email are supplied and recognized as an existing customer the login page is automatically displayed.
A transaction is considered successful when one of the forms of payment is selected.
The transaction status is pending until the customer completes the steps required for the form of payment selected.
The returnURL is invoked when either the Cancel button or Finished button is selected.
Once a type of transaction has been selected, it is up to the customer to complete the process.
The transaction is "pending" until the funds are received or until the transaction is canceled by the customer or merchant.
SIGNUP
If the country value is not provided "Select Country" page is displayed.
If the country value is provided the first page displayed is the "Free Activation" page.
If values are provided they auto fill the activation page.
A Genie Number is created after completion of the activation page.
The phone number, cell phone and email are associated with the Genie Number.
Signup Example
PAY ONLINE
The pay on line is the same as the "Pay Online" of the gateway.
Pay Online Example
CHECK
Use the check action for the status of the transaction.
A transaction starts out as pending. When funds are are received the status changes to complete.
The customer or merchant can cancel the transaction before funds are received. The transaction is expired after 2 weeks.
The check action returns the results of the refcode supplied. Results are returned in
the returnURL or stdout.
If the transaction is completed the cashcode is returned.
If the returnURL is not supplied output will be stdout.
Check Example
Variables and Values
gateway
(required)
genie number or gateway number of the merchant
action
(optional)
action=signup : direct to signup page
action=pay : Main page
action=check : Check result
amount
(optional)
any float number
refcode
(optional)
Passed back as a variable in the returnURL. Displayed on payment page. Used for your reference.
ordernum
(optional)
Passed back as a variable in the returnURL. Not displayed on payment page. Used for your reference.
noitems
(optional)
Default is 1 if not provided.
description
(optional)
Displayed on payment page.
firstname
(optional)
Used for signup if provided.
lastname
(optional)
Used for signup if provided.
address1
(optional)
Used for signup if provided.
address2
(optional)
Used for signup if provided.
city
(optional)
Used for signup if provided.
state
(optional)
Used for signup if provided. Use 2 letter code for United States and Canada.
zip
(optional)
Used for signup if provided.
country
(optional)
Used for signup if provided. Use 2 letter ISO alpha-2 codes for country. If the country is supplied the select country page is skipped.
Get the codes by viewing the html source of the select country page.
phonenumber
(optional)
Used for signup if new customer. Used for Login if customer has already signed up.
cellphone
(optional)
Used for signup if new customer. Used for Login if customer has already signed up.
email
(optional)
Used for signup if new customer. Used for Login if customer has already signed up.
genienumber
(optional)
Used for login if provided.
returnURL
(optional)
This URL is called after transaction is completed or canceled. Used to return to your website and provide results.
Success example
- Variables -
action
same value as input
refcode
same value as input
ordernum
same value as input
status
The status of the transaction. Use check action to check change of status.
complete
pending
canceled
expired
ticket
Unique Ticket number of transaction.
fundtype
teller
mail
billpay
checking
cashcode
Cashcode of completed transaction
genienumber
Genie Number if exists.
resultcode
-1 = error
0 = success
1 = fail
2 = cancel
result
Error messages or the following:
if (resultcode == 0) results = 'success'
if (resultcode == 1) results = 'fail'
if (resultcode == 2) results = 'cancel'
if (resultcode == 3) results = 'error'