Cancel payin
Cancels a pending payin by marking it as canceled. Only payins in CREATED status can be canceled. Once a payin is approved or initiated, it can no longer be canceled.
**Path Parameters**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `payin_id` | UUID | Yes | Unique identifier of the payin to cancel |
**Success Responses**
| Status Code | Description |
|-------------|-------------|
| 204 | No Content - The payin was successfully canceled |
**Error Responses**
| Status Code | Error Code | Description |
|-------------|------------|-------------|
| 400 | INVALID_STATUS | Payin cannot be canceled due to invalid status (only CREATED payins can be canceled) |
| 401 | AUTHENTICATION_ERROR | Authentication credentials are invalid or missing |
| 403 | AUTHORIZATION_ERROR | You do not have permission to perform this action |
| 404 | PAYIN_NOT_FOUND | The specified payin was not found or doesn't belong to your entity |
| 500 | CANCELLATION_FAILED | Failed to cancel payin due to unexpected error |
Authentication
x-api-keystring
RootPay API key sent in the x-api-key header. Keys are environment-scoped: live_* for production, test_* for sandbox.
Path parameters
payin_id
Response
Payin canceled successfully
Errors
404
Not Found Error