Ping
Ping API Method
Ping request can be used to check the network connectivity. This is not required to initiate a transaction request.
Diagrams below describe the structures of the PingRequest and PingResponse objects:
Note: Parameters in Bold are required
Details of each attribute in the PingRequest and PingResponse objects are listed in the tables below:
PingRequest
Field | Required | Type | Max Length | Description |
---|---|---|---|---|
RequestID | Yes | String | 50 | Unique Request Identifier. |
Channel | Yes | Integer | N/A | “1” for Unknown"2" for Partner’s web application“3” for Partner’s IVR“4” for Partner’s Desktop“5” for Stores POS"6" for Mobile |
RequestDateTime | Yes | DateTime | N/A | Timestamp of Submitted Request in UTC time. |
Version | Yes | String | 10 | Value = 2.0.0Format: .. |
Authentication
Field | Required | Type | Max Length | Description |
---|---|---|---|---|
PartnerCode | Yes | String | 50 | Unique code to identify partner. |
UserName | Optional | String | 50 | UserName for authentication |
Password | Optional | String | 50 | Password as provided by Green Dot for authentication |
Audit
Field | Required | Type | Max Length | Description |
---|---|---|---|---|
CustomerIP | Optional | String | 20 | Web users IP address. To be provided if initiated by Web.Either CustomerIP or CustomerANI needs to be provided |
CustomerANI | Optional | String | 10 | Phone number area code first. To be provided if initiated by IVR. Must be all numerical digits Either CustomerIP or CustomerANI needs to be provided |
PartnerIP | Optional | String | 20 | Partner’s IP address. To be provided if initiated by Web. |
PingResponse
Field | Required | Type | Max Length | Description |
---|---|---|---|---|
RequestID | Yes | String | 50 | Request Identifier echoed back from request |
ResponseID | Yes | String | 50 | Unique Response Identifier |
ResponseCode | Yes | String | 2 | Indicates successful and non-successful responses. |
ResponseText | Yes | String | 255 | Response code description. |
ResponseDateTime | Yes | DateTime | N/A | Timestamp of response in UTC time. |
Version | Yes | String | 10 | Value = 2.0.0Format: .. |
Sample Code
The C# sample codes provided below describe how to invoke each of exposed methods. These code samples only include the mandatory fields to be provided by the partner.
Add a service reference to provided URL / create a proxy using the WSDL and add it to the solution (named GDNPartnerAPI in the following example). Make sure the namespace used is ‘http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/’
Code (C#)
GDNPartnerAPI.PingRequestrequest = newGDNPartnerAPI.PingRequest(){Audit = newGDNPartnerAPI.Audit(){CustomerANI = null,CustomerIP = "1.1.1.1",PartnerIP = null,},Authentication = newGDNPartnerAPI.Authentication(){PartnerCode = "Test",UserName = "abc",Password = "abc",},Channel = 2, //PartnerWebRequestID = "123456789",RequestDateTime = DateTime.Now.ToUniversalTime(),Version = "2.0.0",};GDNPartnerAPI.GDNPartnerAPIClientservice = newGDNPartnerAPI.GDNPartnerAPIClient();varresponse = service.Ping(request);
XML:
Request
<s:Body><Pingxmlns="http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/"><requestxmlns:a="https://partners.greendotcorp.com/GDCPartners/GDCWS_GDNPartnerAPI/"xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:Auditi:nil="true"></a:Audit><a:Authentication><a:PartnerCode>GreenDot</a:PartnerCode><a:Password>**********</a:Password><a:UserName>*******</a:UserName></a:Authentication><a:Channel>2</a:Channel><a:RequestDateTime>2012-01-17T18:36:14.8681861Z</a:RequestDateTime><a:RequestID>381d3ba9-8cb5-4b90-98bf-c62407456ffc</a:RequestID><a:Version>2.0.0</a:Version></request></Ping></s:Body>
Response:
<s:Body><PingResponsexmlns="http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/"><PingResultxmlns:a="https://partners.greendotcorp.com/GDCPartners/GDCWS_GDNPartnerAPI/"xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:RequestID>381d3ba9-8cb5-4b90-98bf-c62407456ffc</a:RequestID><a:ResponseCode>00</a:ResponseCode><a:ResponseDateTime>2012-01-17T18:36:19.8366311Z</a:ResponseDateTime><a:ResponseID>1bb37e31-56ea-4d59-ba81-52eecdef6c32</a:ResponseID><a:ResponseText>Success</a:ResponseText><a:Version>2.0.0</a:Version></PingResult></PingResponse></s:Body>
Updated about 2 months ago