---
title: "Submit a test PIN during sandbox development"
method: POST
path: "/api/payments/{payment_ref}/collect_pin_backend/"
tags: ["Sandbox Testing"]
---

# Submit a test PIN during sandbox development

`POST /api/payments/{payment_ref}/collect_pin_backend/`

> ⚠️ Use For Sandbox Only
>
> Only use this endpoint during sandbox testing. It cannot be used in production.

A `POST` request to `/payments/{payment_ref}/collect_pin_backend/` programmatically associates a test PIN with an existing `Payment` object.

Use this endpoint to automate sandbox testing when you're building an integration that [defers payment capture to the server](https://docs.joinforage.app/docs/capture-ebt-payments-server-side).

## Request body

- CollectPinBackendRequest
  - `pin` string, required — A test four-digit PIN number, represented as a string.

## Response `200`

__OK__ - Success

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — __Forbidden__
- `404` — Not Found
- `409` — Conflict
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/joinforage/apis/forage-payments-api.md) · [All operations](https://skmtc.dev/joinforage/apis/forage-payments-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/joinforage/forage-payments-api/revisions/4b7212706fae/schema)
