Get refund
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
This REST service retrieves the status and additional information of a refund. No payload is required in the request.
Request example
This scenario you will probably use the most
-
const sdkResponse = await client.v1.refunds.get("merchantId", "refundId"); // sdkResponse has the following properties: // - status: the HTTP status code // - body: the response body // - isSuccess: true if the call was successful, // or false if the Worldline Global Collect platform returned an error response
Responses
Please find below an overview of the possible responses.
Response 200 - OKRefundResponse
For every successfully fetched refund resource a HTTP 200 response is returned. The response body holds JSON objects detailing the refund resource retrieved.
Properties
|
|||
Property | Type | Required | Details |
---|---|---|---|
id | string | no | read close |
close
DescriptionOur unique refund transaction identifier
|
|||
object | no | read close | |
close
DescriptionInformation of the refund resource such as amount, currency, nature of the refund.
|
|||
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
|
|||
status | enum | no | read close |
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. |
|||
object | no | read close | |
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 |
|||
Property | Type | Required | Details |
Response example
This scenario you will probably use the most
-
{ "id" : "00000085001000006995000-500001", "refundOutput" : { "amountOfMoney" : { "amount" : 1, "currencyCode" : "EUR" }, "references" : { "merchantReference" : "AcmeOrder0001", "paymentReference" : "0" }, "paymentMethod" : "card", "cardRefundMethodSpecificOutput" : { "totalAmountPaid" : 100, "totalAmountRefunded" : 0 } }, "status" : "PENDING_APPROVAL", "statusOutput" : { "isCancellable" : true, "statusCode" : 800, "statusCodeChangeDateTime" : "20140630132747" } }