An overview of the typical use case for the creation of a goodwill to trigger a refund to the customer.
In some cases, it might be necessary to grant a goodwill credit to your customer after the order has already been shipped. In these cases, you can define the values that will be paid out to the customer. Accounting as a Service will take care of the administration surrounding the goodwill credit, as well as taking over the payout to the customer.
When creating a goodwill for an order, the following process steps will take place:
accounting/refundCompleted
once the initiated payment has been completed.As an alternative to the process above using the related endpoint of the API, you can also make use of Accounting as a Service as the web UI of the accounting module to manually grant a goodwill credit.
IMPORTANT If you use Accounting as a Service to provide goodwill credit, you must account for goodwill on any returns. Using Accounting as a Service means that you are responsible for calculating the refund for returned goods or services.
To create a goodwill for an order, make a POST /accounting/{version}/businesses/{businessCode}/customers/{customerNumber}/orders/{orderReference}/goodwills
request, where {businessCode}
is the ID of the related business entity, {customerNumber}
is the identifier of the affected customer and {orderReference}
is the reference of the order that you would like to grant the goodwill credit to.
For more information, please refer to the related endpoint description within the API Explorer.
POST /accounting/v1/businesses/1000/customers/TFI2021072801/orders/ODE12345678901/goodwills HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
Content-Type: application/json
{
"creditDate": "2018-03-21",
"goodwillDate": "2018-03-21",
"goodwillReason": "CUSTOMER_COMPLAINT",
"goodwillReference": "GDE12345678901",
"invoiceReference": "IDE12345678901",
"items": [{
"grossUnitPrice": 11.9,
"orderItemReference": 1,
"quantity": 1,
"vatAmount": 1.9,
"vatPercent": 19,
"vatType": "NORMAL"
}]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"internalRequestId": "23c9579b-baaf-468f-a529-f876226e183c"
}
In some cases, your customer may wish to receive the payment to a different bank account (IBAN) than to the one from which the origin payment came from. In such case, you can specify the IBAN, bank account owner and BIC (if the account is located outside the SEPA-area) that should be used instead. By default, all other goodwill payments will be made using the original payment method and account details.
If you need to make the goodwill payment to another account, the following fields are required:
IBANcode
bankAccountOwner
BIC
(this field is only mandatory if the account is located outside the SEPA-area)For more information, please refer to the related endpoint description within the API Explorer.
POST /accounting/v1/businesses/1000/customers/TFI2021072801/orders/ODE12345678901/goodwills HTTP/1.1
Host: api-uat.accounting.riverty.io
X-Subscription-Key: YOUR_API_SUBSCRIPTION_TOKEN
Content-Type: application/json
{
"creditDate": "2018-03-21",
"goodwillDate": "2018-03-21",
"goodwillReason": "CUSTOMER_COMPLAINT",
"goodwillReference": "GDE12345678901",
"invoiceReference": "IDE12345678901",
"items": [{
"grossUnitPrice": 11.9,
"orderItemReference": 1,
"quantity": 1,
"vatAmount": 1.9,
"vatPercent": 19,
"vatType": "NORMAL"
}],
"IBANcode": "DE89370400440532013000",
"bankAccountOwner": "Sammy Sample",
"BIC": "INGDDEFFXXX"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"internalRequestId": "23c9579b-baaf-468f-a529-f876226e183c"
}