Package com.adyen.service
Class PaymentApi
- java.lang.Object
-
- com.adyen.Service
-
- com.adyen.service.PaymentApi
-
public class PaymentApi extends Service
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPI_VERSIONprotected StringbaseURL
-
Constructor Summary
Constructors Constructor Description PaymentApi(Client client)Default constructor inpackage.PaymentApi(Client client, String baseURL)Alternative constructor inpackage.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ModificationResultadjustAuthorisation(AdjustAuthorisationRequest adjustAuthorisationRequest)Change the authorised amountModificationResultadjustAuthorisation(AdjustAuthorisationRequest adjustAuthorisationRequest, RequestOptions requestOptions)Change the authorised amountPaymentResultauthorise(PaymentRequest paymentRequest)Create an authorisationPaymentResultauthorise(PaymentRequest paymentRequest, RequestOptions requestOptions)Create an authorisationPaymentResultauthorise3d(PaymentRequest3d paymentRequest3d)Complete a 3DS authorisationPaymentResultauthorise3d(PaymentRequest3d paymentRequest3d, RequestOptions requestOptions)Complete a 3DS authorisationPaymentResultauthorise3ds2(PaymentRequest3ds2 paymentRequest3ds2)Complete a 3DS2 authorisationPaymentResultauthorise3ds2(PaymentRequest3ds2 paymentRequest3ds2, RequestOptions requestOptions)Complete a 3DS2 authorisationModificationResultcancel(CancelRequest cancelRequest)Cancel an authorisationModificationResultcancel(CancelRequest cancelRequest, RequestOptions requestOptions)Cancel an authorisationModificationResultcancelOrRefund(CancelOrRefundRequest cancelOrRefundRequest)Cancel or refund a paymentModificationResultcancelOrRefund(CancelOrRefundRequest cancelOrRefundRequest, RequestOptions requestOptions)Cancel or refund a paymentModificationResultcapture(CaptureRequest captureRequest)Capture an authorisationModificationResultcapture(CaptureRequest captureRequest, RequestOptions requestOptions)Capture an authorisationModificationResultdonate(DonationRequest donationRequest)Deprecated.ModificationResultdonate(DonationRequest donationRequest, RequestOptions requestOptions)Deprecated.AuthenticationResultResponsegetAuthenticationResult(AuthenticationResultRequest authenticationResultRequest)Get the 3DS authentication resultAuthenticationResultResponsegetAuthenticationResult(AuthenticationResultRequest authenticationResultRequest, RequestOptions requestOptions)Get the 3DS authentication resultModificationResultrefund(RefundRequest refundRequest)Refund a captured paymentModificationResultrefund(RefundRequest refundRequest, RequestOptions requestOptions)Refund a captured paymentThreeDS2ResultResponseretrieve3ds2Result(ThreeDS2ResultRequest threeDS2ResultRequest)Get the 3DS2 authentication resultThreeDS2ResultResponseretrieve3ds2Result(ThreeDS2ResultRequest threeDS2ResultRequest, RequestOptions requestOptions)Get the 3DS2 authentication resultModificationResulttechnicalCancel(TechnicalCancelRequest technicalCancelRequest)Cancel an authorisation using your referenceModificationResulttechnicalCancel(TechnicalCancelRequest technicalCancelRequest, RequestOptions requestOptions)Cancel an authorisation using your referenceModificationResultvoidPendingRefund(VoidPendingRefundRequest voidPendingRefundRequest)Cancel an in-person refundModificationResultvoidPendingRefund(VoidPendingRefundRequest voidPendingRefundRequest, RequestOptions requestOptions)Cancel an in-person refund-
Methods inherited from class com.adyen.Service
createBaseURL, getClient, isApiKeyRequired, setApiKeyRequired, setClient
-
-
-
-
Field Detail
-
API_VERSION
public static final String API_VERSION
- See Also:
- Constant Field Values
-
baseURL
protected String baseURL
-
-
Constructor Detail
-
PaymentApi
public PaymentApi(Client client)
Default constructor inpackage.- Parameters:
client-Client(required)
-
-
Method Detail
-
adjustAuthorisation
public ModificationResult adjustAuthorisation(AdjustAuthorisationRequest adjustAuthorisationRequest) throws ApiException, IOException
Change the authorised amount- Parameters:
adjustAuthorisationRequest-AdjustAuthorisationRequest(required)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
adjustAuthorisation
public ModificationResult adjustAuthorisation(AdjustAuthorisationRequest adjustAuthorisationRequest, RequestOptions requestOptions) throws ApiException, IOException
Change the authorised amount- Parameters:
adjustAuthorisationRequest-AdjustAuthorisationRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
authorise
public PaymentResult authorise(PaymentRequest paymentRequest) throws ApiException, IOException
Create an authorisation- Parameters:
paymentRequest-PaymentRequest(required)- Returns:
PaymentResult- Throws:
ApiException- if fails to make API callIOException
-
authorise
public PaymentResult authorise(PaymentRequest paymentRequest, RequestOptions requestOptions) throws ApiException, IOException
Create an authorisation- Parameters:
paymentRequest-PaymentRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
PaymentResult- Throws:
ApiException- if fails to make API callIOException
-
authorise3d
public PaymentResult authorise3d(PaymentRequest3d paymentRequest3d) throws ApiException, IOException
Complete a 3DS authorisation- Parameters:
paymentRequest3d-PaymentRequest3d(required)- Returns:
PaymentResult- Throws:
ApiException- if fails to make API callIOException
-
authorise3d
public PaymentResult authorise3d(PaymentRequest3d paymentRequest3d, RequestOptions requestOptions) throws ApiException, IOException
Complete a 3DS authorisation- Parameters:
paymentRequest3d-PaymentRequest3d(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
PaymentResult- Throws:
ApiException- if fails to make API callIOException
-
authorise3ds2
public PaymentResult authorise3ds2(PaymentRequest3ds2 paymentRequest3ds2) throws ApiException, IOException
Complete a 3DS2 authorisation- Parameters:
paymentRequest3ds2-PaymentRequest3ds2(required)- Returns:
PaymentResult- Throws:
ApiException- if fails to make API callIOException
-
authorise3ds2
public PaymentResult authorise3ds2(PaymentRequest3ds2 paymentRequest3ds2, RequestOptions requestOptions) throws ApiException, IOException
Complete a 3DS2 authorisation- Parameters:
paymentRequest3ds2-PaymentRequest3ds2(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
PaymentResult- Throws:
ApiException- if fails to make API callIOException
-
cancel
public ModificationResult cancel(CancelRequest cancelRequest) throws ApiException, IOException
Cancel an authorisation- Parameters:
cancelRequest-CancelRequest(required)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
cancel
public ModificationResult cancel(CancelRequest cancelRequest, RequestOptions requestOptions) throws ApiException, IOException
Cancel an authorisation- Parameters:
cancelRequest-CancelRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
cancelOrRefund
public ModificationResult cancelOrRefund(CancelOrRefundRequest cancelOrRefundRequest) throws ApiException, IOException
Cancel or refund a payment- Parameters:
cancelOrRefundRequest-CancelOrRefundRequest(required)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
cancelOrRefund
public ModificationResult cancelOrRefund(CancelOrRefundRequest cancelOrRefundRequest, RequestOptions requestOptions) throws ApiException, IOException
Cancel or refund a payment- Parameters:
cancelOrRefundRequest-CancelOrRefundRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
capture
public ModificationResult capture(CaptureRequest captureRequest) throws ApiException, IOException
Capture an authorisation- Parameters:
captureRequest-CaptureRequest(required)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
capture
public ModificationResult capture(CaptureRequest captureRequest, RequestOptions requestOptions) throws ApiException, IOException
Capture an authorisation- Parameters:
captureRequest-CaptureRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
donate
@Deprecated public ModificationResult donate(DonationRequest donationRequest) throws ApiException, IOException
Deprecated.Create a donation- Parameters:
donationRequest-DonationRequest(required)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
donate
@Deprecated public ModificationResult donate(DonationRequest donationRequest, RequestOptions requestOptions) throws ApiException, IOException
Deprecated.Create a donation- Parameters:
donationRequest-DonationRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
getAuthenticationResult
public AuthenticationResultResponse getAuthenticationResult(AuthenticationResultRequest authenticationResultRequest) throws ApiException, IOException
Get the 3DS authentication result- Parameters:
authenticationResultRequest-AuthenticationResultRequest(required)- Returns:
AuthenticationResultResponse- Throws:
ApiException- if fails to make API callIOException
-
getAuthenticationResult
public AuthenticationResultResponse getAuthenticationResult(AuthenticationResultRequest authenticationResultRequest, RequestOptions requestOptions) throws ApiException, IOException
Get the 3DS authentication result- Parameters:
authenticationResultRequest-AuthenticationResultRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
AuthenticationResultResponse- Throws:
ApiException- if fails to make API callIOException
-
refund
public ModificationResult refund(RefundRequest refundRequest) throws ApiException, IOException
Refund a captured payment- Parameters:
refundRequest-RefundRequest(required)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
refund
public ModificationResult refund(RefundRequest refundRequest, RequestOptions requestOptions) throws ApiException, IOException
Refund a captured payment- Parameters:
refundRequest-RefundRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
retrieve3ds2Result
public ThreeDS2ResultResponse retrieve3ds2Result(ThreeDS2ResultRequest threeDS2ResultRequest) throws ApiException, IOException
Get the 3DS2 authentication result- Parameters:
threeDS2ResultRequest-ThreeDS2ResultRequest(required)- Returns:
ThreeDS2ResultResponse- Throws:
ApiException- if fails to make API callIOException
-
retrieve3ds2Result
public ThreeDS2ResultResponse retrieve3ds2Result(ThreeDS2ResultRequest threeDS2ResultRequest, RequestOptions requestOptions) throws ApiException, IOException
Get the 3DS2 authentication result- Parameters:
threeDS2ResultRequest-ThreeDS2ResultRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ThreeDS2ResultResponse- Throws:
ApiException- if fails to make API callIOException
-
technicalCancel
public ModificationResult technicalCancel(TechnicalCancelRequest technicalCancelRequest) throws ApiException, IOException
Cancel an authorisation using your reference- Parameters:
technicalCancelRequest-TechnicalCancelRequest(required)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
technicalCancel
public ModificationResult technicalCancel(TechnicalCancelRequest technicalCancelRequest, RequestOptions requestOptions) throws ApiException, IOException
Cancel an authorisation using your reference- Parameters:
technicalCancelRequest-TechnicalCancelRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
voidPendingRefund
public ModificationResult voidPendingRefund(VoidPendingRefundRequest voidPendingRefundRequest) throws ApiException, IOException
Cancel an in-person refund- Parameters:
voidPendingRefundRequest-VoidPendingRefundRequest(required)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
voidPendingRefund
public ModificationResult voidPendingRefund(VoidPendingRefundRequest voidPendingRefundRequest, RequestOptions requestOptions) throws ApiException, IOException
Cancel an in-person refund- Parameters:
voidPendingRefundRequest-VoidPendingRefundRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
ModificationResult- Throws:
ApiException- if fails to make API callIOException
-
-