Package com.adyen.service.checkout
Class PaymentsApi
- java.lang.Object
-
- com.adyen.Service
-
- com.adyen.service.checkout.PaymentsApi
-
public class PaymentsApi extends Service
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPI_VERSIONprotected StringbaseURL
-
Constructor Summary
Constructors Constructor Description PaymentsApi(Client client)Payments constructor inpackage.PaymentsApi(Client client, String baseURL)Payments constructor inpackage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CardDetailsResponsecardDetails(CardDetailsRequest cardDetailsRequest)Get the list of brands on the cardCardDetailsResponsecardDetails(CardDetailsRequest cardDetailsRequest, RequestOptions requestOptions)Get the list of brands on the cardSessionResultResponsegetResultOfPaymentSession(String sessionId, String sessionResult)Get the result of a payment sessionSessionResultResponsegetResultOfPaymentSession(String sessionId, String sessionResult, RequestOptions requestOptions)Get the result of a payment sessionPaymentMethodsResponsepaymentMethods(PaymentMethodsRequest paymentMethodsRequest)Get a list of available payment methodsPaymentMethodsResponsepaymentMethods(PaymentMethodsRequest paymentMethodsRequest, RequestOptions requestOptions)Get a list of available payment methodsPaymentResponsepayments(PaymentRequest paymentRequest)Start a transactionPaymentResponsepayments(PaymentRequest paymentRequest, RequestOptions requestOptions)Start a transactionPaymentDetailsResponsepaymentsDetails(PaymentDetailsRequest paymentDetailsRequest)Submit details for a paymentPaymentDetailsResponsepaymentsDetails(PaymentDetailsRequest paymentDetailsRequest, RequestOptions requestOptions)Submit details for a paymentCreateCheckoutSessionResponsesessions(CreateCheckoutSessionRequest createCheckoutSessionRequest)Create a payment sessionCreateCheckoutSessionResponsesessions(CreateCheckoutSessionRequest createCheckoutSessionRequest, RequestOptions requestOptions)Create a payment session-
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
-
PaymentsApi
public PaymentsApi(Client client)
Payments constructor inpackage.- Parameters:
client-Client(required)
-
-
Method Detail
-
cardDetails
public CardDetailsResponse cardDetails(CardDetailsRequest cardDetailsRequest) throws ApiException, IOException
Get the list of brands on the card- Parameters:
cardDetailsRequest-CardDetailsRequest(required)- Returns:
CardDetailsResponse- Throws:
ApiException- if fails to make API callIOException
-
cardDetails
public CardDetailsResponse cardDetails(CardDetailsRequest cardDetailsRequest, RequestOptions requestOptions) throws ApiException, IOException
Get the list of brands on the card- Parameters:
cardDetailsRequest-CardDetailsRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
CardDetailsResponse- Throws:
ApiException- if fails to make API callIOException
-
getResultOfPaymentSession
public SessionResultResponse getResultOfPaymentSession(String sessionId, String sessionResult) throws ApiException, IOException
Get the result of a payment session- Parameters:
sessionId-StringA unique identifier of the session. (required)sessionResult-StringThe `sessionResult` value from the Drop-in or Component. (required)- Returns:
SessionResultResponse- Throws:
ApiException- if fails to make API callIOException
-
getResultOfPaymentSession
public SessionResultResponse getResultOfPaymentSession(String sessionId, String sessionResult, RequestOptions requestOptions) throws ApiException, IOException
Get the result of a payment session- Parameters:
sessionId-StringA unique identifier of the session. (required)sessionResult-StringQuery: The `sessionResult` value from the Drop-in or Component. (required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
SessionResultResponse- Throws:
ApiException- if fails to make API callIOException
-
paymentMethods
public PaymentMethodsResponse paymentMethods(PaymentMethodsRequest paymentMethodsRequest) throws ApiException, IOException
Get a list of available payment methods- Parameters:
paymentMethodsRequest-PaymentMethodsRequest(required)- Returns:
PaymentMethodsResponse- Throws:
ApiException- if fails to make API callIOException
-
paymentMethods
public PaymentMethodsResponse paymentMethods(PaymentMethodsRequest paymentMethodsRequest, RequestOptions requestOptions) throws ApiException, IOException
Get a list of available payment methods- Parameters:
paymentMethodsRequest-PaymentMethodsRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
PaymentMethodsResponse- Throws:
ApiException- if fails to make API callIOException
-
payments
public PaymentResponse payments(PaymentRequest paymentRequest) throws ApiException, IOException
Start a transaction- Parameters:
paymentRequest-PaymentRequest(required)- Returns:
PaymentResponse- Throws:
ApiException- if fails to make API callIOException
-
payments
public PaymentResponse payments(PaymentRequest paymentRequest, RequestOptions requestOptions) throws ApiException, IOException
Start a transaction- Parameters:
paymentRequest-PaymentRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
PaymentResponse- Throws:
ApiException- if fails to make API callIOException
-
paymentsDetails
public PaymentDetailsResponse paymentsDetails(PaymentDetailsRequest paymentDetailsRequest) throws ApiException, IOException
Submit details for a payment- Parameters:
paymentDetailsRequest-PaymentDetailsRequest(required)- Returns:
PaymentDetailsResponse- Throws:
ApiException- if fails to make API callIOException
-
paymentsDetails
public PaymentDetailsResponse paymentsDetails(PaymentDetailsRequest paymentDetailsRequest, RequestOptions requestOptions) throws ApiException, IOException
Submit details for a payment- Parameters:
paymentDetailsRequest-PaymentDetailsRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
PaymentDetailsResponse- Throws:
ApiException- if fails to make API callIOException
-
sessions
public CreateCheckoutSessionResponse sessions(CreateCheckoutSessionRequest createCheckoutSessionRequest) throws ApiException, IOException
Create a payment session- Parameters:
createCheckoutSessionRequest-CreateCheckoutSessionRequest(required)- Returns:
CreateCheckoutSessionResponse- Throws:
ApiException- if fails to make API callIOException
-
sessions
public CreateCheckoutSessionResponse sessions(CreateCheckoutSessionRequest createCheckoutSessionRequest, RequestOptions requestOptions) throws ApiException, IOException
Create a payment session- Parameters:
createCheckoutSessionRequest-CreateCheckoutSessionRequest(required)requestOptions-RequestOptionsObject to store additional data such as idempotency-keys (optional)- Returns:
CreateCheckoutSessionResponse- Throws:
ApiException- if fails to make API callIOException
-
-