DengiOnline

2017-07-29 03:29:16

General GSG API description

When interacting with GSG the Partner's project sends requests for actions and the GSG provides responses about successful completion or failure to complete the action. 

Basic procedure

Sequence of basic actions

Action Description Mandatory
1 Balance action Account balance check Yes
2 Check action Payment pre-check Yes
3 Pay action Payment request Yes
4 Pay_status action Payment status check Yes

General request and response structure

where ХХХХ is Project’s ID (Project) provided by technical support. If you have problems accessing the URL, please contact your licensor's technical integration specialists.

For the data exchange all documents use:

  • method - POST
  • format - XML
  • encoding - UTF-8.

Requests are digitally signed. Digital signature is created with the secret key issued by the licensor of the System. Secret key is valid for up to 1 year.

The secret key must be known only to the Partner!
Do not include it in your requests or share it outside your organization!
No one who legitimately represents GSG technical support will ever ask you for your secret key!

Request and responce basic parameters

Table of Request Basic Parameters

Parameter

Description

Format

Mandatory

project

Project ID in GSG system

integer

yes

timestamp

Date and time of the request

Unix time

integer

yes

sign

Request signature

Get a string by the following algorithm:
$sign = sha1('secret = private_key&parameter = parameter_value&...'); where:

  • secret = private_key is put in the beginning of the string;
  • parameters (ex. account, action, amount etc.) are sorted in ascending alphabetical order,
  • delimiteris the ampersand sign (&).

See more

string

 

yes

action

Action that is to be performed in response to the request.

Possible values:

  • commissions — list all available payment providers and their parameters;
  • balance — check main account’s balance;
  • check — payment pre-check (payment invoice creation);
  • pay — request payment;
  • pay_status — check payment status by ID;
  • errors — list of response codes and their descriptions;
  • transactions — list of transactions for a period oftime

string

 

yes

params

Additional parameters as required by selected action.

All possible additional parameters are enlisted in a particular action description

string / integer

(depending on information conveyed)

no

Table of Response Basic Parameters

Parameter

Description

Format

status

Request status: 1 — OK, above 10 — error.

integer

timestamp

Date and time of the request

integer

reference

Unique operation ID in GSG system

string (255)

Code examples of request and response in general

To view the structure of any request with its parameters you can use the test utility – https://gsg-tester.dengionline.com. 

Note that the utility may only be used during integration and testing. Thereafter its address is excluded from IP filtering and all requests from the utility result in error 995 – IP_NOT_WHITELISTED.

If you have problems accessing the test utility, please contact your licensor's technical specialists.

General request structure

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <project>[Project ID]</project>
  <action>[Action name]</action>
  <timestamp>[Date and time of the request]</timestamp>
  <params>
    [Additional parameters if required by selected action]
  </params>
  <sign>[Request signature]</sign>
</request>

General response structure

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>[request status]</status>
  . . .       - Additional parameters if required by selected action
</response>