# Manage customer payments and billing

This topic describes how to manage customer payments and billing.

To view customer payments or billing information, see [Payments](/docs/data-tables/manage-payments) or [Billing](/docs/data-tables/manage-billing).

## Add a payment instrument to a customer's account

Use this process to add a payment instrument to a customer's account.

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, beside **Payment instrument**, press **Actions**, then press **+ Add new**.
5. Depending on the payment instrument type, select **Payment card**, **Bank account**, or **Other**.
6. Optionally, to use the payment instrument as a backup method: Select **Allow use as a backup method**. 
A backup method is used when the primary payment instrument is declined.
For information on how to set a primary payment instrument and other settings, see [Manage a customer's payment instruments](#manage-a-customers-payment-instruments).
7. Press **Next**.
8. Enter billing address information for the payment instrument.
9. Enter the payment instrument details.
10. Press **Save**.


## Collect or register a payment

Use this process to collect a payment for a specific amount from a customer, or to register a payment that was processed outside of Rebilly.

To collect a payment for an invoice, see [Collect or register a payment for an invoice](/docs/data-tables/manage-invoices#collect-or-register-a-payment-for-an-invoice).

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, press **Actions**, then press **Collect payment**.
5. Enter the amount, currency, and a description.
6. Select one of the following payment options:
  - **Process with payment instrument**: Choose this option to process the payment with the customer's default payment instrument.
  - **Paid outside Rebilly**: Choose this option to register a payment that was processed outside the Rebilly product.
  - **Pay with Rebilly hosted payment form**: Choose this option to generate a hosted payment form URL to share with the customer.
7. Press **Submit**.


## Create an order

Use this process to create a subscription or one-time order.
A one-time order is a single, non-recurring, amount that a customer is charged.
A subscription is a recurring amount that a customer is charged.

To create a subscription or one-time order, you must have a product and pricing plan, and a payment gateway configured.
For more information, see [Create a product and pricing plan](/docs/settings/products-and-pricing) and [Set up a payment gateway](/docs/settings/set-up-a-gateway).

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, press **Actions**, then press **Create order**.
5. In the **Website** field, select a website to associate with the order.
6. In the **Products and plans** section, select products and plans to add to the order.
7. Use this option to create custom product and pricing plan settings for this order.
For example, use these settings to sell a product at a custom price for this customer only.
The custom price differs from the price in the related pricing plan.
These settings are unique to this order, and do not affect other orders, plans, or customers.
  1. In the **Products and plans** section, under the order item you added in the previous step, press **Edit plan**, then select from the following:
Use this option to configure custom pricing for this order.
    1. Press **Pricing**.
    2. In the **Pricing formula** dropdown, select a custom pricing formula.
    3. In the **Price** field, enter a custom price.

Use this option to select a different plan for this order.
In the **Plan** section, press **Select a different plan**, then select a plan.
Use this option to configure a custom billing period for this order.
This option is only available for recurring plans.
    1. Press **Billing period**.
    2. To specify the length of the billing period, select one of the following:
      - **Monthly:** Bill the customer every month.
      - **Yearly:** Bill the customer every year.
      - **Custom:** Bill the customer at a custom interval. 
To define a custom billing period length: In the **Select period** dropdown, select **Days**, **Weeks**, or **Months**.
In the **Number** field, enter the corresponding number of days, weeks, or months.
    3. In the **Frequency** section, to specify how often the billing period recurs, select one of the following:
      - **Recurs until canceled:** Billing recurs until the subscription is canceled.
      - **Limited to:** Billing recurs for a specified number of occurrences.
    4. Press **Save**.

Use this option to configure a custom plan name, currency, or plan type for this order.
    1. Press **Edit plan**.
    2. In the **Name** field, enter a name to display on receipts and invoices.
    3. In the **Currency** dropdown, enter the currency to use for this order.
    4. Under **Type**, select one of the following:
The following options are available depending on the plan type.
For example, trial only and recurring options are only available for recurring plans.
      - Change the plan to a trial only plan: Select **Trial only**.
      - Change the plan to a recurring plan: Select **Recurring**.
      - Change the plan to a non-recurring order: Select **One-time**.

Use this option to configure custom metered billing based on usage for this order.
This option is only available for metered billing plans that are billed in arrears (postpaid).
To activate metered billing, enable postpaid settings: Press **Billing timing**, then select **Postpaid**.
    1. Press **Activate metered billing**.
    2. In the **Metered billing strategy** dropdown, select one of the following:
      - Accumulate the usage and report the total: select **Sum of reported usage**.
      - Report every usage: Select this strategy to **Last reported usage**.
    3. In the **Minimum quantity** field, enter the minimum quantity to charge at the end of a service period regardless of reported usage.
    4. In the **Maximum quantity** field, enter the maximum quantity to charge at the end of a service period regardless of reported usage.
    5. Optionally, to bill the last reported quantity instead of zero when no usage is reported during a service period: Select the **Use last reported quantity when no usage is reported** checkbox.
This setting is only available when using the **Last reported usage** billing strategy.
For more information, see [Last reported quantity when no usage is reported](/docs/settings/products-and-pricing#last-reported-quantity-when-no-usage-is-reported).

Use this option to configure custom billing timing for this order.
    1. Select one of the following:
      - Specify that payments must be paid in advance: Select **Prepaid**.
      - Specify that payments must be paid at the end of the billing cycle: Select **Postpaid**.
    2. In the **Service period anchor** section, to set when the service period renews, select **Activate service period anchor** and specify a date. 
The start date and service period anchor date determine when the service period starts and ends.

Use this option to configure custom trial or setup settings for this order.
    1. Press **Trial and setup**.
    2. In the **Trial** section, to configure a custom trial period, select **Activate trial**, then specify the trial period length and total price.
For a free trial, in the **Trial price** field, enter `0`.
    3. In the Setup section, to configure a custom setup fee, select **Activate setup**, then specify the setup fee amount.
  2. Press **Save**.
8. In the **Payment preferences** section, select from the following:
In the **AutoPay** section, select **On**.
Note: A trial can be configured when no trial is defined in the related pricing plan.
  - To specify that the order is trial only and ends when the trial period ends: In the **Trial** section, select **Trial only**, and enter the trial end date. 
Some orders include 'trial only' items with a recurring billing interval.
To convert a 'trial only' item, change it from 'trial only' to a subscription with trial and recurring billing.
The trial continues, and billing starts when the trial ends.
For more information, see [Convert a trial only subscription to subscription with trial and recurring billing](/docs/data-tables/manage-subscriptions#convert-a-trial-only-subscription-to-subscription-with-trial-and-recurring-billing).
  - To override the trial period length of the related pricing plan, select **Override trial settings**.
For example, use this setting to provide a longer or shorter trial period than the one in the related pricing plan.
You can also use it to create a trial if the related plan has no trial.

In the **Default payment instrument** section, select a payment instrument and enter the details. 
Note: A default payment instrument takes precedence over the customer's primary payment instrument.
In the **Coupon** section, select coupons.
For more information, see [Coupons](/docs/settings/coupons-and-discounts).
In the **Abandon time** section, select an option.
  1. In the **Delinquency period** section, select the **Activate delinquency period** checkbox.
  2. Specify the length of time after which the subscription is canceled if it is not paid.
9. In the **Shipping** section, select from the following:
To access shipping settings, the related product must have shipping settings configured.
For more information, see [Products and pricing](/docs/settings/products-and-pricing) and [Shipping](/docs/settings/shipping).
  - To dynamically calculate shipping costs based on your configured shipping rate settings: Select **Rebilly**.
  - To manually specify the shipping costs for the order: Select **Manual**.
10. In the **Timing** section, select from the following:
In the **Start date** section, select one of the following:
  - To start the order immediately, select **Now**.
  - To start the order at a specific date, select **Specific date**.

In the **Renewal** section, select one of the following:
  - To renew the order at the end of the service period, select **At the end of the service period**.
  - To renew the order at a specific date, select **Specific date**.

In the **Service anchor date** section, select **Activate service anchor shift** and select a date.
11. In the **Invoice time shift** section, select from the following:
Select **Activate issued time shift** and select a date and time.
Select **Activate due time shift** and select a date and time.
12. Optionally, to add information or notes to display on the customer's invoice, in the **Notes** section, enter details.
13. At the bottom of the page, press **Create order**.


## Create a credit memo

A credit memo is a record that describes an amount owed to a customer.
A common use case for a credit memo is to provide store credit instead of a refund.
This use case applies when a customer pays more than they owe or returns a product.
To create a credit memo, see [Create a credit memo](/docs/data-tables/manage-credit-memos#create-a-credit-memo).
For more information on credit memos, see [Credit memos](/docs/data-tables/manage-credit-memos).

## Create a quote

Use this process to create a quote.
A quote is a pricing estimate for requested goods or services.
Use a quote to support negotiation before an order is created.
Customers can approve or reject a quote.
If a quote is approved, a new order may be created based on the quote.
Order creation depends on which quote acceptance conditions are defined and fulfilled.
A quote has an expiration date.
Merchants can also recall or cancel an issued quote.

Note
For more information on quotes, see [Quotes](/docs/data-tables/manage-quotes).

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, press **Actions**, then press **Create quote**.
5. In the **Website** field, select a website to associate with the quote.
6. In the **Products and plans** section, select products and plans to add to the quote.
7. In the **Quote details** section, enter the following:
  - The expiration date of the quote.
  - A URL to redirect the customer to when a quote is accepted or rejected.
  - Apply any coupons to the quote.
8. Optionally, to collect payment for related subscriptions automatically: In the **Autopay** section, select the **Enable autopay** checkbox.
9. In the **Acceptance** section, specify the condition that must be fulfilled for the quote to be accepted.
Select from the following:
  - Accept the quote when the customer pays the full amount: Select **Payment**.
  - Accept the quote when the customer accepts the quote: Select **Customer**.
10. Optionally, to display payment terms to the customer: In the **Payment terms & signature** section, enter terms.
11. Optionally, to display a signature line on the printed quote: Select **Include a signature line**, then enter a signatory name to print on the signature line.
12. Press **Save quote**.


## Generate and share a billing portal URL

Use this process to generate and share billing portal links.
Customers use billing portals to add new payment cards or update their address before a renewal.
This process creates a unique link that can be shared by email or in live chat.

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, press **Actions**, then press **Generate billing portal link**.
5. Select a billing portal, then press **Generate link**.
6. Copy the URL and share it with the customer.


## Manage a customer's payment instruments

Use this process to manage a customer's payment instruments.

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the top right of the page, under **Payment instruments**, press the active payment instrument.
5. In the **Manage payment instruments** dropdown, select from the following:
Press **Add new**.
Locate the payment instrument, then press **Set as primary**.
Locate the payment instrument, then select the **Use as backup** checkbox.
Locate the payment instrument, then press **Deactivate**.
Locate the payment instrument, then press **Update exp.**
Locate the payment instrument, then press **Edit address**.
For more information, see [Sticky gateway accounts](/docs/settings/gateway-routing#sticky-gateway-accounts).
Locate the payment instrument, then press **Sticky note** **Update sticky gateway**.
Locate the payment instrument, then press **Fingerprint** **Copy fingerprint**.


## Manage customer tax ID numbers

Use this process to manage customer tax ID numbers.

## Redeem a coupon

Use this process to apply coupons to a customer's account.

Important
You must create coupons before they can be redeemed.
For more information, see [Coupons & discounts](/docs/settings/coupons-and-discounts).

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, press **Actions**, then press **Redeem coupons**.
5. Select one or more coupons.
6. Optionally, to notify the customer by email that coupons were redeemed, select **Send email to customer**.
7. Press **Redeem**.


## Refund transactions

Use this process to [refund a single transaction](#refund-a-single-transaction) or [refund multiple transactions](#refund-multiple-transactions).

Note
If you issue a refund before funds are withdrawn from a customer's account, the original transaction status is set to: `voided`.

When you refund a transaction:

- A new transaction is created with type `refund` or `void`.
- The original transaction status changes from `completed` to `partially-refunded`, `refunded`, or `voided`.
- The refund is displayed in the **Timeline** section.


For more information on transaction statuses, see [Transactions](/docs/dev-docs/transactions).

### Refund a single transaction

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**.
3. Press **Customers** and select a customer.
4. Select one of the following:
  1. In the top left of the page, press **Segments**.
  2. Press **Payments**, then press **Sales**.
  3. In the **ID** column, select the transaction.
  4. Press **Refund**, select an amount, then press **Apply**.

  1. In the **Timeline** section, locate the transaction and select it.
  2. Press **Refund**, select an amount, then press **Apply**.


### Refund multiple transactions

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer.
4. In the top left of the page, press **Segments**.
5. Press **Payments**, then press **Sales**.
6. Select the checkbox on the left of each transaction.
7. Press **Batch** **Refund selected items**.


## Update transaction results

Use this process to set the result of one or more transactions to **Abandoned**, **Approved**, **Canceled**, or **Declined**.

To update a single transaction based on data from a payment gateway, see [Query a payment gateway](/docs/data-tables/manage-payments#query-a-payment-gateway).

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer.
4. In the top left of the page, press **Segments**.
5. Press **Payments**, then press **Sales**.
6. Select the checkbox on the left of each transaction.
7. Press **Batch** **Update selected results**.
8. In the **Result** dropdown, select **Abandoned**, **Approved**, **Canceled**, or **Declined**.
9. Press **Update results**. 
The update does not change transactions that already have the selected result.


## Create a payout request (Experimental)

To create a payout request on behalf of a customer, see [Create a payout request](/docs/data-tables/manage-payout-requests#create-a-payout-request).
Use the same process to share a payment link.

## Send a payout (Experimental)

Use this process to pay your vendors or customers.
A payout creates a `credit` transaction.
For more information, see [Transactions](/docs/dev-docs/transactions).

Important
- Before you send a payout, ensure that your payment gateway has this feature activated on your account.
Depending on your provider, you may need to request this through support.
- Payouts cannot be reversed.
Before you send a payout, ensure that the payee and amount are correct.
- Do not use payouts in place of a refund, there may be tax reporting requirements.
Refunds are related to the original transaction.
For more information, see [Refund transactions](#refund-transactions).


1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, press **Actions**, then press **Send payout**.
5. In the **Amount** field, enter the amount you want to pay.
6. In the **Currency** dropdown, select the currency you want to pay in.
7. In the **Request ID** field, enter a unique ID for the payout.
8. In the **Description** field, enter a description for the payout.
9. Press **Submit**.


## Set up a payment instrument

Use this process to create a URL where the customer can set up a new payment instrument.
This process is useful when a customer needs to add a new payment instrument to their account.

To add a payment instrument on behalf of a customer, see [Add a payment instrument to a customer's account](#add-a-payment-instrument-to-a-customers-account).

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, press **Actions**, then press **Set up payment instrument**.
5. Select a currency for the payment instrument, then press **Submit**.
6. To copy the URL, press **Copy**.
7. Share the URL with the customer.


## View or cancel active subscriptions

Use this process to view or cancel active customer subscriptions.
For more information, see [Billing](/docs/data-tables/manage-billing).

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the navigation bar, press **Data tables**, then press **Customers**.
3. In the **Name** column, press a customer's name.
4. In the right of the page, in the **Active subscriptions** section, press **Actions**, then press **View** or **Cancel subscription**.