Package api

Class PaymentInstrumentsApi


  • public class PaymentInstrumentsApi
    extends Object
    • Constructor Detail

      • PaymentInstrumentsApi

        public PaymentInstrumentsApi()
      • PaymentInstrumentsApi

        public PaymentInstrumentsApi​(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)
      • createApplePaySessionCall

        public okhttp3.Call createApplePaySessionCall​(ApplePaySessionRequest applePaySessionRequest,
                                                      ApiCallback _callback)
                                               throws ApiException
        Build call for createApplePaySession
        Parameters:
        applePaySessionRequest - (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 apple_pay_session 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 -
      • createApplePaySession

        public ApplePaySession createApplePaySession​(ApplePaySessionRequest applePaySessionRequest)
                                              throws ApiException
        Create an Apple Pay Session Create an `apple_pay_session` to process Apple Pay transactions on the web. To create an Apple Pay Session, pass the unique `validation_url` (provided by Apple) while creating an `apple_pay_sessions` resource. Finix returns a `merchantSession` object that you can use to create a payment. For more information, see [Apple Pay](/docs/guides/payments/alternative-payment-methods/apple-pay/).
        Parameters:
        applePaySessionRequest - (optional)
        Returns:
        ApplePaySession
        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 apple_pay_session 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 -
      • createApplePaySessionWithHttpInfo

        public ApiResponse<ApplePaySession> createApplePaySessionWithHttpInfo​(ApplePaySessionRequest applePaySessionRequest)
                                                                       throws ApiException
        Create an Apple Pay Session Create an `apple_pay_session` to process Apple Pay transactions on the web. To create an Apple Pay Session, pass the unique `validation_url` (provided by Apple) while creating an `apple_pay_sessions` resource. Finix returns a `merchantSession` object that you can use to create a payment. For more information, see [Apple Pay](/docs/guides/payments/alternative-payment-methods/apple-pay/).
        Parameters:
        applePaySessionRequest - (optional)
        Returns:
        ApiResponse<ApplePaySession>
        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 apple_pay_session 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 -
      • createApplePaySessionAsync

        public okhttp3.Call createApplePaySessionAsync​(ApplePaySessionRequest applePaySessionRequest,
                                                       ApiCallback<ApplePaySession> _callback)
                                                throws ApiException
        Create an Apple Pay Session (asynchronously) Create an `apple_pay_session` to process Apple Pay transactions on the web. To create an Apple Pay Session, pass the unique `validation_url` (provided by Apple) while creating an `apple_pay_sessions` resource. Finix returns a `merchantSession` object that you can use to create a payment. For more information, see [Apple Pay](/docs/guides/payments/alternative-payment-methods/apple-pay/).
        Parameters:
        applePaySessionRequest - (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 apple_pay_session 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 -
      • createPaymentInstrumentCall

        public okhttp3.Call createPaymentInstrumentCall​(CreatePaymentInstrumentRequest createPaymentInstrumentRequest,
                                                        ApiCallback _callback)
                                                 throws ApiException
        Build call for createPaymentInstrument
        Parameters:
        createPaymentInstrumentRequest - (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 Payment Instrument 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 -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • create

        public PaymentInstrument create​(CreatePaymentInstrumentRequest createPaymentInstrumentRequest)
                                 throws ApiException
        Create a Payment Instrument Create a `Payment Instrument` resource using a card or bank account. To accept payment details, review our guide on how to [tokenize cards using hosted fields](/guides/payments/tokenization-with-hosted-fields). - The creation of `Payment Instruments` directly via Finix's API should only be done for testing purposes. You must use the Hosted Tokenization fields or the javascript client to remain out of PCI scope.
        Parameters:
        createPaymentInstrumentRequest - (optional)
        Returns:
        PaymentInstrument
        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 Payment Instrument 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 -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • createPaymentInstrumentWithHttpInfo

        public ApiResponse<PaymentInstrument> createPaymentInstrumentWithHttpInfo​(CreatePaymentInstrumentRequest createPaymentInstrumentRequest)
                                                                           throws ApiException
        Create a Payment Instrument Create a `Payment Instrument` resource using a card or bank account. To accept payment details, review our guide on how to [tokenize cards using hosted fields](/guides/payments/tokenization-with-hosted-fields). - The creation of `Payment Instruments` directly via Finix's API should only be done for testing purposes. You must use the Hosted Tokenization fields or the javascript client to remain out of PCI scope.
        Parameters:
        createPaymentInstrumentRequest - (optional)
        Returns:
        ApiResponse<PaymentInstrument>
        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 Payment Instrument 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 -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • createPaymentInstrumentAsync

        public okhttp3.Call createPaymentInstrumentAsync​(CreatePaymentInstrumentRequest createPaymentInstrumentRequest,
                                                         ApiCallback<PaymentInstrument> _callback)
                                                  throws ApiException
        Create a Payment Instrument (asynchronously) Create a `Payment Instrument` resource using a card or bank account. To accept payment details, review our guide on how to [tokenize cards using hosted fields](/guides/payments/tokenization-with-hosted-fields). - The creation of `Payment Instruments` directly via Finix's API should only be done for testing purposes. You must use the Hosted Tokenization fields or the javascript client to remain out of PCI scope.
        Parameters:
        createPaymentInstrumentRequest - (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 Payment Instrument 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 -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • getPaymentInstrumentCall

        public okhttp3.Call getPaymentInstrumentCall​(String paymentInstrumentId,
                                                     ApiCallback _callback)
                                              throws ApiException
        Build call for getPaymentInstrument
        Parameters:
        paymentInstrumentId - ID of object (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 Payment Instrument 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 -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • get

        public PaymentInstrument get​(String paymentInstrumentId)
                              throws ApiException
        Fetch a Payment Instrument Retrieve the details of a `Payment Instrument`.
        Parameters:
        paymentInstrumentId - ID of object (required)
        Returns:
        PaymentInstrument
        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 Payment Instrument 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 -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • getPaymentInstrumentWithHttpInfo

        public ApiResponse<PaymentInstrument> getPaymentInstrumentWithHttpInfo​(String paymentInstrumentId)
                                                                        throws ApiException
        Fetch a Payment Instrument Retrieve the details of a `Payment Instrument`.
        Parameters:
        paymentInstrumentId - ID of object (required)
        Returns:
        ApiResponse<PaymentInstrument>
        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 Payment Instrument 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 -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • getPaymentInstrumentAsync

        public okhttp3.Call getPaymentInstrumentAsync​(String paymentInstrumentId,
                                                      ApiCallback<PaymentInstrument> _callback)
                                               throws ApiException
        Fetch a Payment Instrument (asynchronously) Retrieve the details of a `Payment Instrument`.
        Parameters:
        paymentInstrumentId - ID of object (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 Payment Instrument 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 -
        422 Invalid field * finix-apiuser-role -
        * date -
        * x-request-id -
      • listUpdatesByPaymentInstrumentId

        public FinixList listUpdatesByPaymentInstrumentId​(String paymentInstrumentId,
                                                          ListPaymentInstrumentUpdatesQueryParams listPaymentInstrumentUpdatesQueryParams)
                                                   throws ApiException
        List Payment Instrument Updates List the updates on a `Payment Instrument`. When using the [account updater](/guides/payments/account-updater), `Payment Instrument` details that are updated are represented by an `Update`.
        Parameters:
        paymentInstrumentId - ID of `Payment Instrument` object. (required)
        Returns:
        APIlistPaymentInstrumentUpdatesRequest
        Throws:
        ApiException
        Http Response Details:
        Status Code Description Response Headers
        200 List of Update objects * 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​(ListPaymentInstrumentsQueryParams listPaymentInstrumentsQueryParams)
                       throws ApiException
        List Payment Instruments Retrieve a list of `Payment Instruments`.
        Returns:
        APIlistPaymentInstrumentsRequest
        Throws:
        ApiException
        Http Response Details:
        Status Code Description Response Headers
        200 List of Payment Instrument objects * 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 -
        406 Not Acceptable * finix-apiuser-role -
        * date -
        * x-request-id -
      • updatePaymentInstrumentCall

        public okhttp3.Call updatePaymentInstrumentCall​(String paymentInstrumentId,
                                                        UpdatePaymentInstrumentRequest updatePaymentInstrumentRequest,
                                                        ApiCallback _callback)
                                                 throws ApiException
        Build call for updatePaymentInstrument
        Parameters:
        paymentInstrumentId - ID of object (required)
        updatePaymentInstrumentRequest - (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 Payment Instrument 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 PaymentInstrument update​(String paymentInstrumentId,
                                        UpdatePaymentInstrumentRequest updatePaymentInstrumentRequest)
                                 throws ApiException
        Update a Payment Instrument Update a `Payment Instrument`.
        Parameters:
        paymentInstrumentId - ID of object (required)
        updatePaymentInstrumentRequest - (optional)
        Returns:
        PaymentInstrument
        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 Payment Instrument 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 -
      • updatePaymentInstrumentWithHttpInfo

        public ApiResponse<PaymentInstrument> updatePaymentInstrumentWithHttpInfo​(String paymentInstrumentId,
                                                                                  UpdatePaymentInstrumentRequest updatePaymentInstrumentRequest)
                                                                           throws ApiException
        Update a Payment Instrument Update a `Payment Instrument`.
        Parameters:
        paymentInstrumentId - ID of object (required)
        updatePaymentInstrumentRequest - (optional)
        Returns:
        ApiResponse<PaymentInstrument>
        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 Payment Instrument 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 -
      • updatePaymentInstrumentAsync

        public okhttp3.Call updatePaymentInstrumentAsync​(String paymentInstrumentId,
                                                         UpdatePaymentInstrumentRequest updatePaymentInstrumentRequest,
                                                         ApiCallback<PaymentInstrument> _callback)
                                                  throws ApiException
        Update a Payment Instrument (asynchronously) Update a `Payment Instrument`.
        Parameters:
        paymentInstrumentId - ID of object (required)
        updatePaymentInstrumentRequest - (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 Payment Instrument 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 -