Skip to main content
Vindicia Knowledge Center

AutoBill.makePayment

AutoBill.makePayment

AutoBill.makePayment

The makePayment method allows you to record a payment against an outstanding invoice. This method may be used to enter check or cash payments, payment of goods in trade, or payments made with active Payment Methods.

Using the makePayment method on the AutoBill object will cause CashBox to allocate the payment directly to the selected AutoBill. To apply a payment against the oldest outstanding Invoice, use Account.makePayment instead.

Whether you use a standard PaymentMethod, or a MerchantAcceptedPayment, the makePaymentmethod generates a Transaction, and processes the Transaction through the auth/capture cycle appropriate to the input Payment Method. Credit Card, ECP, PayPal, and other standard Payment Methods are routed through the appropriate Payment Processor. The MerchantAcceptedPayment Payment Method is routed through Vindicia’s internal transaction process. Both Payment Method types appear as a Transaction in the Account’s history.

Note When using a MerchantAcceptedPayment, you must create a new PaymentMethod object for each makePayment call.

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

autobill: the AutoBill to which this payment applies.

paymentMethod: the PaymentMethod to be used for this payment.

Note Assign a unique ID for every Account.makePayment call that uses the MerchantAcceptedPayment Payment Method, for tracking purposes.

PaymentMethods may not be duplicated for an Account. Passing in an existing credit card number and expiration date in an attempt to create a new PaymentMethod for an Account will return the pre-existing PaymentMethod instead.

amount: the amount of the payment being made.

currency: the ISO 4217 currency code for amount. This must match the currency used for charges on the current invoice. (If not specified, the AutoBill/Invoice currency will be used.)

Note Do not change the established currency type.

invoiceId: the ID of the Invoice against which the payment is to be made. If not specified, the oldest unpaid invoice for this AutoBill will be selected for payment. To make a payment against an invoice in Open status, an ID must be specified—CashBox will not direct overage against such a future invoice.

overageDisposition: an object of type PaymentOverageDisposition, defines how to allocate payments in excess of a required AutoBill payment amount. Enumerated values include:

• applyToOldestInvoice (the default)

• applyToThisAutoBill

• applyToCredit

note: an optional memo regarding the payment made.

Output

return: an object of type Return that indicates the success or failure of the call.

transaction: the Transaction object generated by the payment attempt. This Transaction must be inspected to assess the details of the payment attempt.

summary: an object of type TransactionAttemptSummary, which describes the payment attempt: Success, Failure, or Pending.

Returns

In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String

400

One of the following:

  • Account not found.
  • Failed to translate payment method: error-description.
  • Failed to make payment: error-description.
  • Transaction not returned from payment attempt.

Example

$autobill = new AutoBill();
$autobill->setMerchantAutoBillId($abID); // for some $abID

$paymentMethod = new PaymentMethod();
$paymentMethod->setMerchantPaymentMethodId($pmId); // for some $pmId

$response = $autobill->makePayment(

$paymentMethod,
4.50,
'USD',
'inv-bac',
null,
'$4.50 for Scrabble'

);

// check $response

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top