Package api

Class MerchantsApi


  • public class MerchantsApi
    extends Object
    • Constructor Detail

      • MerchantsApi

        public MerchantsApi()
      • MerchantsApi

        public MerchantsApi​(FinixClient finixClient)
    • Method Detail

      • setFinixClient

        public void setFinixClient​(FinixClient finixClient)
      • getHostIndex

        public int getHostIndex()
      • setHostIndex

        public void setHostIndex​(int hostIndex)
      • getCustomBaseUrl

        public String getCustomBaseUrl()
      • setCustomBaseUrl

        public void setCustomBaseUrl​(String customBaseUrl)
      • createMerchantCall

        public okhttp3.Call createMerchantCall​(String identityId,
                                               CreateMerchantUnderwritingRequest createMerchantUnderwritingRequest,
                                               ApiCallback _callback)
                                        throws ApiException
        Build call for createMerchant
        Parameters:
        identityId - ID of `Identity` to fetch. (required)
        createMerchantUnderwritingRequest - (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
        Http Response Details:
        Status Code Description Response Headers
        201 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Error * finix-apiuser-role -
        * date -
        * x-request-id -
      • create

        public Merchant create​(String identityId,
                               CreateMerchantUnderwritingRequest createMerchantUnderwritingRequest)
                        throws ApiException
        Create a Merchant Create a `Merchant` to start the underwriting (also called provisioning) process for your merchant. `Merchants` must be created under an [`Identity`](#tag/Identities). > A bank account must be associated with the previously created `Identity` before a `Merchant` can be succefully onboarded and verified. `Merchant` resources can have three possible `onboarding_states`: 1. **PROVISIONING**: The request is pending (the state can change after two minutes). * `processing_enabled`: **False** * `settlement_enabled`: **False** 1. **APPROVED**: The `Merchant` has been approved and can begin processing payments. * `processing_enabled`: **True** * `settlement_enabled`: **True** 1. **REJECTED**: The `Merchant` was rejected by the processor because of invalid information or it failed a regulatory and/or compliance check (e.g. KYC, OFAC, or MATCH). Make any changes that are needed, and [try verifying the `Merchant` again](#operation/createMerchantVerification). * `processing_enabled`: **False** * `settlement_enabled`: **False** > Provisioning a `Merchant` account is an asynchronous request. We recommend creating a [`Webhook`](#tag/Webhooks) to listen for the state change.
        Parameters:
        identityId - ID of `Identity` to fetch. (required)
        createMerchantUnderwritingRequest - (optional)
        Returns:
        Merchant
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        201 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Error * finix-apiuser-role -
        * date -
        * x-request-id -
      • createMerchantWithHttpInfo

        public ApiResponse<Merchant> createMerchantWithHttpInfo​(String identityId,
                                                                CreateMerchantUnderwritingRequest createMerchantUnderwritingRequest)
                                                         throws ApiException
        Create a Merchant Create a `Merchant` to start the underwriting (also called provisioning) process for your merchant. `Merchants` must be created under an [`Identity`](#tag/Identities). > A bank account must be associated with the previously created `Identity` before a `Merchant` can be succefully onboarded and verified. `Merchant` resources can have three possible `onboarding_states`: 1. **PROVISIONING**: The request is pending (the state can change after two minutes). * `processing_enabled`: **False** * `settlement_enabled`: **False** 1. **APPROVED**: The `Merchant` has been approved and can begin processing payments. * `processing_enabled`: **True** * `settlement_enabled`: **True** 1. **REJECTED**: The `Merchant` was rejected by the processor because of invalid information or it failed a regulatory and/or compliance check (e.g. KYC, OFAC, or MATCH). Make any changes that are needed, and [try verifying the `Merchant` again](#operation/createMerchantVerification). * `processing_enabled`: **False** * `settlement_enabled`: **False** > Provisioning a `Merchant` account is an asynchronous request. We recommend creating a [`Webhook`](#tag/Webhooks) to listen for the state change.
        Parameters:
        identityId - ID of `Identity` to fetch. (required)
        createMerchantUnderwritingRequest - (optional)
        Returns:
        ApiResponse<Merchant>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        201 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Error * finix-apiuser-role -
        * date -
        * x-request-id -
      • createMerchantAsync

        public okhttp3.Call createMerchantAsync​(String identityId,
                                                CreateMerchantUnderwritingRequest createMerchantUnderwritingRequest,
                                                ApiCallback<Merchant> _callback)
                                         throws ApiException
        Create a Merchant (asynchronously) Create a `Merchant` to start the underwriting (also called provisioning) process for your merchant. `Merchants` must be created under an [`Identity`](#tag/Identities). > A bank account must be associated with the previously created `Identity` before a `Merchant` can be succefully onboarded and verified. `Merchant` resources can have three possible `onboarding_states`: 1. **PROVISIONING**: The request is pending (the state can change after two minutes). * `processing_enabled`: **False** * `settlement_enabled`: **False** 1. **APPROVED**: The `Merchant` has been approved and can begin processing payments. * `processing_enabled`: **True** * `settlement_enabled`: **True** 1. **REJECTED**: The `Merchant` was rejected by the processor because of invalid information or it failed a regulatory and/or compliance check (e.g. KYC, OFAC, or MATCH). Make any changes that are needed, and [try verifying the `Merchant` again](#operation/createMerchantVerification). * `processing_enabled`: **False** * `settlement_enabled`: **False** > Provisioning a `Merchant` account is an asynchronous request. We recommend creating a [`Webhook`](#tag/Webhooks) to listen for the state change.
        Parameters:
        identityId - ID of `Identity` to fetch. (required)
        createMerchantUnderwritingRequest - (optional)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
        Http Response Details:
        Status Code Description Response Headers
        201 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
        422 Error * finix-apiuser-role -
        * date -
        * x-request-id -
      • createMerchantVerificationCall

        public okhttp3.Call createMerchantVerificationCall​(String merchantId,
                                                           CreateVerificationRequest createVerificationRequest,
                                                           ApiCallback _callback)
                                                    throws ApiException
        Build call for createMerchantVerification
        Parameters:
        merchantId - ID of `Merchant` object. (required)
        createVerificationRequest - (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
        Http Response Details:
        Status Code Description Response Headers
        201 Single Verification object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • createMerchantVerification

        public Verification createMerchantVerification​(String merchantId,
                                                       CreateVerificationRequest createVerificationRequest)
                                                throws ApiException
        Verify a Merchant If the `onboarding_state` for a `Merchant` returns **FAILED**, correct the `Identity` information saved for the `Merchant`. Once corrected, try verifying (also called provisioning) the `Merchant` again with another request.
        Parameters:
        merchantId - ID of `Merchant` object. (required)
        createVerificationRequest - (optional)
        Returns:
        Verification
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        201 Single Verification object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • createMerchantVerificationWithHttpInfo

        public ApiResponse<Verification> createMerchantVerificationWithHttpInfo​(String merchantId,
                                                                                CreateVerificationRequest createVerificationRequest)
                                                                         throws ApiException
        Verify a Merchant If the `onboarding_state` for a `Merchant` returns **FAILED**, correct the `Identity` information saved for the `Merchant`. Once corrected, try verifying (also called provisioning) the `Merchant` again with another request.
        Parameters:
        merchantId - ID of `Merchant` object. (required)
        createVerificationRequest - (optional)
        Returns:
        ApiResponse<Verification>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        201 Single Verification object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • createMerchantVerificationAsync

        public okhttp3.Call createMerchantVerificationAsync​(String merchantId,
                                                            CreateVerificationRequest createVerificationRequest,
                                                            ApiCallback<Verification> _callback)
                                                     throws ApiException
        Verify a Merchant (asynchronously) If the `onboarding_state` for a `Merchant` returns **FAILED**, correct the `Identity` information saved for the `Merchant`. Once corrected, try verifying (also called provisioning) the `Merchant` again with another request.
        Parameters:
        merchantId - ID of `Merchant` object. (required)
        createVerificationRequest - (optional)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
        Http Response Details:
        Status Code Description Response Headers
        201 Single Verification object * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • getMerchantCall

        public okhttp3.Call getMerchantCall​(String merchantId,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for getMerchant
        Parameters:
        merchantId - ID of `Merchant`. (required)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
        Http Response Details:
        Status Code Description Response Headers
        200 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • get

        public Merchant get​(String merchantId)
                     throws ApiException
        Fetch a Merchant Retrieve the details of a `Merchant`.
        Parameters:
        merchantId - ID of `Merchant`. (required)
        Returns:
        Merchant
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        200 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • getMerchantWithHttpInfo

        public ApiResponse<Merchant> getMerchantWithHttpInfo​(String merchantId)
                                                      throws ApiException
        Fetch a Merchant Retrieve the details of a `Merchant`.
        Parameters:
        merchantId - ID of `Merchant`. (required)
        Returns:
        ApiResponse<Merchant>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        200 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • getMerchantAsync

        public okhttp3.Call getMerchantAsync​(String merchantId,
                                             ApiCallback<Merchant> _callback)
                                      throws ApiException
        Fetch a Merchant (asynchronously) Retrieve the details of a `Merchant`.
        Parameters:
        merchantId - ID of `Merchant`. (required)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
        Http Response Details:
        Status Code Description Response Headers
        200 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • list

        public FinixList list​(ListMerchantsQueryParams listMerchantsQueryParams)
                       throws ApiException
        List Merchants Retrieve a list of `Merchants`.
        Returns:
        APIlistMerchantsRequest
        Throws:
        ApiException
        Http Response Details:
        Status Code Description Response Headers
        200 List of Merchants objects * finix-apiuser-role -
        * date -
        * x-request-id -
        400 Error * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • updateMerchantCall

        public okhttp3.Call updateMerchantCall​(String merchantId,
                                               UpdateMerchantRequest updateMerchantRequest,
                                               ApiCallback _callback)
                                        throws ApiException
        Build call for updateMerchant
        Parameters:
        merchantId - ID of `Merchant`. (required)
        updateMerchantRequest - (optional)
        _callback - Callback for upload/download progress
        Returns:
        Call to execute
        Throws:
        ApiException - If fail to serialize the request body object
        Http Response Details:
        Status Code Description Response Headers
        200 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • update

        public Merchant update​(String merchantId,
                               UpdateMerchantRequest updateMerchantRequest)
                        throws ApiException
        Update a Merchant Update a `Merchant` to: - Change the `Identity` information saved with the underlying processor - Enable Level 2/3 processing - Enable [Buyer Chages](/guides/payments/buyer-charges/)
        Parameters:
        merchantId - ID of `Merchant`. (required)
        updateMerchantRequest - (optional)
        Returns:
        Merchant
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        200 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • updateMerchantWithHttpInfo

        public ApiResponse<Merchant> updateMerchantWithHttpInfo​(String merchantId,
                                                                UpdateMerchantRequest updateMerchantRequest)
                                                         throws ApiException
        Update a Merchant Update a `Merchant` to: - Change the `Identity` information saved with the underlying processor - Enable Level 2/3 processing - Enable [Buyer Chages](/guides/payments/buyer-charges/)
        Parameters:
        merchantId - ID of `Merchant`. (required)
        updateMerchantRequest - (optional)
        Returns:
        ApiResponse<Merchant>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        200 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • updateMerchantAsync

        public okhttp3.Call updateMerchantAsync​(String merchantId,
                                                UpdateMerchantRequest updateMerchantRequest,
                                                ApiCallback<Merchant> _callback)
                                         throws ApiException
        Update a Merchant (asynchronously) Update a `Merchant` to: - Change the `Identity` information saved with the underlying processor - Enable Level 2/3 processing - Enable [Buyer Chages](/guides/payments/buyer-charges/)
        Parameters:
        merchantId - ID of `Merchant`. (required)
        updateMerchantRequest - (optional)
        _callback - The callback to be executed when the API call finishes
        Returns:
        The request call
        Throws:
        ApiException - If fail to process the API call, e.g. serializing the request body object
        Http Response Details:
        Status Code Description Response Headers
        200 Single Merchant object * finix-apiuser-role -
        * date -
        * x-request-id -
        401 Authentication information is missing or invalid * finix-apiuser-role -
        * date -
        * x-request-id -
        403 Forbidden * finix-apiuser-role -
        * date -
        * x-request-id -
        404 Object does not exist * finix-apiuser-role -
        * date -
        * x-request-id -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -