Skip to content
Open
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
11 changes: 11 additions & 0 deletions src/main/java/com/phonepe/sdk/pg/common/BaseClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
import okhttp3.OkHttpClient;

@Getter
/**
* Abstract base class for all PhonePe Payment Gateway SDK clients.
*
* <p>Provides shared functionality including OAuth2 token management,
* authenticated HTTP request execution with automatic token refresh,
* and SDK event telemetry publishing.</p>
*
* @see com.phonepe.sdk.pg.payments.v2.StandardCheckoutClient
* @see com.phonepe.sdk.pg.payments.v2.CustomCheckoutClient
* @see com.phonepe.sdk.pg.subscription.v2.SubscriptionClient
*/
public abstract class BaseClient {

private final ObjectMapper objectMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@
import java.util.List;
import lombok.SneakyThrows;

/**
* The CustomCheckout client class provides methods for interacting with
* PhonePe's Custom Checkout Payment Gateway APIs.
*
* <p>Use this client when you need full control over the payment experience,
* including direct card/token instrument handling with PCI-compliant routing
* and device OS header injection.</p>
*
* <p>For a simpler integration where PhonePe handles the checkout UI,
* use {@link StandardCheckoutClient} instead.</p>
*
* @see StandardCheckoutClient
* @see com.phonepe.sdk.pg.subscription.v2.SubscriptionClient
* @see com.phonepe.sdk.pg.common.BaseClient
*/
public class CustomCheckoutClient extends BaseClient {

private List<HttpHeaderPair> headers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@
import java.util.List;
import lombok.SneakyThrows;

/**
* The Subscription client class provides methods for interacting with
* PhonePe's Subscription (Autopay) Payment Gateway APIs.
*
* <p>Use this client to manage recurring payment mandates, including
* setup, notification, redemption, cancellation, and status queries.</p>
*
* <p>For one-time payments, use {@link com.phonepe.sdk.pg.payments.v2.StandardCheckoutClient}
* or {@link com.phonepe.sdk.pg.payments.v2.CustomCheckoutClient} instead.</p>
*
* @see com.phonepe.sdk.pg.payments.v2.StandardCheckoutClient
* @see com.phonepe.sdk.pg.payments.v2.CustomCheckoutClient
* @see com.phonepe.sdk.pg.common.BaseClient
*/
public class SubscriptionClient extends BaseClient {

private List<HttpHeaderPair> headers;
Expand Down