All URIs are relative to https://pal-test.adyen.com/pal/servlet/Payment/v68
Method | HTTP request | Description |
---|---|---|
postAdjustAuthorisation | POST /adjustAuthorisation | Change the authorised amount |
postCancel | POST /cancel | Cancel an authorisation |
postCancelOrRefund | POST /cancelOrRefund | Cancel or refund a payment |
postCapture | POST /capture | Capture an authorisation |
postDonate | POST /donate | Create a donation |
postRefund | POST /refund | Refund a captured payment |
postTechnicalCancel | POST /technicalCancel | Cancel an authorisation using your reference |
postVoidPendingRefund | POST /voidPendingRefund | Cancel an in-person refund |
ModificationResult postAdjustAuthorisation(adjustAuthorisationRequest)
Change the authorised amount
Allows you to increase or decrease the authorised amount after the initial authorisation has taken place. This functionality enables for example tipping, improving the chances your authorisation will be valid, or charging the shopper when they have already left the merchant premises. > This endpoint is part of our classic API integration. > If you have a newer integration, and are doing: > * Asynchronous adjustments, use the `/payments/{paymentPspReference}/amountUpdates` endpoint on Checkout API. > * Synchronous adjustments, use this endpoint.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.payment.*
val apiInstance = ModificationsApi()
val adjustAuthorisationRequest : AdjustAuthorisationRequest = // AdjustAuthorisationRequest |
try {
val result : ModificationResult = apiInstance.postAdjustAuthorisation(adjustAuthorisationRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModificationsApi#postAdjustAuthorisation")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModificationsApi#postAdjustAuthorisation")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
adjustAuthorisationRequest | AdjustAuthorisationRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
ModificationResult postCancel(cancelRequest)
Cancel an authorisation
Cancels the authorisation hold on a payment, returning a unique reference for this request. You can cancel payments after authorisation only for payment methods that support distinct authorisations and captures. For more information, refer to Cancel. > This endpoint is part of our classic API integration. If using a newer integration, use the `/payments/{paymentPspReference}/cancels` endpoint under Checkout API instead.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.payment.*
val apiInstance = ModificationsApi()
val cancelRequest : CancelRequest = // CancelRequest |
try {
val result : ModificationResult = apiInstance.postCancel(cancelRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModificationsApi#postCancel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModificationsApi#postCancel")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
cancelRequest | CancelRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
ModificationResult postCancelOrRefund(cancelOrRefundRequest)
Cancel or refund a payment
Cancels a payment if it has not been captured yet, or refunds it if it has already been captured. This is useful when it is not certain if the payment has been captured or not (for example, when using auto-capture). Do not use this endpoint for payments that involve: * Multiple partial captures. * Split data either at time of payment or capture for Adyen for Platforms. Instead, check if the payment has been captured and make a corresponding `/refund` or `/cancel` call. For more information, refer to Cancel or refund. > This endpoint is part of our classic API integration. If using a newer integration, use the `/payments/{paymentPspReference}/reversals` endpoint under Checkout API instead.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.payment.*
val apiInstance = ModificationsApi()
val cancelOrRefundRequest : CancelOrRefundRequest = // CancelOrRefundRequest |
try {
val result : ModificationResult = apiInstance.postCancelOrRefund(cancelOrRefundRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModificationsApi#postCancelOrRefund")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModificationsApi#postCancelOrRefund")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
cancelOrRefundRequest | CancelOrRefundRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
ModificationResult postCapture(captureRequest)
Capture an authorisation
Captures the authorisation hold on a payment, returning a unique reference for this request. Usually the full authorisation amount is captured, however it's also possible to capture a smaller amount, which results in cancelling the remaining authorisation balance. Payment methods that are captured automatically after authorisation don't need to be captured. However, submitting a capture request on these transactions will not result in double charges. If immediate or delayed auto-capture is enabled, calling the capture method is not neccessary. For more information refer to Capture. > This endpoint is part of our classic API integration. If using a newer integration, use the `/payments/{paymentPspReference}/captures` endpoint on Checkout API instead.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.payment.*
val apiInstance = ModificationsApi()
val captureRequest : CaptureRequest = // CaptureRequest |
try {
val result : ModificationResult = apiInstance.postCapture(captureRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModificationsApi#postCapture")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModificationsApi#postCapture")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
captureRequest | CaptureRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
ModificationResult postDonate(donationRequest)
Create a donation
Schedules a new payment to be created (including a new authorisation request) for the specified donation using the payment details of the original payment. > This endpoint is part of our classic API integration. If using a newer integration, use the `/donations` endpoint under Checkout API instead.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.payment.*
val apiInstance = ModificationsApi()
val donationRequest : DonationRequest = // DonationRequest |
try {
val result : ModificationResult = apiInstance.postDonate(donationRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModificationsApi#postDonate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModificationsApi#postDonate")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
donationRequest | DonationRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
ModificationResult postRefund(refundRequest)
Refund a captured payment
Refunds a payment that has previously been captured, returning a unique reference for this request. Refunding can be done on the full captured amount or a partial amount. Multiple (partial) refunds will be accepted as long as their sum doesn't exceed the captured amount. Payments which have been authorised, but not captured, cannot be refunded, use the /cancel method instead. Some payment methods/gateways do not support partial/multiple refunds. A margin above the captured limit can be configured to cover shipping/handling costs. For more information, refer to Refund. > This endpoint is part of our classic API integration. If using a newer integration, use the `/payments/{paymentPspReference}/refunds` endpoint under Checkout API instead.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.payment.*
val apiInstance = ModificationsApi()
val refundRequest : RefundRequest = // RefundRequest |
try {
val result : ModificationResult = apiInstance.postRefund(refundRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModificationsApi#postRefund")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModificationsApi#postRefund")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
refundRequest | RefundRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
ModificationResult postTechnicalCancel(technicalCancelRequest)
Cancel an authorisation using your reference
This endpoint allows you to cancel a payment if you do not have the PSP reference of the original payment request available. In your call, refer to the original payment by using the `reference` that you specified in your payment request. For more information, see Technical cancel. > This endpoint is part of our classic API integration. If using a newer integration, use the `/cancels` endpoint under Checkout API instead.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.payment.*
val apiInstance = ModificationsApi()
val technicalCancelRequest : TechnicalCancelRequest = // TechnicalCancelRequest |
try {
val result : ModificationResult = apiInstance.postTechnicalCancel(technicalCancelRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModificationsApi#postTechnicalCancel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModificationsApi#postTechnicalCancel")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
technicalCancelRequest | TechnicalCancelRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json
ModificationResult postVoidPendingRefund(voidPendingRefundRequest)
Cancel an in-person refund
This endpoint allows you to cancel an unreferenced refund request before it has been completed. In your call, you can refer to the original refund request either by using the `tenderReference`, or the `pspReference`. We recommend implementing based on the `tenderReference`, as this is generated for both offline and online transactions. For more information, refer to Cancel an unreferenced refund.
// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.payment.*
val apiInstance = ModificationsApi()
val voidPendingRefundRequest : VoidPendingRefundRequest = // VoidPendingRefundRequest |
try {
val result : ModificationResult = apiInstance.postVoidPendingRefund(voidPendingRefundRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModificationsApi#postVoidPendingRefund")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModificationsApi#postVoidPendingRefund")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
voidPendingRefundRequest | VoidPendingRefundRequest | [optional] |
Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""
- Content-Type: application/json
- Accept: application/json