Difference between revisions of "JSON API Documentation"
(→Live Sample Companion) |
|||
Line 176: | Line 176: | ||
[[image:cloud9api.jpg|none|thumb|750px|API Sample Screenshot|link=http://cloud9paymentgateway.com/files/API/samples|Sample]]<br> | [[image:cloud9api.jpg|none|thumb|750px|API Sample Screenshot|link=http://cloud9paymentgateway.com/files/API/samples|Sample]]<br> | ||
− | = | + | =SOAP= |
− | + | Here is an example of SOAP Request and Response | |
− | + | <code> | |
− | < | + | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" |
− | < | + | xmlns:sof="http://www.911software.com/"> |
− | + | <soapenv:Header/> | |
− | = | + | <soapenv:Body> |
− | → ''' Please, see [http://cloud9paymentgateway.com/docs/API | + | <sof:Request> |
+ | <Request> | ||
+ | <Config> | ||
+ | <GMID>03</GMID> | ||
+ | <GTID>03</GTID> | ||
+ | <GMPW>03</GMPW> | ||
+ | <AllowsPartialAuth>N</AllowsPartialAuth> | ||
+ | </Config> | ||
+ | <Action> | ||
+ | <TransType>Void</TransType> | ||
+ | <IsOffline>N</IsOffline> | ||
+ | </Action> | ||
+ | <Trace> | ||
+ | <SourceTraceNum>000014</SourceTraceNum> | ||
+ | <GTRC>abb12a0bee0f4923b6e627a6cb72b774</GTRC> | ||
+ | </Trace> | ||
+ | <NeedSwipCard>Y</NeedSwipCard> | ||
+ | </Request> | ||
+ | </sof:Request> | ||
+ | </soapenv:Body> | ||
+ | </soapenv:Envelope> | ||
+ | { | ||
+ | “GMID:”03”, | ||
+ | “GTID”:”03”, | ||
+ | “GMPW”:”03”, | ||
+ | “AllowsPartialAuth”:”N”, | ||
+ | “TransType”:”Void”, | ||
+ | “IsOffline”:”N” | ||
+ | “SourceTraceNum”:”000014”, | ||
+ | “GTRC”:”abb12a0bee0f4923b6e627a6cb72b774”, | ||
+ | “NeedSwipCard”:”Y” | ||
+ | } | ||
+ | </code> | ||
+ | =Full JSON/SOAP Documentation= | ||
+ | → ''' Please, see [http://cloud9paymentgateway.com/docs/API/JSON/Cloud9SoapJSONDOCv1.2.pdf Full SOAP/JSON API Documentation] | ||
{{Template:C9Footer|Integration}} | {{Template:C9Footer|Integration}} |
Revision as of 17:53, 22 August 2017
Cloud9 Payment Gateway Documentation. This site can also be reached at http://docs.cloud9paymentgateway.com
Contents
Step One
Please, review the Developer Guide to determine the best integration approach, before diving into the API Documentation below.
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
- PDC Connection
- Connects to the local device driver - wss://localhost:5556/
- PWC Connection
- Connects directly to the Cloud9 server - https://testlink.c9pg.com:5558/hj
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 |
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 |
Live Sample Companion
→ NOTE: It is highly recommended that you use the live PDC API Sample, which has real time source code windows to help you understand the API.
You can see the JSON Payload at the bottom of the page, for reference.
SOAP
Here is an example of SOAP Request and Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sof="http://www.911software.com/">
<soapenv:Header/>
<soapenv:Body>
<sof:Request>
<Request>
<Config>
<GMID>03</GMID>
<GTID>03</GTID>
<GMPW>03</GMPW>
<AllowsPartialAuth>N</AllowsPartialAuth>
</Config>
<Action>
<TransType>Void</TransType>
<IsOffline>N</IsOffline>
</Action>
<Trace>
<SourceTraceNum>000014</SourceTraceNum>
<GTRC>abb12a0bee0f4923b6e627a6cb72b774</GTRC>
</Trace>
<NeedSwipCard>Y</NeedSwipCard>
</Request>
</sof:Request>
</soapenv:Body>
</soapenv:Envelope>
{
“GMID:”03”, “GTID”:”03”, “GMPW”:”03”, “AllowsPartialAuth”:”N”, “TransType”:”Void”, “IsOffline”:”N” “SourceTraceNum”:”000014”, “GTRC”:”abb12a0bee0f4923b6e627a6cb72b774”, “NeedSwipCard”:”Y”
}
Full JSON/SOAP Documentation
→ Please, see Full SOAP/JSON API Documentation
From the makers of Cloud9 Payment Processing Gateway and Creditline Credit Card Processing Software