Alipay SDK for Java

repository·master·Indexed 20 days ago

https://github.com/alipay/alipay-sdk-java-all

A Java library for integrating with the Alipay Open Platform. It automates security tasks such as signing, verification, and certificate validation. The SDK provides two versions: v2, based on the v2 protocol, and v3, which follows RESTful design principles, uses JSON for data exchange, and is built using the OpenAPI Specification (OAS).

Tokens
550.5K
Snippets
794
Records
951
Agent score
63%

What's inside alipay-sdk-java-all

  1. Overview of Alipay SDK for Java

    master

    The Alipay SDK for Java simplifies access to the Alipay Open Platform by automating non-functional requirements such as certificate validation, signing (加签), verification (验签), and sending HTTP requests.

    Developers can choose between two versions of the SDK depending on their protocol requirements:

    • v2 SDK: Based on the v2 protocol.
    • v3 SDK: Based on the v3 protocol, which follows RESTful design principles and the OpenAPI Specification (OAS).
  2. AlipayOpenSearchBoxApi Overview

    master
    The AlipayOpenSearchBoxApi provides endpoints for managing 'Search Direct' (搜索直达) configurations. This includes applying for new configurations, batch querying existing ones, performing pre-validation checks, modifying settings, and managing the online/offline status of configurations. All URIs are relative to https://openapi.alipay.com.
  3. Use AlipayMarketingActivityOrdervoucherApi

    master

    The AlipayMarketingActivityOrdervoucherApi provides endpoints for managing merchant voucher activities, including appending budget limits, associating order information, counting voucher codes, and more. All URIs are relative to https://openapi.alipay.com.

    AlipayMarketingActivityOrdervoucherApi apiInstance = new AlipayMarketingActivityOrdervoucherApi(defaultClient);
  4. AlipayOpenServicemarketOrderApi Overview

    master

    The AlipayOpenServicemarketOrderApi provides endpoints for managing orders within the Alipay Service Market. It allows service providers to accept or reject orders, create orders for mini-programs on behalf of merchants, receive order notifications, and query order details. All URIs are relative to https://openapi.alipay.com.

    | Method | HTTP request | Description |
    |------------- | ------------- | -------------|
    | [**accept**](#accept) | **POST** /v3/alipay/open/servicemarket/order/accept | 服务商接单操作 |
    | [**create**](#create) | **POST** /v3/alipay/open/servicemarket/order/create | 服务市场代订购小程序 |
    | [**notify**](#notify) | **POST** /v3/alipay/open/servicemarket/order/notify | 服务市场商户确认订购通知 |
    | [**query**](#query) | **GET** /v3/alipay/open/servicemarket/order/query | 服务市场订单明细查询 |
    | [**reject**](#reject) | **POST** /v3/alipay/open/servicemarket/order/reject | 服务商拒绝接单 |
  5. Use AlipayOpenMiniIsvApi to manage mini-program creation for merchants

    master

    The AlipayOpenMiniIsvApi allows an ISV (Independent Software Vendor) to create mini-programs on behalf of merchants.

    Key Capabilities:

    • create: Initiates the creation of a mini-program for a merchant. The creation only becomes effective after the merchant confirms it. If the merchant does not confirm within the required time, the creation is voided and the mini-program name is released.
      • Individual Merchant Support: By setting is_individual to true and providing a license_pic, you can simultaneously create the mini-program and upgrade the merchant's personal account to an individual business account.
    • query: Retrieves the status/records of a mini-program creation request using the orderNo returned by the platform.

    All URIs are relative to https://openapi.alipay.com.

  6. Use AlipayTradeOrderApi for unified collection payments and settlements

    master

    The AlipayTradeOrderApi provides two primary methods for managing unified collection transactions:

    1. pay: Used to perform a payment for a previously created transaction. Note: You must contact the API owner to use this interface.
    2. settle: Used for fund redistribution between a seller and a third party (such as a supplier or platform) after a seller's transaction is successful. This is commonly used for commission scenarios where a third party takes a cut from the seller.

    All requests are sent via POST to relative URIs under https://openapi.alipay.com.

  7. Use AlipayOpenMiniTipsDeliveryApi to manage Mini Program collection tips

    master

    The AlipayOpenMiniTipsDeliveryApi allows you to manage Mini Program collection guidance (tips) delivery activities. You can create new activities with personalized copy, batch query all activity configurations and statuses for a Mini Program, modify existing activity statuses (pause, resume, or terminate), and query specific activity details using a deliveryId.

    All URIs are relative to https://openapi.alipay.com.

    // Summary of available methods:
    // POST /v3/alipay/open/mini/tips/delivery/batchquery -> batchquery()
    // POST /v3/alipay/open/mini/tips/delivery/create    -> create()
    // POST /v3/alipay/open/mini/tips/delivery/modify    -> modify()
    // GET  /v3/alipay/open/mini/tips/delivery/query     -> query(deliveryId)
  8. Use AlipayMarketingRecruitEnrollApi to manage marketing recruitment enrollment

    master

    The AlipayMarketingRecruitEnrollApi provides methods to manage the lifecycle of marketing recruitment enrollments. It supports three primary operations:

    1. create: Submits a recruitment enrollment. Once submitted, the status is updated via message notifications (requires integration with alipay.marketing.enroll.status.changed). You can also poll the status using the query method.
    2. query: Retrieves detailed information about an enrollment using either an outBizNo (external business number) or an enrollId.
    3. close: Takes an enrollment offline (deactivates it).

    All requests are relative to https://openapi.alipay.com.

  9. Use AlipayCommerceOperationActivityMerchantApi to manage merchant activities

    master

    The AlipayCommerceOperationActivityMerchantApi class provides methods to manage merchant participation in activities, including signing up, modifying existing information, and unsigning (terminating) activities. All requests are relative to https://openapi.alipay.com.

    Available methods:

    • modify: Modifies merchant signing information.
    • sign: Signs a merchant to an activity.
    • unsign: Terminates a merchant's activity participation (used for user bank merchant mode).
    AlipayCommerceOperationActivityMerchantApi apiInstance = new AlipayCommerceOperationActivityMerchantApi(defaultClient);