Documentazione

1Introduction

Transactions that are in the state Completed or Fulfill can be refunded and the money can be returned to the client. For more information see the transaction process.

Note
Not every payment methods allows to authorize transactions deferred. In order to have a more simpler process we recommend you to work with refunds instead of completions.

2Integration Details

Before you can complete a transaction you should have considered the following guides:

Below you find more information about how you can issue a refund in the back office of the application or using the web service in order to integrate the refund process remotely in your application.

2.1Online vs. Offline Refunds

A refund can be issued in two ways:

  • Online: If you refund a transaction online we send the refund request directly to the processor.

  • Offline: The offline refund simulates the refund in our platform but will not send the refund to the processor. This feature can be used if you refunded the payment already at the processor and you can not send it anymore in the online mode.

2.2Create a Refund in the back office

Refunds can be found in the back office under Space > Payment > Transactions. Open the transaction. In case the transaction has been completed you should find the transaction tab Refunds. The backend offers an easy and convenient way to issue either online or offline refunds.

Note
It can create an inconsistent data if you only change the line items inside the back office and not also in your application.

2.3Create a Refund Over the Web Service

You can refund a completed transaction via the web service by using the Refund Service.

You have the option to issue a refund based on a quantity reduction or unit price. You should not combine them as this may lead to odd results. In order to get the line item that you can refund you will first have to read the transaction. This will provide the necessary infos needed to issue the refund.

We distinguish between different refund types:

  • CUSTOMER_INITIATED_AUTOMATIC / MANUAL: A refund is customer initiated in case the refund was not triggered by the consent of the merchant this could happen due to a charge back on the credit card or direct debit transaction.

  • MERCHANT_INITIATED_ONLINE / OFFLINE: A merchant initiated refund is triggered with the consent of the merchant.

Transaction Response

Below you find an excerpt of the response to read the transaction that we want to refund.

	"lineItems": [
		{
			"aggregatedTaxRate": 0,
			"amountExcludingTax": 70,
			"amountIncludingTax": 70,
			"attributes": {
				"color": {
					"label": "Color",
					"value": "Black"
				},
				"size": {
					"label": "Size",
					"value": "S"
				}
			},
			"name": "Chelsea Tee",
			"quantity": 1,
			"shippingRequired": true,
			"sku": "mtk004",
			"taxAmount": 0,
			"taxAmountPerUnit": 0,
			"taxes": [],
			"type": "PRODUCT",
			"uniqueId": "2622",
			"unitPriceExcludingTax": 70,
			"unitPriceIncludingTax": 70
		}

Request

Based on this information we are able to issue the refund request using the Refund Create method on the API.

	{
    "externalId": "1",
    "reductions": [
        {
            "lineItemUniqueId": "2622",
            "quantityReduction": "1",
            "unitPriceReduction": "70"
        }
    ],
    "transaction": {
        "id": 109575
    },
    "type": "MERCHANT_INITIATED_ONLINE"
}