Credit
Credit
Operation executed by the GPAS when the player is awarded a prize during the game. This should increment the user’s balance in the wallet accordingly, and return an up-to-date balance.
Endpoint Details
- Method: POST
- URL:
/movements/credit
Request Parameters
| Name | Type | Request | Description |
|---|---|---|---|
| walletSessionId | String | QueryString | Wallet Session |
| x-parent-system-id | String | Header | Unique GPAS identifier in the operator system |
| x-signature | String | Header | Signature of the message for communication security, it must be in capital letters |
| externalReference | String | Body | Identifies the vendor’s unique transaction |
| value | Decimal | Body | The value of the user’s win corresponding to the currency associated with the user’s account |
| description | String | Body | Description corresponding to the credit of the win |
| typeCode | String | Body | Represents the type of transaction that is being sent (GAME_DEBIT, GAME_CREDIT) |
| tags | Dictionary | Body | This parameter is used to group transactions, a dictionary with key value is sent, keep in mind that it is dynamic |
Response Parameters
| Name | Type | Request | Description |
|---|---|---|---|
| status | String | Body | Identifies the status of the transaction |
| movementId | String | Body | A unique identifier for the current accounting transaction in Operator Account System |
| leftBalance | Decimal | Body | Total user balance |
| amountBonus | Decimal | Body | Amount of bonus balance that was credited |
| subWalletsSummary | List | Body | Identify how the user’s balance is made up |
Request Example
POST /movements/credit?walletSessionId=3fa85f64-5717-4562-b3fc-2c963f66afa6HEADERx-parent-system-id: BL13GTx-signature: SHA1(body + secret key)Example Signature
- Body: It is reported below
- SecretKey:
Ax34deSfgdB - SHA1: Encryption Function
- SHA1(
{"externalReference":"agt-n1572n6e5e5w2mw13l867azo4b381t27","value":"200","description":"Credit game move for customer id 6df5sd made by gpas","typeCode":"GAME_CREDIT","tags":{"gpasSessionId":"gpas-bfd9516b-c51f-4bd5-ab83-8899100dc636","gameid":"agt-13"}}Ax34deSfgdB) - Signature:
ADC0C7E5A925645EED839485C12F0DFDFEEA257F
Request Body
{ "externalReference": "agt-n1572n6e5e5w2mw13l867azo4b381t27", "value": 200, "description": "Credit game move for customer id 6df5sd made by gpas", "typeCode": "GAME_CREDIT", "tags": { "gpasSessionId": "gpas-bfd9516b-c51f-4bd5-ab83-8899100dc636", "gameid": "agt-13", "roundid": "agt-311502", "closeRound": "true", "externalReferenceBet": "agt-53rr34pq-flll-5rbe-q975-3824lx339855" }}Response Example
{ "status": "CONFIRMED", "movementId": "28rr37mq-fl47-2rrt-q614-81249a258311", "leftBalance": 9250, "amountBonus": 50, "subWalletsSummary": [ { "code": "REAL", "leftBalance": 9150, "subWalletsSummary": null }, { "code": "BONUS", "leftBalance": 100, "subWalletsSummary": null } ]}Implementation Notes
- This method should increment the player’s balance by the specified amount
- The response should include the updated balance after the credit operation
- The
externalReferenceshould be stored for potential future rollback operations - The
externalReferenceBettag can be used to associate this credit with a previous debit operation - All credit operations must be idempotent (see Idempotence)
- The
closeRoundtag indicates whether this credit operation closes the current game round