Difference between revisions of "JSON API Documentation"
(→Sample Working JSON) |
(→Request) |
||
Line 22: | Line 22: | ||
==Request== | ==Request== | ||
− | POST to URL: <code>https:// | + | POST to URL: <code>https://testlink.c9pg.com:11911/restApi</code> |
===Sale=== | ===Sale=== | ||
<code> | <code> | ||
− | { | + | {<br> |
− | <br>"GMID": " | + | "GMID": "1110222484", |
− | + | "GTID": "GT1120095178", | |
− | + | "GMPW": "GMPW3010300378", | |
− | + | "TransType": "Sale", | |
− | + | "Medium": "Credit", | |
− | + | "AccountNum": "4788250000028291", | |
− | + | "ExpDate": "1222", | |
− | + | "MainAmt": "1001", | |
− | + | "TipAmt": "212", | |
− | + | "IncTaxAmt": "153", | |
− | + | "EntryMode": "Manual", | |
− | + | "NeedSwipeCard": "N" | |
− | |||
− | |||
− | |||
} | } | ||
<br>} | <br>} | ||
Line 50: | Line 47: | ||
<code> | <code> | ||
{<br> | {<br> | ||
− | + | ||
− | + | "GMID": "1110222484", | |
− | + | "GTID": "GT1120095178", | |
− | + | "GMPW": "GMPW3010300378", | |
− | + | "TransType": "Verify", | |
− | + | "Medium": "Credit", | |
− | + | "AccountNum": "4788250000028291", | |
− | + | "ExpDate": "1222", | |
− | + | "MainAmt": "0", | |
− | + | "EntryMode": "Manual", | |
− | + | "CardPresent": "N" | |
− | + | <br>} | |
− | |||
</code> | </code> | ||
Revision as of 09:00, 10 October 2019
Cloud9 Payment Gateway Documentation. This site can also be reached at http://docs.cloud9paymentgateway.com
Contents
ALL API is COPYRIGHT by 911 Software, INC 2019
API DOCUMENTATION
See below for a good intro to the API with some examples.
C9PG Portal Access
Please contact us to get access to the portal for the above Sandbox
Sample Working JSON
You can try out the examples below, using a free testing tool, such as Postman
Request
POST to URL: https://testlink.c9pg.com:11911/restApi
Sale
{
"GMID": "1110222484", "GTID": "GT1120095178", "GMPW": "GMPW3010300378", "TransType": "Sale", "Medium": "Credit", "AccountNum": "4788250000028291", "ExpDate": "1222", "MainAmt": "1001", "TipAmt": "212", "IncTaxAmt": "153", "EntryMode": "Manual", "NeedSwipeCard": "N"
}
}
or another example of request:
Card Authentication (Verify)
{
"GMID": "1110222484", "GTID": "GT1120095178", "GMPW": "GMPW3010300378", "TransType": "Verify", "Medium": "Credit", "AccountNum": "4788250000028291", "ExpDate": "1222", "MainAmt": "0", "EntryMode": "Manual", "CardPresent": "N"
}
Response
You will receive an appropriate response in JSON format
{"AVSResultCode":"Y","AccountNum":"478825******8291","AuthAmt":"312","AuthCode":"TAS246","AuthDate":"20190514","AuthTime":"164509","Brand":"Visa","CVVResultCode":"M","EntryMode":"Manual","ErrorCode":"000","ErrorText":"EXACT MATCH ","ExpDate":"1222","GMID":"1511093260","GMPW":"GMPW3010024515","GTID":"GT1521035963","GTRC":"02c30bb676f14418876666bda2691be9","Medium":"Credit","MerchantAddr":"265 S Federal Hwy","MerchantCity":"Deerfield Beach","MerchantName":"Main Profit Center","MerchantPhoneNum":"5613929606","MerchantState":"Florida","MerchantZip":"33441","NewRecordCreated":"Y","ProcessorID":"40203","ResponseCode":"00","ResponseText":"EXACT MATCH ","ResultCode":"000","ResultText":"EXACT MATCH ","Status":"success","TipAmt":"212","TransType":"Sale","TransactionIdentifier":"000000000198667","SESSIONID":"Web{15173afe-5013-4df8-b74c-ec450155ba75}_1557866709305"}
Test Cards and Amounts
Aside from the example above, only specific account numbers, AVS, CVV and amounts will result in approvals
Please, see TSYS Test Account
Elements
The library has two basic elements:
- Connection
- Client can either connect directly to
a)Cloud9 Server Payment Web Controller (PWC) - this is a good option is local hardware payment terminals are not used
b)Local Payment Device Controller (PDC), which controls the payment terminal. - Name/Value Pair
Connection Types
- Payment Device Controller (PDC) Connection:Connects to the local device driver - wss://localhost:5556/
Advantage: Offline Store & Forward Capability
Disadvantage: Needs local software install - Web Based Payment Device Controller (PWC):Connects directly to the Cloud9 server - https://testlink.c9pg.com:5558/hj
Advantage: No local software required, unlimited cross platform capability
Disadvantage: No Offline Store & Forward Capability
Basic Transaction
{ // REQUEST
"GMID":"10XXXXXX50", // Gateway Merchant ID "GTID":"GTXXXXXXX53", // Gateway Terminal ID "GMPW":"XXX", // Gateway Password "TransType":"Auth", // Transaction Type "Medium":"Credit", // Transaction Medium (Credit=Credit Card) "MainAmt":"123", // Amount "IncTaxAmt":"56", // Tax Amount "SourceTraceNum":"123456" // Trace Number
}
{ // RESPONSE
"Status": "success", // Response Status "ResponseCode": "00", // Response Code "AuthCode": "12345A" // Authorization Approval Code
}
Core Key Names / Commands
Value | Explanation |
---|---|
GMID | Gateway Merchant ID |
GTID | Gateway Terminal ID |
GMPW | Gateway Account Password |
TransType | Transaction Type |
Medium | Transaction Medium (e.g. Credit Card/Debit Card/etc) |
MainAmt | Main Transaction Amount |
IncTaxAmt | Tax Amount |
SourceTraceNum | Merchant Transaction Trace Number |
IncTaxAmt | Tax Amount |
InvoiceNum | Invoice Number |
OrderNum | Order Number |
VoucherNum | Voucher Number |
AdditionalInfo | Additional Transaction Info |
AccountNum | Account Number (optional - only needed if PDC is not used to control the payment terminal) |
ExpDate | Expiration Date (optional - only needed if PDC is not used to control the payment terminal) |
Track1 | Track1 of Card (optional - only needed if PDC is not used to control the payment terminal) |
Track2 | Track2 of Card (optional - only needed if PDC is not used to control the payment terminal) |
PinData | Pin Data for Debit (optional - only needed if PDC is not used to control the payment terminal) |
CardPresent | Sets the Card Present Indicator (optional) |
EntryMode (optional) | Entry Mode |
Core Values
TransType - Transaction Type Command
Value | Explanation |
---|---|
Auth | Authorization. Authorization is a non-finalized transaction that is used in a tip environment. Add tip to finalize. Only finalized transactions are batched/settled |
Sale | Sale. Sale is a finalized transaction that will be included in the next batch/settlement |
AddTip | Adds Tip to an Auth, finalizing it and getting it ready to be batched/settled |
Modify | Modifies a transaction, also finalizing it and getting it ready to be batched/settled |
Finalize | Finalizes Authorization and turns then into Sale, getting it ready to be batched/settled |
Void | Voids a transaction |
Refund | Refunds a transaction |
Inquiry | Debit, Credit or Gift Card Card Balance Inquiry |
Activate | Activate a Gift Card |
AddValue | Add Value to a Gift Card |
Deactivate | Deactivate a Gift Card |
Medium - Processing Medium Command
Value | Explanation |
---|---|
Credit | Credit Card |
Debit | Debit Card |
Gift | Prepaid |
Prepaid | Prepaid Card |
EBTCash | EBT Cash |
EBTFood | EBT Food |
Boolean Values
Value | Explanation |
---|---|
Y | True or Yes |
N | False or No |
From the makers of Cloud9 Payment Processing Gateway and Creditline Credit Card Processing Software