> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recording a Payment Manually

Entering a payment manually allows a merchant to enter a transaction that occurs outside the Subscribe automated process. This may be used to enter cash or check payments made in person to the merchant, goods or services accepted in trade for an outstanding invoice, or any other payment method the merchant allows.

Subscribe offers two ways to enter a payment manually though the API: using `Account.makePayment`, and using `AutoBill.makePayment`. (You may also enter a payment through the Subscribe Portal.)

A merchant-entered payment is applied to outstanding AutoBills with a `PaymentMethod` of "Merchant Recorded Payment." Unless otherwise specified by the Merchant, Subscribe credits the Account’s AutoBills as follows:

* A manually entered payment is applied first to the oldest outstanding AutoBill.
* Any remaining monies are applied to the next oldest AutoBill, until the payment is exhausted, or all AutoBills have been paid.
* Any monies left after all AutoBills have been paid appear as a credit to the account.

Use the `makePayment` method on the `AutoBill` object to apply a payment directly to an outstanding AutoBill. To make a payment to the oldest open invoice, use `Account.makePayment` instead.

If a payment fails at the financial institution, or if you wish to reverse a payment for other reasons, use `reversePayment` on the corresponding object to reverse a payment entered using `makePayment`.

## Record a payment manually

```

 $autobill = new AutoBill();
 $autobill->setMerchantAutoBillId($abID); // for some $abID
  
 $pm = new PaymentMethod();
 $pm->setType('MerchantAcceptedPayment');
 $pm->setMerchantPaymentMethodId('macc cash '. $time);
  
 $macc = new MerchantAcceptedPayment();
 $macc->setAmount(4.50);
 $macc->setCurrency('USD');
 $macc->setTimestamp($now);
 $macc->setPaymentId('macc cash ' . $time);
 $macc->setNote('cold hard cash');
  
 $pm->setMerchantAcceptedPayment($macc);
  
 $pm->update(
 true, // validate
 0, // chargeback probability
 false, // replace on all AutoBills
 null, // ip
 null, // AVS
 null // CVN
 );
  
 $response = $autobill->makePayment(
 $pm,
 null, // amount - see $macc
 null, // currency - see $macc
 'inv-bac', // invoice id
 null,
 null,
 '$4.50 in cold hard cash'
 );
  
 // check $response
```

**Parent topic:**[Working with One-Time Transactions](../topics/ProgGuide_Transactions)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.