Tinka

Credit Refund Request

Merchants with direct capture can refund a certain amount of a payment. The amount can't be higher then the original requested amount.

Merchants with delayed capture can refund one or more order lines of a payment. The total refund lines amount can't be higher than the initial requested amount.

URL

POST /merchant-api/v2/refunds


HTTP response codes

  • 200 - Successful operation
  • 400 - Payment method Invoice is not allowed / Refund amount is not allowed / Number of items for a refund must be a positive number / MerchantLineReference is not allowed / Please supply at least one refund line / Merchant line references must be unique / Either refundAmount of refundLines should be provided
  • 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

Request

AttributeTypeLengthDescription
paymentRequestId requiredString36A reference to the original payment request id. It is a UUID.
refundAmount*IntThe amount of the refund. The amount is always in euro cents and should be >= 0
merchant requiredMerchant
transactionId requiredString100A reference provided by the caller. We recommend to use this for linking the refund request and make it unique for every transaction
merchantRequestReference requiredString100A reference provided by the merchant
refundLines*String255List of Lines (below)

* This depends on whether the merchant supports delayed capturing or not. The refundAmount is required for merchants that do not support delayed capturing and refundLines is required for merchants that do support delayed capturing.

Lines

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

Type: Merchant

Unique identification of the merchant provided by Tinka.

AttributeTypeLengthDescription
merchantId requiredString100The unique id of the merchant provided by Tinka. Should be the same as the merchant id used to sign the request

Response

AttributeTypeLengthDescription
refundRequestId requiredString36Unique identifier issued by Tinka. It is a UUID.
response requiredString EnumThe decision on the refund request. Possible values Accept, Reject. Rejection can occur when the requested refund amount exceeds the requested payment amount
additionalDataString255Additional info about the refund request. Reason why the refund is Rejected

Example

Request

{
  paymentRequestId: "01234567-aaaa-bbbb-cccc-987654321abc",
  refundAmount: "40000",
  merchant: {
     merchantId: "example"
  },
  transactionId: "flkgfhkjh238iksdf",
  merchantRequestReference:"ssg5455g"
}

Request with refund lines

{
  paymentRequestId: "01234567-aaaa-bbbb-cccc-987654321abc",
  merchant: {
     merchantId: "example"
  },
  transactionId: "flkgfhkjh238iksdf",
  merchantRequestReference:"ssg5455g",
  refundLines: [{
    merchantLineReference: "Example_0000001",
    numberOfItems: 1
  }]
}

Response

{
  additionalData: "Requested refund amount exceeds open balance",
  refundRequestId: "01234567-aaaa-bbbb-cccc-987654321abc",
  response: "Reject"
}

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