Refunding asynchronous payment methods

Learn how to refund transactions that use delayed payment methods

Prior to issuing a refund on an asynchronous payment method, such as Wire Transfer, Online Banking, and Konbini, payment providers must usually collect additional information from customers.

After you request a refund be applied to these types of payment methods, Digital River typically moves the refund's state to pending_information, which triggers the creation of a refund.pending_information event.

The event's data.object contains tokenInformation. Within this data structure is a token and an expiresTime. The expiresTime of the token is 30 days after the event's createdTime.

refund.pending_information
{
    "id": "3830d505-f004-4924-b1d5-8c877f164726",
    "type": "refund.pending_information",
    "data": {
        "object": {
            "id": "re_d1988e09-eec8-48f4-8077-b6c955c84e69",
            "amount": 33.0,
            "createdTime": "2022-03-11T20:35:21Z",
            "currency": "JPY",
            "items": [],
            "orderId": "219187180336",
            "refundedAmount": 0.0,
            "state": "pending_information",
            "tokenInformation": {
                "token": "17bc3273-b588-420f-bd1f-49a89eec6322",
                "expiresTime": "2022-06-09T20:37:21.087Z"
            },
            "liveMode": false,
            "charges": [
                {
                    "id": "5253e76e-e92f-4128-acad-78c26d7999b8",
                    "captured": true,
                    "refunded": true,
                    "refunds": [
                        {
                            "createdTime": "2022-03-11T20:37:21Z",
                            "amount": 33.0,
                            "state": "pending_information"
                        }
                    ],
                    "sourceId": "0e311505-0955-47df-9808-beb34b5a8b30"
                }
            ]
        }
    },
    "liveMode": false,
    "createdTime": "2022-03-11T20:37:30.556222Z",
    ...
    "digitalriverVersion": "2021-12-13"
}

Handle refund.pending_information events by passing tokenInformation and expiresTime to your front-end.

On your page that is dedicated to collecting bank information during refunds, use token to set refundToken in the create offline refund element's configuration object. Once invoked, this method sends the token to Digital River's payment services, requesting a schema that defines the data fields customers must complete.

On the same page, mount the element and inform customers that they must enter and submit the requested information by expiresTime. In the designated container, a form with the required fields is displayed to customers and the on ready event is triggered.

Make sure you display the expiration time in a more human readable form.

Once customers follow these instructions and the data is accepted, Digital River sends a change event. Handle it by redirecting customers to a page that notifies them the refund request has been successfully submitted. You can also use either unmount() or destroy()to remove the offline refund element from the data collection page.

Once you receive either the refund.complete or refund.failed event, send the appropriate notification to customers.

Last updated