Cancel Payin
Cancel a pending payin operation
You can cancel a payin that has not been completed yet — for example, when the customer
abandoned the payment. The cancellation is passed on to the provider, and the operation
is moved to the final status failed. Operations are matched by your own idTransactionMerchant.
Cancel Payin
POST /operation/{idTransactionMerchant}/cancel
Authentication
Authorization: Bearer YOUR_MERCHANT_TOKENPath Parameters
| Parameter | Type | Description |
|---|---|---|
idTransactionMerchant | string | Your own operation id (the idTransactionMerchant you sent when creating the payin) |
Body
Optional. application/json:
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | No | Cancellation reason (stored for support/audit) |
Constraints
- Only payin operations can be cancelled.
- The operation must not be in a final state — only
createdandin_progress(incl. payment form not yet completed) can be cancelled. - If several operations share the same
idTransactionMerchant, the most recent payin is cancelled.
How it works
- If the operation has already been sent to a provider, the cancellation is forwarded to the provider first.
- If the provider rejects the cancellation (for example, the payment has already been made), an error is returned and the operation status does not change — keep tracking it as usual.
- On success the operation becomes
failedand a webhook withstatus: "failed"is sent to your callback URL. - Any later status updates from the provider for this operation are ignored.
Example Request
curl -X POST 'https://api.admin-pixelwave.com/operation/order-12345/cancel' \
-H 'Authorization: Bearer YOUR_MERCHANT_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"reason": "Customer abandoned payment"}'Success Response
{
"result": {
"status": "success",
"x-request-id": "uuid",
"codeError": "none",
"codeErrorExt": "none",
"message": ""
},
"data": {
"idPlatform": "550e8400-e29b-41d4-a716-446655440000",
"idTransactionMerchant": "order-12345",
"status": "failed"
},
"totalNumberRecords": 0
}| Field | Description |
|---|---|
idPlatform | Platform operation id |
idTransactionMerchant | Your operation id |
status | New operation status — always failed |
Error Response
Errors are returned with HTTP 200 and result.status = "warning" (platform convention).
{
"result": {
"status": "warning",
"x-request-id": "uuid",
"codeError": "none",
"codeErrorExt": "none",
"message": "Provider rejected cancel: payment already completed"
},
"data": null,
"totalNumberRecords": 0
}Common messages:
| Message | Meaning |
|---|---|
Not found payIn operation by idTransactionMerchant=... | No payin with this id for your account |
Operation cannot be cancelled in status: ... | The operation is already final (success / failed) |
Provider rejected cancel: ... | The provider refused the cancellation; the status did not change |
Cancel failed: ..., try again later | The provider could not be reached; the status did not change — retry the request |