Communication Protocol
Communication Protocol
JSON Format
The GPAS system uses JSON (JavaScript Object Notation) to communicate with your API via an HTTP Web Request. This lightweight data-interchange format is easy for humans to read and write and easy for machines to parse and generate.
Structure
The structure of the JSON payload changes according to the method the service invokes. Each method has its own specific JSON structure, which is defined in detail in the Methods to Implement section.
HTTP Methods
The GPAS API uses standard HTTP methods for different operations:
- GET: Used for retrieving information (e.g., balance)
- POST: Used for creating new resources (e.g., sessions, debit, credit)
- PATCH: Used for partial updates (e.g., rollback, close)
Headers
Each request includes specific headers that provide additional information:
- Authorization: Contains the JWT (JSON Web Token) for authentication
- x-parent-system-id: Unique GPAS identifier in the operator system
- x-signature: Signature of the message for communication security
Request and Response Format
All requests and responses follow a consistent format:
- Request: Contains headers, query parameters, and (for POST/PATCH) a JSON body
- Response: Contains a JSON body with the result of the operation
Example
Here’s a simplified example of a request and response:
POST /sessions?walletId=2sdf1sdHEADERAuthorization: Bearer <AuthToken>x-parent-system-id: BL13GTx-signature: 8F0F3379F1C6CC24DF5A4DC2A937061102487C46// Response{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "walletId": "2sdf1sd", "created": "2021-08-30T16:58:35.476Z", "status": "OPEN"}For detailed examples of each method, refer to the specific method documentation in the Integration section.