๐ŸŽ Description

๐ŸŽฏ Command โ€œcancelfsโ€ โ€“ Cancel Free Rounds / Feature Spins (Seamless Wallet)

This endpoint cancels a previously granted free-rounds or feature-spins session by marking all granted spins as played, paying, once, what the spins already played had won, and updating the status to reflect cancellation. Also known as command 30 in API VERSION 1.0

Upon execution:

  • The granted session will be marked as completed (status = 0).

  • Anything the played spins already won is sent to your wallet once, as a balance_adj type=win; the spins not yet played are dropped. The paid amount is capped by the grant's totalwinlimit when that is above 0.

  • The related gameplay will also be marked as completed (status = "ok").


๐Ÿ“œ Sample JSON Request (from your server to the RGS-CWS server)
{ "command": "cancelfs", "login": "demoaccount", "gameid": "6857", "freespins_id": "1510", "fs_type": "freebet", "apiusername": "your_api_username", "apipass": "your_api_password" }

๐Ÿ“ฅ Input Parameters (from your server to the RGS-CWS server)

Parameter

Mandatory

Description

Type

*command

โœ…

Must be "cancelfs"

string

*login

โœ…

Username (min. 6 characters). Required unless userid is used instead

string

*userid

โŒ

RGS-CWS user ID (used as an alternative to login, not both).

string

*gameid

โœ…

Game ID the grant was made on.

string

*freespins_id

โœ…

Unique grant ID you want to cancel (obtained when you made the grant via Command 29=grantfs)

string

fs_type

โŒ

cancelfs takes the same two values as grantfs: "freebet" or "feature_spins" (an absent fs_type searches both grant kinds for the named player); any other value is refused with the same message.

string

โš ๏ธ You must provide either login or userid โ€” not both.


๐Ÿ“ƒ Sample JSON Response (returned by RGS-CWS)

โœ… Success:

{"status":"OK","message":"OK","freespins_id":328}

โŒ Not found:

{"status":"ERROR","message":"NOT FOUND"}

cancelfs answers status OK / ERROR like every other RGS command; on ERROR the message says why (NOT FOUND, or the fs_type text).


๐Ÿ“ค Output Parameters (returned by RGS-CWS)

ParameterRequiredDescriptionType

status

โœ…

"OK" for success or "ERROR" for failure

string

message

โœ…

Status explanation or error reason

string

freespins_id

on OK only

The integer id of the cancelled grant

integer


โœ… Operator Action Required
  • Use this command only for grants that have not yet been completed by the user.

  • Always verify that the freespins_id is valid and matches the game.

  • Spins already played keep their winnings (paid once on cancel); use fsStatus to read won_so_far and settled before or after you cancel.