---
agentTools:
  projectIndex: https://onebrick.readme.io/llms.txt
---

# QRIS Testing in Sandbox

This API only for testing purpose and can only works in sandbox environment.

Use this sandbox-only endpoint to simulate QRIS status changes during integration testing.

The endpoint lets you move a sandbox QRIS transaction into a target status so your team can verify callback handling, reconciliation, and user-facing payment status updates without real payment activity.

## Before You Test

1. Generate a QRIS transaction in Sandbox.
2. Store the `referenceId` from your original request.
3. Call this endpoint with the target status you want to simulate.
4. Confirm that your callback endpoint receives and processes the update correctly.

## Important Notes

* This endpoint is only for Sandbox testing.
* Do not use it as part of a production payment flow.
* Your callback handler should process simulated callbacks with the same validation and idempotency rules used for production callbacks.

## Request Parameters

| Key Parameters    | Data Type | Description                                                                 |
| :---------------- | :-------- | :-------------------------------------------------------------------------- |
| publicAccessToken | String    | One time access-token generated using the auth token API                    |
| referenceId       | String    | Unique reference of Transactions from client side                           |
| status            | String    | Status of QRIS, the value options are processing, paid, expired, completed. |

## Response Parameters

| Key parameters | Data type | Description                                                                     |
| :------------- | :-------- | :------------------------------------------------------------------------------ |
| data           | String    | Providing information about whether the status has successfully changed or not. |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Payment v2",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://sandbox.onebrick.io/v2/payments/gs"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "publicAccessToken",
        "x-default": "Bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/qris/update-status-sandbox": {
      "post": {
        "summary": "QRIS Testing in Sandbox",
        "description": "This API only for testing purpose and can only works in sandbox environment.",
        "operationId": "qris-testing-in-sandbox",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "referenceId",
                  "status"
                ],
                "properties": {
                  "referenceId": {
                    "type": "string",
                    "description": "Unique referenceId of Transactions"
                  },
                  "status": {
                    "type": "string",
                    "description": "The status that want to be achieved (PAID/COMPLETED)",
                    "default": "PAID/COMPLETED"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Success Response": {
                    "value": "{\n    \"status\": 200,\n    \"data\": \"We've successfully updated the qris transaction status.\",\n    \"metaData\": {\n        \"source\": \"API\",\n        \"entity\": \"Payment\"\n    },\n    \"error\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "data": {
                      "type": "string",
                      "example": "We've successfully updated the qris transaction status."
                    },
                    "metaData": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "example": "API"
                        },
                        "entity": {
                          "type": "string",
                          "example": "Payment"
                        }
                      }
                    },
                    "error": {}
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Public token in invalid ": {
                    "value": "{\n    \"status\": 400,\n    \"error\": {\n        \"code\": \"invalid_parameters_in_request\",\n        \"message\": \"Failed update QRIS status\",\n        \"action\": \"Please check the parameter request\",\n        \"reason\": \"Cannot change status from COMPLETED / EXPIRED / PAID back to PROCESSING\"\n    },\n    \"metaData\": {\n        \"source\": \"API\",\n        \"entity\": \"Payment\"\n    },\n    \"data\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "invalid_parameters_in_request"
                        },
                        "message": {
                          "type": "string",
                          "example": "Failed update QRIS status"
                        },
                        "action": {
                          "type": "string",
                          "example": "Please check the parameter request"
                        },
                        "reason": {
                          "type": "string",
                          "example": "Cannot change status from COMPLETED / EXPIRED / PAID back to PROCESSING"
                        }
                      }
                    },
                    "metaData": {
                      "type": "object",
                      "properties": {
                        "source": {
                          "type": "string",
                          "example": "API"
                        },
                        "entity": {
                          "type": "string",
                          "example": "Payment"
                        }
                      }
                    },
                    "data": {}
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "62aa98669833aa0028c5a455:669f7c060eea04000f640d12"
}
```