Skip to main content
POST
/
DeclineCallback
DeclineCallback
curl --request POST \
  --url https://{domain}/api/DeclineCallback \
  --header 'Content-Type: application/json' \
  --data '
{
  "MachineId": 71234996,
  "HwSerial": "0434334921100366",
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
  "Status": {
    "Verdict": "Declined",
    "ErrorCode": 44,
    "ErrorDescription": "Timeout on POS Device"
  }
}
'
{
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
  "Status": {
    "Verdict": "Declined",
    "ErrorCode": 44,
    "ErrorDescription": "Timeout on POS Device"
  }
}
The DeclineCallback API call is used to notify you of a failure in the Spark transaction process. It is typically triggered after a successful /TriggerTransaction response with a verdict of Approved, but when the flow subsequently fails for any reason before payment authorization.

Body

application/json

The request payload containing details of the failed transaction.

The request payload sent by Spark to the integrator's /spark/DeclineCallback endpoint to report a failed transaction.

MachineId
integer<int64>

The unique ID of the vending machine or terminal where the transaction occurred.

HwSerial
string

The serial number of the hardware terminal.

SparkTransactionId
string | null

The unique identifier of the failed Spark transaction. This ID is typically generated during the StartAuthentication process.

Status
object

Transaction Status Details

Response

200 - application/json
object | null

Success. A simple 200 OK server acknowledgment is sufficient.

The response payload from the DeclineCallback endpoint, providing details about a failed Spark transaction. This payload confirms the transaction's failure and provides contextual information.

SparkTransactionId
string | null

The unique identifier for the failed Spark transaction session. This ID is initially generated during the StartAuthentication process and is used to track the session throughout its lifecycle.

Status
object

Transaction Status Details