Interface InvoicePaymentApi

    • Method Detail

      • createPurchaseForInvoicePayment

        InvoicePayment createPurchaseForInvoicePayment​(Account account,
                                                       UUID invoiceId,
                                                       UUID paymentMethodId,
                                                       UUID paymentId,
                                                       BigDecimal amount,
                                                       Currency currency,
                                                       org.joda.time.DateTime effectiveDate,
                                                       String paymentExternalKey,
                                                       String paymentTransactionExternalKey,
                                                       Iterable<PluginProperty> properties,
                                                       PaymentOptions paymentOptions,
                                                       CallContext context)
                                                throws PaymentApiException
        Combine an authorize and capture payment for a given invoice and allow to go through registered routing plugins
        Parameters:
        account - the account
        invoiceId - the invoice id
        paymentMethodId - the payment method id to use
        paymentId - the payment id (non-null for multi-steps flows, such as 3D Secure)
        amount - the amount to pay
        currency - the amount currency
        effectiveDate - the effectiveDate of the payment operation
        paymentExternalKey - the payment external key
        paymentTransactionExternalKey - the payment transaction external key
        properties - plugin specific properties
        paymentOptions - options to control payment behavior
        context - the call context
        Returns:
        the invoice payment
        Throws:
        PaymentApiException
      • createRefundForInvoicePayment

        InvoicePayment createRefundForInvoicePayment​(boolean isAdjusted,
                                                     Map<UUID,​BigDecimal> adjustments,
                                                     Account account,
                                                     UUID paymentId,
                                                     BigDecimal amount,
                                                     Currency currency,
                                                     org.joda.time.DateTime effectiveDate,
                                                     String paymentTransactionExternalKey,
                                                     Iterable<PluginProperty> properties,
                                                     PaymentOptions paymentOptions,
                                                     CallContext context)
                                              throws PaymentApiException
        Refund a previously captured payment and allow to go through registered routing plugins
        Parameters:
        isAdjusted - whether to adjust the invoice
        adjustments - individual adjustments per invoice item id
        account - the account
        paymentId - the payment id
        effectiveDate - the effectiveDate of the payment operation
        amount - the amount to refund
        currency - the amount currency
        paymentTransactionExternalKey - the payment transaction external key
        properties - plugin specific properties
        paymentOptions - options to control payment behavior
        context - the call context
        Returns:
        the payment
        Throws:
        PaymentApiException
      • createCreditForInvoicePayment

        InvoicePayment createCreditForInvoicePayment​(boolean isAdjusted,
                                                     Map<UUID,​BigDecimal> adjustments,
                                                     Account account,
                                                     UUID originalPaymentId,
                                                     UUID paymentMethodId,
                                                     UUID paymentId,
                                                     BigDecimal amount,
                                                     Currency currency,
                                                     org.joda.time.DateTime effectiveDate,
                                                     String paymentExternalKey,
                                                     String paymentTransactionExternalKey,
                                                     Iterable<PluginProperty> properties,
                                                     PaymentOptions paymentOptions,
                                                     CallContext context)
                                              throws PaymentApiException
        Credit a payment method for a given invoice and allow to go through registered routing plugins

        This is also known as payment in reverse.

        Parameters:
        isAdjusted - whether to adjust the invoice
        adjustments - individual adjustments per invoice item id
        account - the account
        originalPaymentId - the original payment id
        paymentMethodId - the payment method id to use
        paymentId - the payment id (non-null for multi-steps flows)
        amount - the amount to credit
        currency - the amount currency
        effectiveDate - the effectiveDate of the payment operation
        paymentExternalKey - the payment external key
        paymentTransactionExternalKey - the payment transaction external key
        properties - plugin specific properties
        paymentOptions - options to control payment behavior
        context - the call context
        Returns:
        the payment
        Throws:
        PaymentApiException
      • createChargebackForInvoicePayment

        InvoicePayment createChargebackForInvoicePayment​(Account account,
                                                         UUID paymentId,
                                                         BigDecimal amount,
                                                         Currency currency,
                                                         org.joda.time.DateTime effectiveDate,
                                                         String paymentTransactionExternalKey,
                                                         Iterable<PluginProperty> properties,
                                                         PaymentOptions paymentOptions,
                                                         CallContext context)
                                                  throws PaymentApiException
        Record a chargeback and allow to go through registered routing plugins
        Parameters:
        account - the account
        paymentId - the payment id
        effectiveDate - the effectiveDate of the payment operation
        amount - the amount to refund
        currency - the amount currency
        paymentTransactionExternalKey - the payment transaction external key
        properties - plugin specific properties
        paymentOptions - options to control payment behavior
        context - the call context
        Returns:
        the payment
        Throws:
        PaymentApiException
      • createChargebackReversalForInvoicePayment

        InvoicePayment createChargebackReversalForInvoicePayment​(Account account,
                                                                 UUID paymentId,
                                                                 org.joda.time.DateTime effectiveDate,
                                                                 String paymentTransactionExternalKey,
                                                                 Iterable<PluginProperty> properties,
                                                                 PaymentOptions paymentOptions,
                                                                 CallContext context)
                                                          throws PaymentApiException
        Reverse a chargeback and allow to go through registered routing plugins
        Parameters:
        account - the account
        paymentId - the payment id
        effectiveDate - the effectiveDate of the payment operation
        paymentTransactionExternalKey - the payment transaction external key
        properties - plugin specific properties
        paymentOptions - options to control payment behavior
        context - the call context
        Returns:
        the payment
        Throws:
        PaymentApiException