Refund status updates

Understand the different ways to get the status of a refund

The time it takes a bank to process a payment request can vary and may not be instant. Because of this, Vyne provides updates when a payment status changes.

There are different methods to obtain the status of the refund.

Entity

Method

Description

Use case

Using the refund

Webhook notifications

Webhook notification of a status change on the refund.

Be notified as soon as the refund status changes.

Using the refund

Get refund status

Get the status of the refund manually.

If a manual update is required on demand, merchants can get the status of the refund at any time.

Using the payment a refund was requested on

Webhook notifications

Webhook notification of a status change to a refunded payment status on the payment. Learn how payment status updates work here.

Be notified as soon as the payment status changes.

Using the payment a refund was requested on

Get payment status

Get the status of the payment manually. Learn how payment status updates work here.

If a manual update is required on demand, merchants can get the status of the payment at any time.

Approach 1: Webhook status updates

When the status of a refund or payment is updated, Vyne will send a digitally signed POST request to the specified callback URL. Make sure you have set up a callback URL.

You will receive two webhook notifications:

  1. A notification informing you that the refund is completed.
  2. A notification informing you that the original payment is refunded or part refunded.

Find out more about refund statuses here.

--header 'x-signature=h4DnIgww/Qw0NhMFlzgQuLKpvhVgJGm5ZSImO7wh7MewUX3AJYa06fwh9naN1Zp7h9OopRbVR3oY8L0PzDmirXyX1QM3eRZIkSjAZs+S9vx7D2ETH0WGk3ByJ28i3j6Q3Be3G5PEx91llVgTsOyYTdKVykzh/b8azI+5fr45PMe6mOKVjb8hoBsMJP9n+jQWQ8NnkR9h4iCxxqULFsY+oXu08dFFMPfnyc2Lp7rA66kLZVU7w4XS3rrNxoWV65Z75lvB8wAefWkR9KdFE8kWdZpAqdG+nC78EEZOo3fMoW+RuNKP57rw0yjC0Xmh8fActzTVyKcBlhum+/fTBc8rCbeoFKoHBiXQ+mcTKTdTveVEe2P95jtet6C2AMI0grRo7N45kMPT2IhyFxe4WUtafkpkJhTCu65QliGlQwKnebCQYB4uQUmvTQ8vli8FKjomeGis4KYOkQMA1YAatVF00IThbVVKO3QafVGUfn3Sue6EdNPT8UW8DiQ2UPsAYCI8N+M0YyebQZ48NqAv6Rp0Kz/srxiJc7YiWhLIgmoFe5Kfz+HWrIIZknH66HRhK3AFYocSliWtOH9p6YwaDNZ/M7giW7zjNpjWyRq7uoPLFD9OYZgaC+4vIreL3KTx/eCVHx0yqNajVSYAuMExwrPxoctklGAjuWHEFIRtm6wXqE0='
--header 'x-signature-keyId=718c7272-4e33-466b-8ad8-28fa2c95193f'
{
  "type": "REFUND_STATUS_CHANGE",
  "refundId": "REFUND-6b927ad5b1d5dde4",
  "status": "COMPLETED",
  "paymentId": "be1bb4231eeb6e02",
  "timestamp": 1622622602014
}

📘

Helpful to know

Although webhook notifications will always be sent when the status of a refund is updated, notifications are only sent for a payment when there is a status change:

  • If the payment already has a status of PART_REFUNDED, and the subsequent refund amount doesn't result in a full refund, a webhook notification will not be sent.
  • If the payment already has a status of PART_REFUNDED, and the subsequent refund amount does result in a full refund, a webhook notification will be sent as the status changes from PART_REFUNDED to REFUNDED.

Verifying integrity

Every webhook notification sent by Vyne is digitally signed using public key cryptography, also known as asymmetric cryptography, and will allow the merchant verify the origin and the integrity of the message. Learn how to verify the integrity of the webhook notification here.

Approach 2: Get refund status

You can request the status of on any refund at any time by sending an HTTP GET request to the relevant base URL + /api/v1/refunds/{refundId} including the headers Authorization: Bearer <payment_token>. Generate a fresh payment token for the <payment_token>.

Request

curl --location --request GET 'https://uat.app.payvyne.com/api/v1/refunds/REFUND-1bd7805da16df89e' \
--header 'Authorization: Bearer <payment_token>' \
--header 'Content-Type: application/json'

Parameter

Description

refundId

The unique identifier of the refund generated by Vyne.

Response

Response

Description

Success

The successful request returns a 200 (“OK”) response code and an object with the details of the refund in JSON format.

Error

If the refund failed, an HTTP status code and a JSON response are returned that contain detailed information about the error.


What’s Next

Now you've successfully got updates for your refunds, learn how to get refund history.

Did this page help you?