Find refunds
Refunds
The refund API allows you to manipulate refunds that have been created on a payment. Funds will be refunded to either the card or wallet that was originally charged or to a bank account if a direct refund is not possible
Request
Retrieves the details of refunds based on your order identifier, your unique transaction reference, or both.
In addition to the filter, you can also provide an offset and limit. In combination with the total number of refunds matching the filter that is part of the response, this allows you to implement paging.
Query parameters
Query parameters for this method
Property | Type | Required | Repeat | Details |
---|---|---|---|---|
hostedCheckoutId | string | no | no | read close |
close
DescriptionYour hosted checkout identifier to filter on.
|
||||
merchantReference | string | no | no | read close |
close
DescriptionYour unique transaction reference to filter on.
|
||||
merchantOrderId | integer | no | no | read close |
close
DescriptionYour order identifier to filter on.
|
||||
offset | integer | no | no | read close |
close
DescriptionThe zero-based index of the first refund in the result. If omitted, the offset will be 0.
|
||||
limit | integer | no | no | read close |
close
DescriptionThe maximum number of refunds to return, with a maximum of 100. If omitted, the limit will be 10.
|
||||
Property | Type | Required | Repeat | Details |
Request example
This scenario you will probably use the most
-
var query = new FindRefundsParams(); query.HostedCheckoutId = "15c09dac-bf44-486a-af6b-edfd8680a166"; query.MerchantReference = "AcmeOrder0001"; query.MerchantOrderId = 123456L; query.Offset = 0; query.Limit = 10; var response = await client.V1.WithNewMerchant("merchantId").Refunds.Find(query);
Responses
Please find below an overview of the possible responses.
Response 200 - OKFindRefundsResponse
The response contains an array of refunds that match the filters supplied in the request.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
limit | integer | no | read close |
close
DescriptionThe limit you used in the request.
|
|||
offset | integer | no | read close |
close
DescriptionThe offset you used in the request.
|
|||
array of object | no | read close | |
close
DescriptionA list of refunds that matched your filter, starting at the given offset and limited to the given limit.
|
|||
close
DescriptionOur unique refund transaction identifier
|
|||
close
DescriptionObject containing amount and ISO currency code attributes
|
|||
close
DescriptionAmount in cents and always having 2 decimals
|
|||
close
DescriptionThree-letter ISO currency code representing the currency for the amount
|
|||
close
DescriptionAmount paid
|
|||
close
DescriptionObject containing specific bank refund details
|
|||
close
DescriptionRefund product identifier
Please see refund products for a full overview of possible values. |
|||
close
DescriptionTotal paid amount (in cents and always with 2 decimals)
|
|||
close
DescriptionTotal refunded amount (in cents and always with 2 decimals)
|
|||
close
DescriptionObject containing specific card refund details
|
|||
close
DescriptionCard Authorization code as returned by the acquirer
|
|||
close
DescriptionThe complete credit/debit card number
|
|||
close
DescriptionThe card holder's name on the card. Minimum length of 2, maximum length of 51 characters.
|
|||
close
DescriptionExpiry date of the card
Format: MMYY |
|||
close
DescriptionRefund product identifier
Please see refund products for a full overview of possible values. |
|||
close
DescriptionTotal paid amount (in cents and always with 2 decimals)
|
|||
close
DescriptionTotal refunded amount (in cents and always with 2 decimals)
|
|||
close
DescriptionObject containing specific cash refund details
|
|||
close
DescriptionRefund product identifier
Please see refund products for a full overview of possible values. |
|||
close
DescriptionTotal paid amount (in cents and always with 2 decimals)
|
|||
close
DescriptionTotal refunded amount (in cents and always with 2 decimals)
|
|||
close
DescriptionObject containing specific e-invoice refund details
|
|||
close
DescriptionRefund product identifier
Please see refund products for a full overview of possible values. |
|||
close
DescriptionTotal paid amount (in cents and always with 2 decimals)
|
|||
close
DescriptionTotal refunded amount (in cents and always with 2 decimals)
|
|||
close
DescriptionObject containing specific eWallet refund details
|
|||
close
DescriptionPayPal (payment product 840) specific details
|
|||
close
DescriptionObject containing the PayPal account details
|
|||
close
DescriptionStatus of the PayPal account.
Possible values are:
|
|||
close
DescriptionStatus of the customer's shipping address as registered by PayPal
Possible values are:
|
|||
close
DescriptionThe unique identifier of a PayPal account and will never change in the life cycle of a PayPal account
|
|||
close
DescriptionRefund product identifier
Please see refund products for a full overview of possible values. |
|||
close
DescriptionTotal paid amount (in cents and always with 2 decimals)
|
|||
close
DescriptionTotal refunded amount (in cents and always with 2 decimals)
|
|||
close
DescriptionObject containing specific mobile refund details
|
|||
close
DescriptionThe network that was used for the refund. The string that represents the network is identical to the strings that the payment product vendors use in their documentation.
For instance: "Visa" for Apple Pay, and "VISA" for Google Pay.
|
|||
close
DescriptionRefund product identifier
Please see refund products for a full overview of possible values. |
|||
close
DescriptionTotal paid amount (in cents and always with 2 decimals)
|
|||
close
DescriptionTotal refunded amount (in cents and always with 2 decimals)
|
|||
close
DescriptionPayment method identifier used by the our payment engine with the following possible values:
|
|||
close
DescriptionObject that holds all reference properties that are linked to this refund
|
|||
close
DescriptionYour order ID for this transaction that is also returned in our report files
|
|||
close
DescriptionYour unique reference of the transaction that is also returned in our report files. This is almost always used for your reconciliation of our report files.
|
|||
close
DescriptionPayment Reference generated by WebCollect
|
|||
close
DescriptionProvides an additional means of reconciliation for Gateway merchants
|
|||
close
DescriptionProvides an additional means of reconciliation, this is the MerchantId used at the provider
|
|||
close
DescriptionProvides an additional means of reconciliation for Gateway merchants
|
|||
close
DescriptionWhen you did not supply a merchantReference for your payment, you need to fill this property with the reference of the original payment when you want to refund it
|
|||
close
DescriptionCurrent high-level status of the refund in a human-readable form. Possible values are:
Please see Statuses for a full overview of possible values. |
|||
close
DescriptionThis object has the numeric representation of the current refund status, timestamp of last status change and performable action on the current refund resource.
In case of a rejected refund, detailed error information is listed.
|
|||
close
DescriptionCustom object contains the set of errors
|
|||
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
close
DescriptionError code
|
|||
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
close
DescriptionReturned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query. Some common examples:
|
|||
close
DescriptionID of the request that can be used for debugging purposes
|
|||
close
DescriptionFlag indicating if the payment can be cancelled
|
|||
close
DescriptionFlag indicating whether a rejected payment may be retried by the merchant without incurring a fee
|
|||
close
DescriptionThis is the raw response returned by the acquirer. This property contains unprocessed data directly returned by the acquirer. It's recommended for data analysis only due to its dynamic nature, which may undergo future changes.
|
|||
close
DescriptionName of the key or property
|
|||
close
DescriptionValue of the key or property
|
|||
close
DescriptionHighlevel status of the payment, payout or refund with the following possible values:
Please see Statuses for a full overview of possible values. |
|||
close
DescriptionNumeric status code of the legacy API. It is returned to ease the migration from the legacy APIs to Worldline Connect. You should not write new business logic based on this property as it will be deprecated in a future version of the API. The value can also be found in the GlobalCollect Payment Console, in the Ogone BackOffice and in report files.
|
|||
close
DescriptionDate and time of payment
Format: YYYYMMDDHH24MISS |
|||
totalCount | integer | no | read close |
close
DescriptionThe total number of refunds that matched your filter.
|
|||
Property | Type | Required | Details |
Response example
This scenario you will probably use the most
-
{ "refunds" : [ { "id" : "00000085001000006995000-500001", "refundOutput" : { "amountOfMoney" : { "amount" : 1, "currencyCode" : "EUR" }, "references" : { "merchantOrderId" : 123456, "merchantReference" : "AcmeOrder0001", "paymentReference" : "0" }, "paymentMethod" : "card", "cardRefundMethodSpecificOutput" : { "totalAmountPaid" : 100, "totalAmountRefunded" : 0 } }, "status" : "PENDING_APPROVAL", "statusOutput" : { "isCancellable" : true, "statusCode" : 800, "statusCodeChangeDateTime" : "20140630132747" } } ], "offset" : 0, "limit" : 10, "totalCount" : 1 }
Response 400 - Bad requestErrorResponse
You did not provide a valid filter, your offset or limit is negative, or your limit is too high.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
errorId | string | yes | read close |
close
DescriptionUnique reference, for debugging purposes, of this error response
|
|||
array of object | yes | read close | |
close
DescriptionList of one or more errors
|
|||
close
DescriptionCategory the error belongs to. The category should give an indication of the type of error you are dealing with.
Possible values:
|
|||
close
DescriptionError code
|
|||
close
DescriptionHTTP status code for this error that can be used to determine the type of error
|
|||
close
DescriptionID of the error. This is a short human-readable message that briefly describes the error.
|
|||
close
DescriptionHuman-readable error message that is not meant to be relayed to customer as it might tip off people who are trying to commit fraud
|
|||
close
DescriptionReturned only if the error relates to a value that was missing or incorrect.
Contains a location path to the value as a JSonata query. Some common examples:
|
|||
close
DescriptionID of the request that can be used for debugging purposes
|
|||
Property | Type | Required | Details |
Response example
This scenario you will probably use the most
-
{ "errorId" : "15eabcd5-30b3-479b-ae03-67bb351c07e6-00000092", "errors" : [ { "code" : "20000000", "propertyName" : "bankAccountBban.accountNumber", "message" : "PARAMETER_NOT_FOUND_IN_REQUEST" } ] }