Click or drag to resize
Infosoft Logo

ISubscriptionPaymentServicePerformBalancePayment Method

Performs a credit card payment of a given monetary amount using the given payment agreement ID.

Namespace: Infosoft.Common.Contracts.ServiceContracts.Subscriptions.Economy.Payments
Assembly: Infosoft.Common.Contracts (in Infosoft.Common.Contracts.dll) Version: 4.00.0.0
Syntax

Parameters

request  PerformSubscriptionBalancePaymentRequest
A request object that contains a payment agreement ID, a title code and an amount to pay.

Return Value

SubscriptionInvoicePaymentResponse
A response object that contains the completed payment.
Remarks

If the customer owes less money than the amount paid, the remainder will be added to the balance of the subscription. If the customer owes more money than the amount paid, the negative balance will be adjusted accordingly. In either case, the new amount will be reflected in the next invoice generated by the system.

To get a payment agreement ID, you can use the GetPaymentAgreement(GetSubscriptionPaymentAgreementRequest) operation on this endpoint or the GetCustomerPaymentAgreements(GetPaymentAgreementsByCustomerRequest) operation.

The agreement used does not need to be the one associated with the subscription, but it must belong to the same customer. Otherwise a PaymentAgreementSubscriptionMismatchFault will be thrown.

Performing a payment in this manner is a fairly complicated process, which may sometimes fail for seemingly arbitrary reasons. One piece of validation that should be taken into account is the fault BalancePaymentTooSmallFault. This fault is thrown in cases where the requested payment is smaller than the smallest minimum allowed payment that's been configured for the payment type and/or title. The fault object will contain the minimum allowed amount, so it should be possible to give the end user a relatively "friendly" error message.

There's currently no API for retrieving the minimum allowed amount without actually attempting a payment.

See Also