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

FieldRequiredTypeMax LengthDescription
RequestIDYesString50Unique Request Identifier.
ChannelYesIntegerN/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
RequestDateTimeYesDateTimeN/ATimestamp of Submitted Request in UTC time.
VersionYesString10Value = 2.0.0Format: ..

Authentication

FieldRequiredTypeMax LengthDescription
PartnerCodeYesString50Unique code to identify partner.
UserNameOptionalString50UserName for authentication
PasswordOptionalString50Password as provided by Green Dot for authentication

Audit

FieldRequiredTypeMax LengthDescription
CustomerIPOptionalString20Web users IP address. To be provided if initiated by Web.Either CustomerIP or CustomerANI needs to be provided
CustomerANIOptionalString10Phone number area code first. To be provided if initiated by IVR. Must be all numerical digits Either CustomerIP or CustomerANI needs to be provided
PartnerIPOptionalString20Partner’s IP address. To be provided if initiated by Web.

PingResponse

FieldRequiredTypeMax LengthDescription
RequestIDYesString50Request Identifier echoed back from request
ResponseIDYesString50Unique Response Identifier
ResponseCodeYesString2Indicates successful and non-successful responses.
ResponseTextYesString255Response code description.
ResponseDateTimeYesDateTimeN/ATimestamp of response in UTC time.
VersionYesString10Value = 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>