Refunds

Process a refund of a transaction (Poslink V2)

This API call is used to process the refund of a previous transaction using the POSLink V2 endpoint.

post/poslink/v2/refunds

Request

Headers

Idempotency-Keystring

A unique key to identify the request. If the request is repeated with the same key, the same response will be returned. If the request is repeated with a different key or without a key, a new refund will be created.

Request body

transaction_idstring required

Identifies the original payment to refund. Send the gateway_payment_id of the original payment, delivered when that payment completes on its status stream (GET /poslink/v3/payment-requests/{payment-request-id}).

Do not send the deprecated transaction_id from the V1 payment request response: despite the matching name it is a different identifier and will be rejected with 404 TRANSACTION_NOT_FOUND.

terminal_idstring

Optional, and only valid when authenticating with client credentials (M2M) for delegated access. Sending terminal_id with a user token is rejected with 403 FORBIDDEN on every attempt. POSLink refunds are referenced online refunds - the terminal is derived from the original payment - so it can safely be omitted.

merchant_referencestring

An identifier referencing the transaction on the client's side

amountinteger required

A positive integer representing the total amount to refund in the smallest currency unit (e.g., 100 cents to charge $1). The currency is the same as the original transaction. HUF follows ISO 4217 here, so 250000 means 2500 Ft.

currencystring

The ISO 4217 currency code (e.g., 'EUR', 'USD'). Required for CIBA authentication flow

basket_transaction_idstring uuid

Unique identifier of basket-data transaction

Example request

{
  "transaction_id": "39e3bacdd5d38d9ce611cf88afbcc86df829a9a5641880b3",
  "amount": 100,
  "currency": "EUR",
  "merchant_reference": "merchant-ref-123"
}

Response

Refund processed

transaction_idstring required

Unique identifier of the refund that was just created. This is not the identifier of the original payment that was sent in the request.

status'SUCCESS' | 'FAILURE' | 'PENDING' required

The status of the transaction

transaction_type'REFUND' | 'REVERSAL' required

The type of the transaction: REFUND or REVERSAL

status_reason'ACCOUNT_INVALID' | 'CANNOT_VALIDATE_AUTHENTICATION' | 'CARD_COUNT_EXCEEDED' | 'CARD_DECLINED' | 'CARD_EXPIRED' | 'CARD_LIMIT_EXCEEDED' | 'CARD_NOT_ACTIVE' | 'DISABLED_ACCOUNT' | 'DO_NOT_HONOR' | 'ECOM_NEGATIVE_CARD_AUTHENTICATION_VERIFICATION' | 'EXCEEDS_AMOUNT_LIMIT' | 'FORMAT_ERROR' | 'INCORRECT_CARD_AUTHENTICATION' | 'INSUFFICIENT_FUNDS' | 'INVALID_CARD_NUMBER' | 'INVALID_TRANSACTION' | 'ISSUER_DECLINED' | 'LOST_OR_STOLEN' | 'MERCHANT_CONFIGURATION' | 'PIN_LIMIT_EXCEEDED' | 'PROCESSOR_UNAVAILABLE' | 'RESTRICTED_CARD' | 'SCA_PIN_REQUIRED' | 'SCA_REQUIRED' | 'SUSPECTED_FRAUD' | 'TEMPORARY_ISSUE_RETRY' | 'TIMEOUT' | 'TRANSACTION_NOT_ALLOWED' | 'UNABLE_TO_ROUTE_TRANSACTION' | 'UNSUPPORTED_ISSUER' | 'NEGATIVE_BALANCE_LIMIT' | 'OTHER'

Reason for FAILURE status

card_acceptor_idstring required

mid or card_acceptor_id (ISO 8583 field standard). Used to unique identify the merchant in the transaction.

created_atstring date-time

The date and time the refund was created (in ISO 8601 with time-zone).

Example response

{
  "transaction_id": "tr_2b9d1f4c-5e6a-4b7c-8d9e-0f1a2b3c4d5e",
  "refund_amount": {
    "amount": 100,
    "currency": "GBP"
  },
  "status": "SUCCESS",
  "transaction_type": "REFUND",
  "card_acceptor_id": "5023045",
  "issuer_result": {
    "approval_code": "123456",
    "response_code": "00"
  },
  "created_at": "2021-01-01T00:00:00.000Z",
  "dcc": {
    "cardholder_amount": {
      "amount": 100,
      "currency": "CHF"
    },
    "conversion_rate": "0.9517",
    "markup": "0.03",
    "ecb_markup": "0.01"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.