PixelWave

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_TOKEN

Path Parameters

ParameterTypeDescription
idTransactionMerchantstringYour own operation id (the idTransactionMerchant you sent when creating the payin)

Body

Optional. application/json:

FieldTypeRequiredDescription
reasonstringNoCancellation reason (stored for support/audit)

Constraints

  • Only payin operations can be cancelled.
  • The operation must not be in a final state — only created and in_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

  1. If the operation has already been sent to a provider, the cancellation is forwarded to the provider first.
  2. 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.
  3. On success the operation becomes failed and a webhook with status: "failed" is sent to your callback URL.
  4. 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
}
FieldDescription
idPlatformPlatform operation id
idTransactionMerchantYour operation id
statusNew 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:

MessageMeaning
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 laterThe provider could not be reached; the status did not change — retry the request

On this page