Package io.moov.sdk

Class PaymentLinks

    • Method Detail

      • create

        public CreatePaymentLinkRequestBuilder create()
        Create a payment link that allows an end user to make a payment on Moov's hosted payment link page.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Returns:
        The call builder
      • create

        public CreatePaymentLinkResponse create​(java.lang.String accountID,
                                                CreatePaymentLink createPaymentLink)
                                         throws java.lang.Exception
        Create a payment link that allows an end user to make a payment on Moov's hosted payment link page.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Parameters:
        accountID -
        createPaymentLink - Request to create a new payment link. A payment link must include either `payment` or `payout` details, but not both. For payout payment links, `maxUses` will automatically be set to 1, as these are intended for a one-time disbursement to a specific recipient. **Note:** The `payout` option is currently under development and is not yet available for general use.
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • create

        public CreatePaymentLinkResponse create​(java.util.Optional<java.lang.String> xMoovVersion,
                                                java.lang.String accountID,
                                                CreatePaymentLink createPaymentLink)
                                         throws java.lang.Exception
        Create a payment link that allows an end user to make a payment on Moov's hosted payment link page.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Specified by:
        create in interface SDKMethodInterfaces.MethodCallCreatePaymentLink
        Parameters:
        xMoovVersion - Specify an API version. API versioning follows the format `vYYYY.QQ.BB`, where - `YYYY` is the year - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10) - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter. - For example, `v2024.01.00` is the initial release of the first quarter of 2024. The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
        accountID -
        createPaymentLink - Request to create a new payment link. A payment link must include either `payment` or `payout` details, but not both. For payout payment links, `maxUses` will automatically be set to 1, as these are intended for a one-time disbursement to a specific recipient. **Note:** The `payout` option is currently under development and is not yet available for general use.
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • list

        public ListPaymentLinksRequestBuilder list()
        List all the payment links created under a Moov account.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.read` scope.

        Returns:
        The call builder
      • list

        public ListPaymentLinksResponse list​(java.lang.String accountID)
                                      throws java.lang.Exception
        List all the payment links created under a Moov account.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.read` scope.

        Parameters:
        accountID -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • list

        public ListPaymentLinksResponse list​(java.util.Optional<java.lang.String> xMoovVersion,
                                             java.lang.String accountID)
                                      throws java.lang.Exception
        List all the payment links created under a Moov account.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.read` scope.

        Specified by:
        list in interface SDKMethodInterfaces.MethodCallListPaymentLinks
        Parameters:
        xMoovVersion - Specify an API version. API versioning follows the format `vYYYY.QQ.BB`, where - `YYYY` is the year - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10) - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter. - For example, `v2024.01.00` is the initial release of the first quarter of 2024. The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
        accountID -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • get

        public GetPaymentLinkRequestBuilder get()
        Retrieve a payment link by code.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.read` scope.

        Returns:
        The call builder
      • get

        public GetPaymentLinkResponse get​(java.lang.String accountID,
                                          java.lang.String paymentLinkCode)
                                   throws java.lang.Exception
        Retrieve a payment link by code.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.read` scope.

        Parameters:
        accountID -
        paymentLinkCode -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • get

        public GetPaymentLinkResponse get​(java.util.Optional<java.lang.String> xMoovVersion,
                                          java.lang.String accountID,
                                          java.lang.String paymentLinkCode)
                                   throws java.lang.Exception
        Retrieve a payment link by code.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.read` scope.

        Specified by:
        get in interface SDKMethodInterfaces.MethodCallGetPaymentLink
        Parameters:
        xMoovVersion - Specify an API version. API versioning follows the format `vYYYY.QQ.BB`, where - `YYYY` is the year - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10) - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter. - For example, `v2024.01.00` is the initial release of the first quarter of 2024. The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
        accountID -
        paymentLinkCode -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • update

        public UpdatePaymentLinkRequestBuilder update()
        Update a payment link.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Returns:
        The call builder
      • update

        public UpdatePaymentLinkResponse update​(java.lang.String accountID,
                                                java.lang.String paymentLinkCode,
                                                UpdatePaymentLink updatePaymentLink)
                                         throws java.lang.Exception
        Update a payment link.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Parameters:
        accountID -
        paymentLinkCode -
        updatePaymentLink -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • update

        public UpdatePaymentLinkResponse update​(java.util.Optional<java.lang.String> xMoovVersion,
                                                java.lang.String accountID,
                                                java.lang.String paymentLinkCode,
                                                UpdatePaymentLink updatePaymentLink)
                                         throws java.lang.Exception
        Update a payment link.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Specified by:
        update in interface SDKMethodInterfaces.MethodCallUpdatePaymentLink
        Parameters:
        xMoovVersion - Specify an API version. API versioning follows the format `vYYYY.QQ.BB`, where - `YYYY` is the year - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10) - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter. - For example, `v2024.01.00` is the initial release of the first quarter of 2024. The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
        accountID -
        paymentLinkCode -
        updatePaymentLink -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • disable

        public DisablePaymentLinkRequestBuilder disable()
        Disable a payment link.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Returns:
        The call builder
      • disable

        public DisablePaymentLinkResponse disable​(java.lang.String accountID,
                                                  java.lang.String paymentLinkCode)
                                           throws java.lang.Exception
        Disable a payment link.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Parameters:
        accountID -
        paymentLinkCode -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • disable

        public DisablePaymentLinkResponse disable​(java.util.Optional<java.lang.String> xMoovVersion,
                                                  java.lang.String accountID,
                                                  java.lang.String paymentLinkCode)
                                           throws java.lang.Exception
        Disable a payment link.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Specified by:
        disable in interface SDKMethodInterfaces.MethodCallDisablePaymentLink
        Parameters:
        xMoovVersion - Specify an API version. API versioning follows the format `vYYYY.QQ.BB`, where - `YYYY` is the year - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10) - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter. - For example, `v2024.01.00` is the initial release of the first quarter of 2024. The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
        accountID -
        paymentLinkCode -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • getQRCode

        public GetPaymentLinkQRCodeRequestBuilder getQRCode()
        Retrieve the payment link encoded in a QR code.

        Use the `Accept` header to specify the format of the response. Supported formats are `application/json` and `image/png`.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Returns:
        The call builder
      • getQRCode

        public GetPaymentLinkQRCodeResponse getQRCode​(java.lang.String accountID,
                                                      java.lang.String paymentLinkCode)
                                               throws java.lang.Exception
        Retrieve the payment link encoded in a QR code.

        Use the `Accept` header to specify the format of the response. Supported formats are `application/json` and `image/png`.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Parameters:
        accountID -
        paymentLinkCode -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • getQRCode

        public GetPaymentLinkQRCodeResponse getQRCode​(java.util.Optional<java.lang.String> xMoovVersion,
                                                      java.lang.String accountID,
                                                      java.lang.String paymentLinkCode)
                                               throws java.lang.Exception
        Retrieve the payment link encoded in a QR code.

        Use the `Accept` header to specify the format of the response. Supported formats are `application/json` and `image/png`.

        To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) you'll need to specify the `/accounts/{accountID}/transfers.write` scope.

        Specified by:
        getQRCode in interface SDKMethodInterfaces.MethodCallGetPaymentLinkQRCode
        Parameters:
        xMoovVersion - Specify an API version. API versioning follows the format `vYYYY.QQ.BB`, where - `YYYY` is the year - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10) - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter. - For example, `v2024.01.00` is the initial release of the first quarter of 2024. The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
        accountID -
        paymentLinkCode -
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails