mycropay® application programming interface - XML (MAPI-XML) provides merchants the ability to process real-time transactions through the Internet. MAPI-XML gateway processes XML requests sent using HTTP protocol over SSL (Secure Sockets Layer technology which is used to encrypt confidential transactions) connections (HTTPS). MAPI-XML supports SSL 3.0 and below, both 128-bit and 40-bit clients.
To use MAPI-XML, merchant software should connect to https://www.mycropay.net/ipg/Ipg Connections have to be made using port 443, the standard port for HTTPS.
NOTE: Connecting to the gateway's numeric IP address directly will cause SSL error messages.
To confirm that MAPI-XML gateway is up and responding to requests, https://www.mycropay.net/ipg/Ipg may be checked using an Internet browser.
Transaction Session
The XML-based Internet Payment Markup Language (IPML) request is sent to the https://www.mycropay.net/ipg/Ipg URL in a form of HTTP GET or HTTP POST transaction.
HTTP GET request: https://www.mycropay.net/ipg/Ipg?IPML_request_string
(IPML_request_string must be URL-encoded)
HTTP POST request: the content type of the request should be "text/xml".
IPML_request_string is sent as a body of HTTP POST message.
IPML Request Request must start with <?xml version="1.0" encoding="UTF-8" ?> XML header
followed by <transaction ...> ... </transaction> top-level element.
Elements (see Table 1):
- <transaction type='type' id_code='id_code' crypt_key='crypt_key' password='password' host='host' port='port' get_enhanced_response='Y'>
<transaction ...> is the first tag in the request after the <?xml ….> header. Request is closed by the </transaction> tag.
Attributes:
type - transaction type (see Table 2)
id_code - merchant's ID code
crypt_key - merchant's encryption key
password - merchant's password
host - IP address of MAPI host
port - MAPI service port
get_enhanced_response - to provide enhanced response
- <card>credit_card_number</card>
credit_card_number - credit card number
- <cvv2>cvv2</cvv2>
cvv2 - credit card verification value/code
- <expiration>credit_card_expiration_date</expiration>
credit_card_expiration_date - credit card expiration date
- <amount>amount</amount>
amount - charge or credit amount in cents
- <r_flag>r_flag</r_flag>
r_flag - type of recurrence for charge
Values
S = single
I = initial
R = recurring
- <reference>reference</reference>
reference - reference string provided by the merchant
- <tracking>tracking_number</tracking>
tracking_number - tracking number of the previous open transaction
- <frequency>frequency_code</frequency>
frequency_code - code for frequency of recurring charges (see Table 3)
- <first_charge>date_of_first_recurring_charge</first_charge>
date_of_first_recurring_charge - date of first recurring charge
- <charge_num>number_of_recurring_charges</charge_num>
number_of_recurring_charges - number of recurring charges
- <memo>comment_string</memo>
comment_string - user-defined comment string for recurring charges
- <first_name>first_name</first_name>
first_name - first name as it appears on a credit card
- <last_name>last_name</last_name>
last_name - last name as it appears on a credit card
- <address1>address_line_1</address1>
address_line_1 - credit card billing address, first line
- <address2>address_line_2</address2>
address_line_2 - credit card billing address, second line
- <address>address</address>
address - bank account address as it appears on a statement
- <city>city</city>
city - billing or bank account address, city
- <state>state</state>
state - billing or bank account address, state
- <zip>zip</zip>
zip - billing or bank account address, ZIP
- <country>country</country>
country - billing or bank acount address, country
- <check type='check_type'> check_number</check>
check_type - type of the check
check_number - check number
- <routing>routing_number</routing>
routing_number - bank routing number
- <account_no>account_number</account_no>
account_number - check account number
- <company>company_name</company>
company_name - company name (for business accounts only)
- <phone>phone_number</phone>
phone_number - check holder's phone number
- <dl>driver's_license</dl>
driver's_license - check holder's driver's license
- <dl_state>driver's_license_state</dl_state>
driver's_license_state - driver's license state
- <dob>date_of_birth</dob>
date_of_birth - check holder's date of birth
IPML Response Response starts with <?xml version="1.0" encoding="UTF-8" ?> XML header followed by <response> ... </response> top-level element.
Elements:
- <response state='state'>
<response ...> is the first tag in the response after the <?xml ….> header. Response is closed by the </response> tag.
state - state of transaction: 0 - succeed, 10 - processing error
- <code>response_code</code>
- <tracking>transaction_tracking_number</tracking>
- <reference>reference</reference>
- <processor_response_detail>respose_detail</processor_response_detail>
- <efalcon_score>efalcon_score</efalcon_score>
- <approval_code>approval_code</approval_code>
- <error>error_explanation</error>
Table 1, IPML Request Elements
Table 1. IPML Request Elements
| Element |
Length |
Format |
Transaction Type |
Req |
Contents |
Comments |
| type |
1 |
A |
All |
R |
Transaction type |
O / S / B / C / V / R / A / U (see Table 2) |
| id_code |
10 |
N |
All |
R |
ID Code |
Merchant ID assigned by mycropay® |
| crypt_key |
8 - 20 |
A/N |
All |
R |
Encryption Key |
Encryption key assigned by mycropay® |
| password |
4 - 20 |
A/N |
All |
R |
Password |
Password assigned by mycropay® |
| host |
7 - 15 |
A/N |
All |
R |
Host IP address |
IP address (xxx.xxx.xxx.xxx) provided by mycropay® |
| port |
1 - 5 |
N |
All |
R |
Service port number |
MAPI service TCP/IP port number provided by mycropay® |
| card |
1 - 16 |
N |
OSBCVR |
R |
Credit card number |
Digits only, no blanks |
| cvv2 |
3 |
N |
OSBCVR |
O |
Credit card verification value/code |
Click here for more details on CVV2. |
| expiration |
4 |
N |
OSBCVR |
R |
Credit card expiration date |
Digits only - MMYY |
| amount |
1 - 10 |
N |
OSBCVR |
R |
Transaction amount |
Charge or credit amount in cents, no decimal point |
| r_flag |
|
|
|
|
Recurring Flag |
S=single, I=initial, R=recurring |
| reference |
0 - 10 |
A/N |
OSBCVR |
O |
Reference |
Reference string provided by the merchant |
| tracking |
10 |
N |
SCVU |
R |
Tracking number |
A tracking number of the previous open transaction.
Required for transactions of type 'S', 'C', 'V', or 'U'.
MAPI-XML provides a tracking number for each transaction in the response message. |
| frequency |
1 |
A |
R |
R |
Recurring frequency |
O / W / B / M / T / Q / S / A (see Table 3) |
| first_charge |
8 |
N |
R |
R |
First charge date |
Date of first recurring charge - YYYYMMDD |
| charge_num |
0 - 4 |
N |
R |
O |
Number of recurring charges |
No limit if empty |
| memo |
0 - 125 |
A/N |
R |
R |
Memo |
User-defined comment string |
| first_name |
0 - 40 |
A/N |
OSBCVRA |
C |
First name |
Holder's first name and initial |
| last_name |
0 - 40 |
A/N |
OSBCVRA |
C |
Last name |
Holder's last name |
| address1 |
0 - 40 |
A/N |
OSBCVR |
O |
Address - 1st line |
Credit card billing address - first line |
| address2 |
0 - 40 |
A/N |
OSBCVR |
O |
Address - 2nd line |
Credit card billing address - second line |
| address |
0 - 48 |
A/N |
A |
R |
Address |
Check holder's address |
| city |
0 - 25 |
A/N |
OSBCVRA |
C |
City |
|
| state |
0, 2 |
A |
OSBCVRA |
C |
State |
|
| zip |
0, 5, 9 |
N |
OSBCVRA |
C |
ZIP |
U.S. Zip or Postal Code (5 digits - left justified) |
| country |
0 - 25 |
A |
OSBCVR |
O |
Country |
|
| check type |
1 |
A |
A |
R |
Check type |
Type of the check: P - personal, C - company |
| check number |
1 - 6 |
N |
A |
R |
Check number |
|
| routing |
9 |
N |
A |
R |
Bank routing number |
|
| account_no |
1-18 |
A/N |
A |
R |
Check account number |
|
| company |
1 - 40 |
A/N |
A |
O |
Company name |
For business accounts only |
| phone |
10 |
N |
A |
R |
Phone |
Check holder's phone |
| dl |
1 - 30 |
A/N |
A |
R |
Driver's license |
Check holder's driver's license |
| dl_state |
2 |
A |
A |
R |
Driver's license state |
Check holder's driver's license state |
| dob |
8 |
N |
A |
R |
Date of birth |
Check holder's date of birth - MMDDYYYY |
| descriptor |
35 |
A/N |
? |
? |
Billing description in FDR format |
Click here for formatting information |
| email |
0 - 40 |
A/N |
? |
? |
E-mail address |
|
| currency |
4 |
A |
? |
O |
MAPI specific code |
Click here for examples of currency abbreviations |
Format: A - alpha, N - numeric, A/N - alpha-numeric
Req: R - required, O - optional, C - optional for credit card and required for ACH
Table 2. Transaction types
| Type |
Description |
| O |
Credit card authorization |
| S |
Credit card post-authorization |
| B |
Credit card sale |
| C |
Credit card credit |
| V |
Void settled credit card sale |
| R |
Recurring credit card or check charges |
| A |
Check (ACH) sale |
| U |
Credit card authorization reversal |
|
Table 3. Frequency codes
| Code |
Description |
| O |
One-time |
| W |
Weekly |
| B |
Bi-weekly |
| M |
Monthly |
| T |
Bi-monthly |
| Q |
Quarterly |
| S |
Semi-annually |
| A |
Annually |
|
|