> For the complete documentation index, see [llms.txt](https://docs.phptravels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.phptravels.com/payments/credits.md).

# Credits

How credits work as a payment method in PHPTRAVELS: customers and agents pay for flights, hotels and tours with account credit instead of a card.

Credits in PHPTRAVELS let customers or agents pay for flights, hotels, tours and other bookings with account credit instead of (or as well as) a card gateway. Credit is a balance stored against the user or agent account and reduced when a booking is paid with that method.

Parent: [Payments](https://docs.phptravels.com/payments). Related: [Wallet balance](https://docs.phptravels.com/payments/wallet-balance).

### Who can use credits

Depending on how you configure the installation:

* **Customers** -- Account credit granted or topped up by your team, then spent at checkout.
* **B2B agents** -- Credit or prepaid balance used when booking for clients in the agent portal.

Exact labels in admin may say Credits, Credit balance or similar. Wallet balance is the closely related prepaid wallet flow; see that page if your setup uses wallets for agents.

### Prerequisites

* Working PHPTRAVELS Admin Panel
* Credits / credit payment method enabled
* Clear internal policy for who may receive credit and how refunds return

### Admin settings

1. Open **Settings -> Payment Gateways** (or the Users / Agents credit section for your version).
2. Enable **Credits** as a payment method at checkout where appropriate.
3. Open a customer or agent profile and set or adjust credit balance according to your process.
4. Save. Confirm the method appears at checkout for that user type.

### Test booking

1. Grant a test user a known credit amount.
2. Create a booking priced at or below that amount.
3. Select **Credits** at payment.
4. Confirm the booking succeeds and the credit balance decreases by the paid amount.
5. Confirm the transaction / ledger entry is visible in admin.

### How it shows on the booking

* Payment method recorded as credits / credit balance
* Amount taken from credit listed on invoice / booking payment lines
* Remaining credit visible on the user or agent profile

### Refunds

When you refund a credit-paid booking, return value to the user's credit balance (or follow your documented finance process). Do not assume card-gateway refund APIs apply to credit payments.

### Credits vs wallet balance

|             | Credits                             | Wallet balance                             |
| ----------- | ----------------------------------- | ------------------------------------------ |
| Typical use | Account credit issued by the agency | Prepaid wallet topped up by customer/agent |
| Top-up      | Often staff-managed                 | Customer/agent top-up flows where enabled  |
| Checkout    | Pay with credit                     | Pay from wallet                            |

Use the page that matches the feature name in your admin. Many B2B setups emphasise [Wallet balance](https://docs.phptravels.com/payments/wallet-balance) for agents.
