Refunds

Shows refund details

Changed on

Required scope: <code style="background:#e8f0fe;color:#1a73e8;padding:2px 8px;border-radius:12px;font-size:0.85em">refund:read</code>

get/refund/{id}

Request

  • Base URL
    https://api.test.easypay.pt/2.0
  • Auth
    API key in header AccountId and API key in header ApiKey

Path parameters

id, string uuid required

Resource Identification

Response

OK

RefundGetByIdResponse required
id, string uuid

A unique identifier for the resource. While typically formatted as a UUID (Universally Unique Identifier), it can also be in other formats as defined by the user. This field ensures the resource can be distinctly recognized and referenced.

status, 'success' | 'pending' | 'failed' | 'waiting'

Indicates the current status of the refund. Possible values include:

  • waiting: The payment instruction has been given, but the chosen payment method requires confirmation from an external entity before the status of the operation is finalized.
  • pending: This is the initial state, and it means that the refund is queued.
  • success: The refund has been completed successfully.
  • failed: The refund could not be completed due to an error or issue.

This field provides a clear indication of the current state of the refund, helping users understand its progress and outcome.

transaction_key, string

Your internal key identifying this refund.

value, number double

The monetary amount requested for the transaction. This field is formatted as a double, and will be rounded to two decimal places (e.g., "100.00").

account_holder, string

Bank account holder name.

email, string

The email address of the account holder. This field is used for communication purposes, including sending notifications about the refund stat.

phone, string

The contact phone number of the account holder, including the country code indicator (e.g., "+351"). This field is used for communication purposes, such as contacting the account holder for verification

iban, string

The International Bank Account Number of the account to which the refund will be sent. This field is used to uniquely identify the recipient's bank account across international borders.

reward_redemption_reversal, object

The reversal of the capture's reward redemption performed by this refund — the cashback restored to the customer's reward balance instead of being refunded to the payment method (the revert.reward_redemption_reversal the refund was created with). Present only when the refunded capture had redeemed reward credits and this refund restored them. This amount is wallet credit and is not part of the refund value paid out to the payment method. The restored credit appears on the customer's reward ledger as a REWARD_RESTORATION entry on GET /customer/{id}/rewards. See the Rewards & Redemptions guide for the full flow.

capture, object

Object with all the details about the capture.

Example response

{
  "value": 15.98,
  "email": "customer@example.pt",
  "phone": "+351912345678",
  "iban": "PT50007950088428437201551",
  "reward_redemption_reversal": {
    "value": 2.5
  },
  "capture": {
    "splits": [
      {
        "value": 8.65,
        "clearing_period": "1W",
        "margin_value": 1.25,
        "reward": {
          "value": 1,
          "expiration_date": "2027-04-02"
        },
        "reverts": [
          {
            "value": 12.87,
            "margin_value": 1.25
          }
        ]
      }
    ],
    "value": 10.86,
    "reward_redemption": {
      "value": 2.5
    }
  }
}

Changes

    • warning

      added the new failed enum value to the capture/splits/items/status response property for the response status

    • warning

      added the new reverted enum value to the capture/splits/items/status response property for the response status