Package io.moov.sdk

Class PaymentLinks


  • public class PaymentLinks
    extends java.lang.Object
    • 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
      • 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
      • 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
      • 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
      • 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
      • 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