Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,428 changes: 639 additions & 789 deletions openapi.json

Large diffs are not rendered by default.

77 changes: 73 additions & 4 deletions src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@
/**
* Client for the "Checkouts" API group.
*
* <p>Accept payments from your end users by adding the Checkouts model to your platform. SumUp
* supports standard and single payment 3DS checkout flows. The Checkout model allows creating,
* listing, retrieving, processing and deactivating checkouts. A payment is completed by creating a
* checkout and then processing the checkout.
* <p>Checkouts represent online payment sessions that you create before attempting to charge a
* payer. A checkout captures the payment intent, such as the amount, currency, merchant, and
* optional customer or redirect settings, and then moves through its lifecycle as you process it.
* Use this tag to: - create a checkout before collecting or confirming payment details - process
* the checkout with a card, saved card, wallet, or supported alternative payment method - retrieve
* or list checkouts to inspect their current state and associated payment attempts - deactivate a
* checkout that should no longer be used Typical workflow: - create a checkout with the order
* amount, currency, and merchant information - process the checkout through SumUp client tools such
* as the [Payment Widget and Swift Checkout
* SDK](https://developer.sumup.com/online-payments/checkouts) - retrieve the checkout or use the
* Transactions endpoints to inspect the resulting payment record Checkouts are used to initiate and
* orchestrate online payments. Transactions remain the authoritative record of the resulting
* payment outcome.
*/
public final class CheckoutsAsyncClient {
private final ApiClient apiClient;
Expand All @@ -31,6 +40,66 @@ public CheckoutsAsyncClient(ApiClient apiClient) {
this.apiClient = Objects.requireNonNull(apiClient, "apiClient");
}

/**
* Create an Apple Pay session
*
* <p>Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after
* the customer selects Apple Pay and before calling
* `ApplePaySession.completeMerchantValidation(...)` in the browser. SumUp validates the merchant
* session request and returns the Apple Pay session object that your frontend should pass to
* Apple's JavaScript API.
*
* <p>Operation ID: CreateApplePaySession
*
* @param id Unique ID of the checkout resource.
* @param request The data needed to create an apple pay session for a checkout.
* <p>Call the overload that accepts RequestOptions to customize headers, authorization, or
* request timeout.
* @return CompletableFuture resolved with {@code java.util.Map<String, Object>} parsed response.
* @throws ApiException if the SumUp API returns an error.
*/
public CompletableFuture<java.util.Map<String, Object>> createApplePaySession(
String id, com.sumup.sdk.models.CreateApplePaySessionRequest request) throws ApiException {
return createApplePaySession(id, request, null);
}

/**
* Create an Apple Pay session
*
* <p>Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after
* the customer selects Apple Pay and before calling
* `ApplePaySession.completeMerchantValidation(...)` in the browser. SumUp validates the merchant
* session request and returns the Apple Pay session object that your frontend should pass to
* Apple's JavaScript API.
*
* <p>Operation ID: CreateApplePaySession
*
* @param id Unique ID of the checkout resource.
* @param request The data needed to create an apple pay session for a checkout.
* @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
* {@code null} to use client defaults.
* @return CompletableFuture resolved with {@code java.util.Map<String, Object>} parsed response.
* @throws ApiException if the SumUp API returns an error.
*/
public CompletableFuture<java.util.Map<String, Object>> createApplePaySession(
String id,
com.sumup.sdk.models.CreateApplePaySessionRequest request,
RequestOptions requestOptions)
throws ApiException {
Objects.requireNonNull(id, "id");
String path = "/v0.2/checkouts/{id}/apple-pay-session";
path = path.replace("{id}", ApiClient.urlEncode(String.valueOf(id)));

return this.apiClient.sendAsync(
HttpMethod.PUT,
path,
null,
null,
request,
new TypeReference<java.util.Map<String, Object>>() {},
requestOptions);
}

/**
* Create a checkout
*
Expand Down
77 changes: 73 additions & 4 deletions src/main/java/com/sumup/sdk/clients/CheckoutsClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,19 @@
/**
* Client for the "Checkouts" API group.
*
* <p>Accept payments from your end users by adding the Checkouts model to your platform. SumUp
* supports standard and single payment 3DS checkout flows. The Checkout model allows creating,
* listing, retrieving, processing and deactivating checkouts. A payment is completed by creating a
* checkout and then processing the checkout.
* <p>Checkouts represent online payment sessions that you create before attempting to charge a
* payer. A checkout captures the payment intent, such as the amount, currency, merchant, and
* optional customer or redirect settings, and then moves through its lifecycle as you process it.
* Use this tag to: - create a checkout before collecting or confirming payment details - process
* the checkout with a card, saved card, wallet, or supported alternative payment method - retrieve
* or list checkouts to inspect their current state and associated payment attempts - deactivate a
* checkout that should no longer be used Typical workflow: - create a checkout with the order
* amount, currency, and merchant information - process the checkout through SumUp client tools such
* as the [Payment Widget and Swift Checkout
* SDK](https://developer.sumup.com/online-payments/checkouts) - retrieve the checkout or use the
* Transactions endpoints to inspect the resulting payment record Checkouts are used to initiate and
* orchestrate online payments. Transactions remain the authoritative record of the resulting
* payment outcome.
*/
public final class CheckoutsClient {
private final ApiClient apiClient;
Expand All @@ -30,6 +39,66 @@ public CheckoutsClient(ApiClient apiClient) {
this.apiClient = Objects.requireNonNull(apiClient, "apiClient");
}

/**
* Create an Apple Pay session
*
* <p>Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after
* the customer selects Apple Pay and before calling
* `ApplePaySession.completeMerchantValidation(...)` in the browser. SumUp validates the merchant
* session request and returns the Apple Pay session object that your frontend should pass to
* Apple's JavaScript API.
*
* <p>Operation ID: CreateApplePaySession
*
* @param id Unique ID of the checkout resource.
* @param request The data needed to create an apple pay session for a checkout.
* <p>Call the overload that accepts RequestOptions to customize headers, authorization, or
* request timeout.
* @return {@code java.util.Map<String, Object>} parsed response.
* @throws ApiException if the SumUp API returns an error.
*/
public java.util.Map<String, Object> createApplePaySession(
String id, com.sumup.sdk.models.CreateApplePaySessionRequest request) throws ApiException {
return createApplePaySession(id, request, null);
}

/**
* Create an Apple Pay session
*
* <p>Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after
* the customer selects Apple Pay and before calling
* `ApplePaySession.completeMerchantValidation(...)` in the browser. SumUp validates the merchant
* session request and returns the Apple Pay session object that your frontend should pass to
* Apple's JavaScript API.
*
* <p>Operation ID: CreateApplePaySession
*
* @param id Unique ID of the checkout resource.
* @param request The data needed to create an apple pay session for a checkout.
* @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
* {@code null} to use client defaults.
* @return {@code java.util.Map<String, Object>} parsed response.
* @throws ApiException if the SumUp API returns an error.
*/
public java.util.Map<String, Object> createApplePaySession(
String id,
com.sumup.sdk.models.CreateApplePaySessionRequest request,
RequestOptions requestOptions)
throws ApiException {
Objects.requireNonNull(id, "id");
String path = "/v0.2/checkouts/{id}/apple-pay-session";
path = path.replace("{id}", ApiClient.urlEncode(String.valueOf(id)));

return this.apiClient.send(
HttpMethod.PUT,
path,
null,
null,
request,
new TypeReference<java.util.Map<String, Object>>() {},
requestOptions);
}

/**
* Create a checkout
*
Expand Down
30 changes: 15 additions & 15 deletions src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public PayoutsAsyncClient(ApiClient apiClient) {
/**
* List payouts
*
* <p>Lists ordered payouts for the merchant profile.
* <p>Lists ordered payouts for the merchant account.
*
* <p>Operation ID: ListPayouts
*
Expand All @@ -52,7 +52,7 @@ public CompletableFuture<com.sumup.sdk.models.FinancialPayouts> listPayouts(
/**
* List payouts
*
* <p>Lists ordered payouts for the merchant profile.
* <p>Lists ordered payouts for the merchant account.
*
* <p>Operation ID: ListPayouts
*
Expand All @@ -75,7 +75,7 @@ public CompletableFuture<com.sumup.sdk.models.FinancialPayouts> listPayouts(
/**
* List payouts
*
* <p>Lists ordered payouts for the merchant profile.
* <p>Lists ordered payouts for the merchant account.
*
* <p>Operation ID: ListPayouts
*
Expand Down Expand Up @@ -116,11 +116,11 @@ public CompletableFuture<com.sumup.sdk.models.FinancialPayouts> listPayouts(
/**
* List payouts
*
* <p>Lists ordered payouts for the merchant profile.
* <p>Lists ordered payouts for the merchant account.
*
* <p>Operation ID: ListPayoutsV1
*
* @param merchantCode Path parameter.
* @param merchantCode Merchant code of the account whose payouts should be listed.
* @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* <p>Call the overload that accepts optional parameter objects or RequestOptions to customize
Expand All @@ -137,11 +137,11 @@ public CompletableFuture<com.sumup.sdk.models.FinancialPayouts> listPayoutsV1(
/**
* List payouts
*
* <p>Lists ordered payouts for the merchant profile.
* <p>Lists ordered payouts for the merchant account.
*
* <p>Operation ID: ListPayoutsV1
*
* @param merchantCode Path parameter.
* @param merchantCode Merchant code of the account whose payouts should be listed.
* @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* @param listPayoutsV1 Optional query parameters for this request.
Expand All @@ -162,11 +162,11 @@ public CompletableFuture<com.sumup.sdk.models.FinancialPayouts> listPayoutsV1(
/**
* List payouts
*
* <p>Lists ordered payouts for the merchant profile.
* <p>Lists ordered payouts for the merchant account.
*
* <p>Operation ID: ListPayoutsV1
*
* @param merchantCode Path parameter.
* @param merchantCode Merchant code of the account whose payouts should be listed.
* @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).
* @param listPayoutsV1 Optional query parameters for this request.
Expand Down Expand Up @@ -211,7 +211,7 @@ public static final class ListPayoutsQueryParams {
/**
* Sets the format query parameter.
*
* @param value Query parameter value.
* @param value Response format for the payout list.
* @return This ListPayoutsQueryParams instance.
*/
public ListPayoutsQueryParams format(com.sumup.sdk.models.Format2 value) {
Expand All @@ -222,7 +222,7 @@ public ListPayoutsQueryParams format(com.sumup.sdk.models.Format2 value) {
/**
* Sets the limit query parameter.
*
* @param value Query parameter value.
* @param value Maximum number of payout records to return.
* @return This ListPayoutsQueryParams instance.
*/
public ListPayoutsQueryParams limit(Long value) {
Expand All @@ -233,7 +233,7 @@ public ListPayoutsQueryParams limit(Long value) {
/**
* Sets the order query parameter.
*
* @param value Query parameter value.
* @param value Sort direction for the returned payouts.
* @return This ListPayoutsQueryParams instance.
*/
public ListPayoutsQueryParams order(com.sumup.sdk.models.Order2 value) {
Expand All @@ -258,7 +258,7 @@ public static final class ListPayoutsV1QueryParams {
/**
* Sets the format query parameter.
*
* @param value Query parameter value.
* @param value Response format for the payout list.
* @return This ListPayoutsV1QueryParams instance.
*/
public ListPayoutsV1QueryParams format(com.sumup.sdk.models.Format value) {
Expand All @@ -269,7 +269,7 @@ public ListPayoutsV1QueryParams format(com.sumup.sdk.models.Format value) {
/**
* Sets the limit query parameter.
*
* @param value Query parameter value.
* @param value Maximum number of payout records to return.
* @return This ListPayoutsV1QueryParams instance.
*/
public ListPayoutsV1QueryParams limit(Long value) {
Expand All @@ -280,7 +280,7 @@ public ListPayoutsV1QueryParams limit(Long value) {
/**
* Sets the order query parameter.
*
* @param value Query parameter value.
* @param value Sort direction for the returned payouts.
* @return This ListPayoutsV1QueryParams instance.
*/
public ListPayoutsV1QueryParams order(com.sumup.sdk.models.Order2 value) {
Expand Down
Loading
Loading