Skip to content

Cancel a payment

Request

Cancel a payment within a payment run.

Note that a payment can be cancelled when it is in the state PENDING_CONFIRMATION.

Required user roles: CONTROLLER OR CREATOR

Security
apiKey and authToken
Path
payment_run_idstring^[0-9a-fA-F]{24}$read-onlyrequired

The unique identifier of the payment run.

Headers
idempotency-refstring

A unique call reference generated by the caller that, taking into consideration the payload as well as the operation itself, helps avoid duplicate operations. Idempotency reference uniqueness is maintained for at least 24 hours.

Bodyapplication/jsonrequired
paymentIdsArray of strings, non-empty, uniquerequired
curl -i -X PUT \
  'https://sandbox.weavr.io/payment-run/v1/payment_runs/{payment_run_id}/cancel/payments' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'api-key: YOUR_API_KEY_HERE' \
  -H 'idempotency-ref: string' \
  -d '{
    "paymentIds": [
      "string"
    ]
  }'

Responses

Success - No Content.

Headers
request-refstringrequired

A request identifier. Providing this reference when contacting our support team will help us investigate your query.

Response
No content