Tinka

Cancel Payment Request

When a payment request is not accepted or rejected it can be cancelled by payment request id. Lines should not be provided in this case.

When a payment request is accepted but not all order lines have been delivered (captured), the pending lines that won't be fulfilled anymore can be cancelled by providing the line reference and quantity. Optionally the Cancel Request can have a reference id. See request below

URL

POST /merchant-api/v2/cancel


HTTP response codes

  • 200 - Successful operation
  • 400 - Number of items to cancel must be a positive number / Merchant line references must be unique / Please supply at least one cancel line / MerchantCancelReferenceId is not allowed
  • 401 - Unauthorized, maybe the credentials are missing. For more information, see security
  • 403 - Forbidden, the HMAC may be wrong or out of date. For more information, see security
  • 404 - Payment request for given ID does not exist
  • 409 - Payment request cannot be cancelled / Could not cancel the requested lines. [Reason message] / Not allowed to cancel pending lines based on current configuration

Request

AttributeTypeLengthDescription
paymentRequestId requiredString36A reference to the original payment request id. It is a UUID.
cancelLinesList of Lines (below)Required for cancelling pending lines.
merchantCancelReferenceIdString100Nice to have for cancelling pending order lines.

Lines

AttributeTypeLengthDescription
merchantLineReferencerequiredString100The reference to the original line in the payment request
numberOfItems requiredIntThe number of items to be refunded

Example

Request

{
  paymentRequestId: '01234567-aaaa-bbbb-cccc-987654321abc';
}

Request with cancel lines

{
  paymentRequestId: "01234567-aaaa-bbbb-cccc-987654321abc",
  cancelLines: [{
    merchantLineReference: "Example_0000001",
    numberOfItems: 1
  }]
}

© 2024 Tinka. All Rights Reserved. All trademarks, service marks and trade names used in this material are the property of their respective owners.