---
updatedAt: 2026-09-28T18:19:33.000Z
agentTools:
  projectIndex: https://docs.helix.q2.com/llms.txt
---

# Simulate declined purchase authorization in sandbox environment

Generate a mock declined purchase authorization in sandbox. This endpoint will generate a <a href="https://docs.helix.q2.com/docs/event-types#debit-card-declined-events" target="_blank">Debit Card Declined real-time event</a> with `userEventTypeId=3060640`.

<Callout icon="🚧" theme="warn">
  **Warning** This endpoint can only be used by Visa DPS programs and only within the sandbox environment.
</Callout>

#### Error Codes

<details>
  <summary>Click to expand</summary>

| Code    | Message (en-US)                    | Notes                                            |
| :------ | :--------------------------------- | :----------------------------------------------- |
| 1-60000 | Any "Common Error Code" may occur. | See [Common Error Codes](https://docs.helix.q2.com/reference/common-error-codes) |

</details>

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Helix API",
    "version": "3.0.0",
    "description": "Helix Public API (no customer KYC/IDV). **This spec covers all of Helix 3.x and is subject to change at any time.**"
  },
  "servers": [
    {
      "url": "https://sandbox-api.helix.q2.com",
      "description": "Sandbox server"
    },
    {
      "url": "https://api.helix.q2.com",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Card - Mock",
      "description": "Endpoints related to simulating card workflows"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/card/mock/decline/purchase/authorize": {
      "post": {
        "summary": "Simulate declined purchase authorization in sandbox environment",
        "description": "Generate a mock declined purchase authorization in sandbox. This endpoint will generate a <a href=\"https://docs.helix.q2.com/docs/event-types#debit-card-declined-events\" target=\"_blank\">Debit Card Declined real-time event</a> with `userEventTypeId=3060640`.",
        "externalDocs": {
          "url": "https://docs.helix.q2.com/reference/cardmockdeclinepurchaseauthorize"
        },
        "tags": [
          "Card - Mock"
        ],
        "operationId": "cardMockDeclinePurchaseAuthorize",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customerId",
                  "cardId",
                  "merchantDescription"
                ],
                "properties": {
                  "customerId": {
                    "$ref": "#/components/schemas/HelixId"
                  },
                  "cardId": {
                    "$ref": "#/components/schemas/HelixId"
                  },
                  "merchantDescription": {
                    "type": "string",
                    "maxLength": 25
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A 200 status with no `data` property present",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardArray200Response/allOf/0"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CardArray200Response": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "errors": {
                "type": "array",
                "items": {},
                "example": []
              },
              "requestId": {
                "type": "string",
                "example": "1249a3bf-aca1-40dd-9fba-2a3193550c39"
              },
              "status": {
                "type": "integer",
                "enum": [
                  200
                ]
              },
              "throttle": {
                "type": "object",
                "properties": {
                  "periodEndsAt": {
                    "$ref": "#/components/schemas/CustomerSetLastContact200Response/allOf/1/properties/data/items/properties/lastContactDate"
                  },
                  "periodLengthInSeconds": {
                    "$ref": "#/components/schemas/HelixId"
                  },
                  "periodRequestLimit": {
                    "$ref": "#/components/schemas/HelixId"
                  },
                  "requestsRemainingInPeriod": {
                    "$ref": "#/components/schemas/HelixId"
                  },
                  "warningThreshold": {
                    "type": "number",
                    "format": "decimal",
                    "example": 0.2
                  }
                }
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CardObject200Response/allOf/1/properties/data"
                }
              }
            }
          }
        ]
      },
      "CustomerSetLastContact200Response": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CardArray200Response/allOf/0"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "customerId": {
                      "$ref": "#/components/schemas/HelixId"
                    },
                    "dormancyStatus": {
                      "type": "string",
                      "enum": [
                        "Active",
                        "Inactive",
                        "Dormant"
                      ]
                    },
                    "lastContactDate": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2021-01-07T19:00:59.761-06:00"
                    },
                    "lastContactType": {
                      "$ref": "#/components/schemas/LastContactType"
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "HelixId": {
        "type": "integer",
        "format": "int32",
        "minimum": 1
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-samples-languages": [
    "curl",
    "node",
    "python",
    "csharp",
    "ruby",
    "go",
    "java",
    "kotlin",
    "php"
  ]
}
```