//php print_r($this); ?>
Contents |
General Information
The MosoPay Real-Time HTTPs Integration provides you with the proper procedures to integrate with the MosoPay processing gateway. It includes information on:
- Basic gateway operations (sale-auth, sale, credit-auth, credit, void/refund, capture, account verification, balance inquiry, convenience fee, increment, authentication, exception)
- Callbacks (decline, chargeback, reversal)
- Tokenization
- Settlement
- Gift Cards
- Reporting
- File Management
The connection URL is: http://[server-name]/gates/httpform
The callback URL for returns: must be provided by the merchant.
The submission type can be POST or GET
The content-type must be set to application/x-www-form-urlencoded when POST request is used.
Request fields are passed as HTTP request parameters and thus can be extracted as such (including cases with callbacks).
Response fields are passed within the body part of the HTTP response using name1=key1&name2=key2 (GET URL) format.
Supported Operations
The real-time transaction processing is implemented via SSL/HTTP. Integration occurs via standard HTTP requests. The protocol supports the following operations:
General
- Sale-Auth – Allows a merchant to withdraw specific amounts of money from the supplied credit card or bank account. Authorization requires an explicit confirmation operation in order for the money to be transferred; otherwise, an automatic void is issued.
- Sale – Sale, Authorization and Confirmation in a single process
- Void/Refund - an operation used to reverse a sale operation. See additional notes below.
- Credit-Auth - Allows a merchant to deposit (return) specific amounts of money to the supplied credit card or bank account. Credit-Auth requires an explicit capture operation in order for the money to be transferred; otherwise, an automatic void is to be used.
- Credit – Allows a merchant to deposit (return) specific amounts of money to the supplied credit card or bank account. The Credit operation doesn’t require confirmation by default, but can be reversed with an explicit void operation.
- Capture – Confirms a previously requested authorization.
- Authentication - Allows a merchant to generate temporary password to be used in requests associated with HPP.
- Balance Inquiry - Allows a merchant to verify balance on debit, prepaid and gift cards.
- Account Verification - Allows a merchant to verify that the account is active and perform AVS verification without actual authorization (0 dollar authorization).
- Exception – An error returned by the gateway.
- Convenience-Fee – An operation used to calculate a surcharge to the card holder to cover the cost of the credit card processing.
- Increment – An operation used to increase the authorization amount of already authorized transaction (to add payment for additional product or service).
Callbacks
- Reversal – A callback issued to the URL supplied by the merchant (see Callbacks below) to inform the merchant of a credit card chargeback that was previously reported, but is now reversed (money is given back to the merchant).
- Decline – A callback issued to the URL supplied by the merchant (see Callbacks below) to inform the merchant of an ACH decline.
- Chargeback – A callback issued to the URL supplied by the merchant (see Callbacks below) to inform merchant of credit card chargeback.
Tokeninzation
- Tokenization - Allows conversion of a credit card number or a bank account number into a PCI compliant token value.
- Detokenization - Allows conversion of PCI Compliant token value into a credit card number or a bank account number.
Reporting
- Export – Allows a merchant to load declines, chargebacks, and reversals over a specified time period.
- Find - Allows a merchant to find transactions by transaction code or reference number.
Settlement
- Close Cycle – Allows a merchant to close currently open retail cycle (batch) for a merchant account, send all captured transactions within the cycle for settlement and reverse any void transactions.
- Balance Inquiry Cycle – Allows a submitter to validate totals within a retail cycle before calling Close Cycle operation.
Gift/Loyalty Cards
- Activate - Allows a merchant to activate a gift card.
- Reactivate - Allows a merchant to reactivate a previously deactivated gift card.
- Deactivate - Allows a merchant to deactivate an active gift card.
- Transfer – Allows you to transfer a balance from one card to another card.
- Sale-Info – Allows you to supply information about a sale transaction that was processed outside of the gateway, but affects rewards balance of loyalty cards.
- Credit-Info – Allows you to supply information about a credit transaction, which was processed outside of the gateway, but affects rewards balance of loyalty cards.
File Management
- File-Upload – Allows a submitter to upload a batch file that follows the batch specification. See additional notes for more information.
- File-Status – Allows a submitter to get response status of a previously uploaded file or verify availability of the daily return file. See additional notes for more information.
- File-Download – Allows a submitter to download response file for a previously uploaded request file or download the daily return file. See additional notes for more information.
Miscellaneous
- Ping - Allows you to verify availability of the server and get the current version of the API.
The connection URL is: http://[server-name]/gates/httpform
The callback URL for returns:
- MUST be provided by the merchant
- The submission type can be POST or GET
- The content-type must be set to application/x-www-form-urlencoded when POST request is used.
Request fields are passed as HTTP request parameters and thus can be extracted as such (including cases with callbacks).
Response fields are passed within the body part of the HTTP response using name1=key1&name2=key2 (GET URL) format.
Tokenization (What is it?)
MosoPay provides a simple and convenient Tokenization mechanism for merchants that:
- Deal with recurring payments
- Want to avoid storing a customer’s or member's payment information (credit card and bank account numbers) within their own systems.
When a merchant uses any given credit card or bank account for the first time (as part of an authorization, sale, or credit operation), MosoPay will generate a unique identification number ("Token") associated with this payment information. If in the future, the merchant wants to issue another operation (e.g. another sale) on the same credit card or bank account, it is sufficient to pass to MosoPay just the value of the previously generated token and omit all of the account information fields.
Token Structure
A token generated by MosoPay is comprised of 3 logical parts:
- Two letter account type
- Tokenized account number
- Last 4 digits of the actual account number
This structure enables integrators to easily derive information needed for reporting or system maintenance from the token itself.
Account Types
VC - visa credit card VD - visa debit card MC - MasterCard credit card MD - MasterCard debit card AC - Amex credit card DC - Discover credit card DD - Discover Debit Card BC - Checking account BS - Savings account NC - Dinners credit card
Message Format
For a detailed listing of the Message Formats used in the MosoPay Real-Time HTTPs Integration, click the following link:
MosoPay Real-Time HTTPs Integration-Message Formatting
Examples (GET request)
Sale
Request:
requestType=sale&userName=myUsername&password=myPassword&merchantAccountCode=2001&transactionIndustryType=RE&amount=150&accountType=R&holderType=P&holderName=John+Smith&accountNumber=4111111111111111&accountAccessory=1212&street=12+Main+St&city=Denver&state=CO&zipCode=30301&customerAccountCode=0000000001&transactionCode=0000000001
key: requestType; value: sale key: userName; value: myUsername key: password; value: myPassword key: merchantAccountCode; value: 2001 key: transactionIndustryType; value: RE key: amount; value: 150 key: accountType; value: R key: holderType; value: P key: holderName; value: John Smith key: accountNumber; value: 4111111111111111 key: accountAccessory; value: 1212 key: street; value: 12 Main St key: city; value: Denver key: state; value: CO key: zipCode; value: 30301 key: customerAccountCode; value: 0000000001 key: transactionCode; value: 0000000001
Response:
responseType=sale&referenceNumber=30419&transactionDate=20101027&merchantAccountCode=2001&responseCode=A01&responseMessage=Approved&transactionCode=0000000001&avsResponseCode=N&processorCode=TAS326
key: responseType; value: sale key: referenceNumber; value: 30419 key: merchantAccountCode; value: 2001 key: transactionDate; value: 20101027 key: responseCode; value: A01 key: responseMessage; value: Approved key: transactionCode; value: 0000000001 key: avsResponseCode; value: N key: processorCode; value: TAS326
Sale (with Track Data)
Request:
requestType=sale&password=myPassword&userName=myUsername&amount=100&customerAccountCode=0000000001&transactionCode=0000000001&accountType=R&transactionIndustryType=RE&trackData=%25B5499740000000057%5EJohn+Smith1%5E08121011000+1111A123456789012%3F&merchantAccountCode=2001
key: customerAccountCode; value: 0000000001 key: transactionCode; value: 0000000001 key: accountType; value: R key: requestType; value: sale key: userName; value: myUsername key: password; value: myPassword key: merchantAccountCode; value: 2001 key: transactionIndustryType; value: RE key: amount; value: 100 key: accountType; value: R key: trackData; value: %B5499740000000057^John Smith1^08121011000 1111A123456789012? key: customerAccountCode; value: 0000000001 key: transactionCode; value: 0000000001
Response:
responseType=sale&referenceNumber=30419&merchantAccountCode=2001&responseCode=A01&responseMessage=Approved&transactionCode=0000000001&avsResponseCode=N&processorCode=TAS326
key: responseType; value: sale key: referenceNumber; value: 142 key: merchantAccountCode; value: 2001 key: transactionDate; value: 20110316 key: responseCode; value: A01 key: responseMessage; value: Approved key: transactionCode; value: 0000000001 key: avsResponseCode; value: key: processorCode; value: 123123 key: token; value: 8463214725461111
Credit
Request:
requestType=credit&userName=myUsername&password=myPassword&merchantAccountCode=2001&transactionIndustryType=RE&amount=150&accountType=R&holderType=P&holderName=John+Smith&accountNumber=4111111111111111&accountAccessory=1212&street=12+Main+St&city=Denver&state=CO&zipCode=30301&customerAccountCode=0000000001&transactionCode=0000000001
key: userName; value: myUsername key: password; value: myPassword key: merchantAccountCode; value: 2001 key: transactionIndustryType; value: RE key: amount; value: 150 key: accountType; value: R key: holderType; value: P key: holderName; value: John Smith key: accountNumber; value: 4111111111111111 key: accountAccessory; value: 1212 key: street; value: 12 Main St key: city; value: Denver key: state; value: CO key: zipCode; value: 30301 key: customerAccountCode; value: 0000000001 key: transactionCode; value: 0000000001
Response:
responseType=credit&referenceNumber=30420&transactionDate=20101027&merchantAccountCode=2001&responseCode=A02&responseMessage=Credit+Posted&transactionCode=0000000001&avsResponseCode=N
key: responseType; value: credit key: referenceNumber; value: 30420 key: merchantAccountCode; value: 2001 key: transactionDate; value: 20101027 key: responseCode; value: A02 key: responseMessage; value: Credit Posted key: transactionCode; value: 0000000001 key: avsResponseCode; value: N
Authorization
Request:
requestType=authorization&password=myPassword&userName=myUsername&street=12+Main+St&accountNumber=4111111111111111&accountType=R&transactionIndustryType=RE&amount=150&holderType=P&zipCode=30301&customerAccountCode=0000000001&holderName=John+Smith&transactionCode=0000000001&state=CO&merchantAccountCode=2001&accountAccessory=1212&city=Denver
key: requestType; value: authorization key: userName; value: myUsername key: password; value: myPassword key: merchantAccountCode; value: 2001 key: transactionIndustryType; value: RE key: transactionCode; value: 0000000001 key: amount; value: 150 key: holderType; value: P key: holderName; value: John Smith key: street; value: 12 Main St key: city; value: Denver key: state; value: CO key: zipCode; value: 30301 key: accountType; value: R key: accountNumber; value: 4111111111111111 key: accountAccessory; value: 1212 key: customerAccountCode; value: 0000000001
Response:
responseType=authorization&referenceNumber=50081&transactionDate=20101027&transactionCode=0000000001&avsResponseCode=N&responseMessage=Approved&responseCode=A01&processorCode=TAS408&merchantAccountCode=2001
key: responseType; value: authorization key: referenceNumber; value: 50081 key: transactionDate; value: 20101027 key: transactionCode; value: 0000000001 key: responseCode; value: A01 key: responseMessage; value: Approved key: processorCode; value: TAS408 key: avsResponseCode; value: N key: merchantAccountCode; value: 2001
Capture
Request:
requestType=capture&userName=myUsername&password=myPassword&referenceNumber=50081&merchantAccountCode=2001
key: requestType value: capture key: userName; value: myUsername key: password; value: myPassword key: referenceNumber; value: 50081 key: merchantAccountCode; value: 2001
Response:
responseType=capture&referenceNumber=50081&responseCode=A01&responseMessage=Approved&merchantAccountCode=2001
key: responseType; value: capture key: referenceNumber; value: 50081 key: responseCode; value: A01 key: responseMessage; value: Approved key: merchantAccountCode; value: 2001
Void
Request:
requestType=void&userName=myUsername&password=myPassword&referenceNumber=50083&merchantAccountCode=2001
key: requestType value: void key: userName; value: myUsername key: password; value: myPassword key: referenceNumber; value: 50083 key: merchantAccountCode; value: 2001
Response:
responseType=void&referenceNumber=50083&responseCode=A03&responseMessage=Void+Posted&merchantAccountCode=2001
key: responseType; value: void key: referenceNumber; value: 50083 key: responseCode; value: A03 key: responseMessage; value: Void Posted key: merchantAccountCode; value: 2001
Refund
Request:
requestType=refund&userName=myUsername&password=myPassword&referenceNumber=50083&merchantAccountCode=2001
key: requestType value: refund key: userName; value: myUsername key: password; value: myPassword key: referenceNumber; value: 50083 key: merchantAccountCode; value: 2001
Response:
responseType=refund&referenceNumber=50083&responseCode=A02&responseMessage=Credit+Posted&merchantAccountCode=2001
key: responseType; value: refund key: referenceNumber; value: 50083 key: responseCode; value: A02 key: responseMessage; value: Credit Posted key: merchantAccountCode; value: 2001
Tokenization
Request:
requestType=tokenization&userName=myUsername&password=myPassword&merchantAccountCode=2001&accountType=R&accountNumber=4111111111111111&accountAccessory=1212&transactionCode=0000000001
key: requestType; value: tokenization key: userName; value: myUsername key: password; value: myPassword key: merchantAccountCode; value: 2001 key: accountType; value: R key: accountNumber; value: 4111111111111111 key: accountAccessory; value: 1212 key: transactionCode; value: 0000000001
Response:
responseType=tokenization&merchantAccountCode=2001&transactionCode=0000000001&token=VC84632147254611111111
key: responseType; value: tokenization key: merchantAccountCode; value: 2001 key: transactionCode; value: 0000000001 key: token; value: VC84632147254611111111
Integration
Below is all of the information that you will need to test your integration with the gateway and to get certified with the gateway owner.
Test Cards & Bank Accounts
The following accounts will be accepted by the test server's validation mechanism and thus can be used for preliminary testing (they are also used as part of the certification process):
Card Type | Card Number | Expiration Date |
---|---|---|
Visa | 4111111111111111 | 1012 |
MasterCard | 5499740000000057 | 1012 |
Discover | 6011000991001201 | 1012 |
Amex | 371449635392376 | 1012 |
Bank Account Number | Routing Number | Account Type |
---|---|---|
4099999992 | 211370545 | Checking |
Certification Scenarios
Below are certification scenarios that you can use for testing. The specified field values must be included in the corresponding request fields. If integration is done correctly, you will get specified values in the corresponding response fields. If you use any account number not listed as Test account above, you are likely to get a validation error (unless you use a real account). If use any valid test account, but don't include all of the fields listed for any given certification scenario, you will get a D01 - Denied by customer's bank(Issuer Unavailable) decline.
When you are ready to get certified, you need to submit all of the certification scenarios below for review. For each review (even repeated ones) you must resubmit all scenarios. In the memo field of your request, you must include a unique submission identifier (formatted per rules below) that would identify all transactions to be included in this review. The same identifier value must appear on memo of every scenario to be reviewed. You may include other text in the memo field. When you request the certification team to review your submission, always include the submission identifier.
Submission identifier must consist of 4 parts:
- CER - constant string value
- Current Date - current date in YYYYMMDD format
- Sequence Number - sequence number of your submission today; initial value is 1, if you do more than 1 per day, the value gets incremented.
- ; (semicolon) - to indicate the end of the identifier
Sample Submission Identifier:
CER201012151; CER201012152; CER201012161;
Sale
Request | Response | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
# | Credit Card/Bank Account Number/Track Data | TokenCode | Amount (in cents) | Zip Code | CVV2 | Response Code | Response Message | Token Code | Processor Code | AVS Response Code | CVV2 Response Code |
1 | 4111111111111111 | 100 | 11111 | 111 | A01 | Approved | VC84632147254611111111 | 123456 | 00 | M | |
2 | 4111111111111111 | 101 | 11111 | D01 | Denied by customer's bank(Do Not Honor) | ||||||
3 | 4111111111111111 | 105 | 11111 | D05 | Invalid card number(Invalid Account Number) | ||||||
4 | 4111111111111111 | 108 | 11111 | D08 | CVV2 is invalid(Decline CVV2/CID Fail) | ||||||
5 | 4111111111111111 | 110 | 11111 | D10 | Card reported LOST(Lost/Stolen Card) | ||||||
6 | 4111111111111111 | 117 | 11111 | D17 | Re-enter Transaction(Resubmit Transaction) | ||||||
7 | 5499740000000057 | 100 | 22222 | A01 | Approved | MC32541698745800570057 | 325641 | 30 | |||
8 | 5499740000000057 | 104 | 22222 | D04 | Hold - Pick up card(Pick Up Card) | ||||||
9 | 5499740000000057 | 102 | 22222 | E02 | System is temporarily unavailable(Processing Network Unavailable) | ||||||
10 | 6011000991001201 | 100 | 33333 | A01 | Approved | DC65874123589012011201 | 852369 | 34 | |||
11 | 6011000991001201 | 101 | 33333 | D01 | Denied by customer's bank(Call Discover) | ||||||
12 | 371449635392376 | 100 | 44444 | A01 | Approved | AC2154873012123762376 | 123654 | 02 | |||
13 | 4099999992 | 100 | 55555 | A01 | Approved | BC111900000010030019992 | |||||
14 | VC84632147254611121112 | 100 | 66666 | A01 | Approved | VC84632147254611121112 | 101010 | 01 | |||
15 | VC84632147254611111111 | 101 | 11111 | D01 | Denied by customer's bank(Do Not Honor) | ||||||
16 | VC84632147254611111111 | 105 | 11111 | D05 | Invalid card number(Invalid Account Number) | ||||||
17 | VC84632147254611111111 | 108 | 11111 | D08 | CVV2 is invalid(Decline CVV2/CID Fail) | ||||||
18 | VC84632147254611111111 | 110 | 11111 | D10 | Card reported LOST(Lost/Stolen Card) | ||||||
19 | VC84632147254611111111 | 117 | 11111 | D17 | Re-enter Transaction(Resubmit Transaction) | ||||||
20 | MC32541698745800570057 | 104 | 22222 | D04 | Hold - Pick up card(Pick Up Card) | ||||||
21 | MC32541698745800570057 | 102 | 22222 | E02 | System is temporarily unavailable(Processing Network Unavailable) | ||||||
22 | DC65874123589012011201 | 101 | 33333 | D01 | Denied by customer's bank(Call Discover) | ||||||
23 | %B5499740000000057^Smith/John^13121011000 1111A123456789012? | 100 | A01 | Approved | MC32541698745800570057 | 123123 |
Void
Request | Response | ||
---|---|---|---|
# | Reference Number | Response Code | Response Message |
1 | Use value returned by Sale #1 | A03 | Void Posted |
2 | Use value returned by Sale #13 | A03 | Void Posted |
3 | Use value returned by Sale #14 | A03 | Void Posted |
Refund
Request | Response | ||
---|---|---|---|
# | Reference Number | Response Code | Response Message |
1 | Use value returned by Sale #7 | A02 | Credit Posted |
Credit
Request | Response | ||||||
---|---|---|---|---|---|---|---|
# | Credit Card/Bank Account Number | TokenCode | Amount (in cents) | Zip Code | Response Code | Response Message | Token Code |
1 | 4111111111111111 | 200 | 11111 | A02 | Credit Posted | VC84632147254611111111 | |
2 | 5499740000000057 | 200 | 22222 | A02 | Credit Posted | MC32541698745800570057 | |
3 | 6011000991001201 | 200 | 33333 | A02 | Credit Posted | DC65874123589012011201 | |
4 | 371449635392376 | 200 | 44444 | A02 | Credit Posted | AC2154873012123762376 | |
5 | 4099999992 | 200 | 55555 | A02 | Credit Posted | BC111900000010030019992 | |
6 | VC84632147254611121112 | 200 | 66666 | A02 | Credit Posted | VC84632147254611121112 |
Tokenization (optional)
Request | Response | |
---|---|---|
# | Credit Card/Bank Account Number | Token Code |
1 | 4111111111111111 | VC84632147254611111111 |
2 | 5499740000000057 | MC32541698745800570057 |
3 | 6011000991001201 | DC65874123589012011201 |
4 | 371449635392376 | AC2154873012123762376 |
5 | 4099999992 | BC111900000010030019992 |