Refund history

Check the refund history for a specific payment

In order to allow you to understand all the refunds made for a payment, Vyne provides a full refund history. This can be helpful in cases where multiple refunds are made for a single payment.

Calling the get refund history endpoint with a payment ID will return:

  • The total amount refunded
  • The remaining amount available to be refunded
  • Details of each refund made for the payment

📘

Helpful to know

The amount refunded is calculated based only on refund payments that have a COMPLETED status. Any refunds associated with a payment that have a PROCESSING, NEW or FAILED status will not be included in the calculation.

1. Get refund history

You can request the refund history for any payment at any time by sending an HTTP GET request to the relevant base URL + /api/v1/payments/{{paymentId}}/refunds including the headers Authorization: Bearer <payment_token>. You can use the same payment token generated previously.

Response

{
    "paymentId": "3fc1af646ce5b4d2",
    "paymentAmount": 22.00,
    "refundedAmount": 22.00,
    "refundableAmount": 0.00,
    "refunds": [
        {
            "id": "REFUND-2aa5df112441a54a",
            "status": "COMPLETED",
            "amount": 4.00,
            "currency": "GBP",
            "paymentId": "3fc1af646ce5b4d2",
            "initiationTimestamp": "2021-07-08T07:38:41.929Z"
        },
        {
            "id": "REFUND-2e1a22c9f4260d4a",
            "status": "COMPLETED",
            "amount": 3.00,
            "currency": "GBP",
            "paymentId": "3fc1af646ce5b4d2",
            "initiationTimestamp": "2021-07-08T07:38:41.929Z"
        },
        {
            "id": "REFUND-c7d220e424b6c1fb",
            "status": "COMPLETED",
            "amount": 15.00,
            "currency": "GBP",
            "paymentId": "3fc1af646ce5b4d2",
            "initiationTimestamp": "2021-07-08T07:38:41.929Z"
        }
    ]
}