# Using PayTomorrow

> PayTomorrow is presented as a payment option at checkout, but only when all of the following conditions are met:

## At checkout

PayTomorrow is presented as a payment option at checkout, but only when all of the
following conditions are met:

- Currency is USD
- Customer first name is present
- Customer last name is present
- Customer email is present
- A shipping address is present
- Basket line items are present

It will **not** be presented if a saved card is required — for example a recurring
payment, a scheduled payment, or any flow where `save_card = true`. If you are
unsure whether this applies, check with your platform.

The option appears at checkout as shown below (subject to any CSS customisation):

![PayTomorrow option at checkout](/_astro/cdn/69da1897c1/using-1.png)

## Payment (immediate capture)

When a customer selects PayTomorrow, they complete the financing application on
PayTomorrow's hosted flow.

:::note[Tip]
When testing in sandbox, use a new made-up customer (name, email address and
mobile number) and a new `alt_key` for every payment. The details that choose
the result are on [PayTomorrow test cards](/payment-providers/paytomorrow-test-cards/).
:::

![PayTomorrow application step](/_astro/cdn/e4dee56b15/using-2.png)

![PayTomorrow application step](/_astro/cdn/ab348447cf/using-3.png)

![PayTomorrow application step](/_astro/cdn/9d879ac458/using-4.png)

![PayTomorrow application step](/_astro/cdn/c9a5cd1ea2/using-5.png)

![PayTomorrow application step](/_astro/cdn/91631ef04a/using-6.png)

![PayTomorrow application step](/_astro/cdn/44ec39e07e/using-7.png)

![PayTomorrow application step](/_astro/cdn/ed0f5a0e5d/using-8.png)

![PayTomorrow application step](/_astro/cdn/a5ed8f6249/using-9.png)

![PayTomorrow application step](/_astro/cdn/97846f2c00/using-10.png)

Once approved in PayTomorrow, the payment shows in the platform as a **Pending**
payment:

![Pending payment in the platform](/_astro/cdn/2ecd2129e5/using-11.png)

This is sent back to the originating system as a `PAYMENT.PENDING` webhook.

### Settling a payment

The order shows in the PayTomorrow backend as **Ready to Settle**. Click the eye
icon in the Options column to view it:

![Ready to Settle in PayTomorrow](/_astro/cdn/a4af5ccbd6/using-12.png)

To complete the payment, with the order in **Ready to Settle**, select **Settle**,
then **Settle Order XXXX**. The order changes status to **Funded**:

![Funded order in PayTomorrow](/_astro/cdn/c2bb0bd370/using-13.png)

The integration automatically reflects the change and transitions the order to
**Approved**, typically within a few seconds:

![Approved payment in the platform](/_astro/cdn/9fe3014eba/using-14.png)

This is sent back to the originating system as a `PAYMENT.SUCCESS` webhook.

## Authorisation and capture

For an auth/capture flow, the customer experience on PayTomorrow is the same:

![PayTomorrow authorisation step](/_astro/cdn/c43acf9d1d/using-15.png)

![PayTomorrow authorisation step](/_astro/cdn/b5b73bdbf3/using-16.png)

![PayTomorrow authorisation step](/_astro/cdn/4696c70f24/using-17.png)

![PayTomorrow authorisation step](/_astro/cdn/7b5ac455b9/using-18.png)

![PayTomorrow authorisation step](/_astro/cdn/542898fb18/using-19.png)

![PayTomorrow authorisation step](/_astro/cdn/c7bb0c637d/using-20.png)

![PayTomorrow authorisation step](/_astro/cdn/cd892c3027/using-21.png)

Once approved in PayTomorrow, this shows as a successful authorisation (rather than
a pending payment):

![Authorisation successful in PayTomorrow](/_astro/cdn/6b0a02eeb9/using-22.png)

In the Merchant Portal it shows as an **Approved** authorisation:

![Approved authorisation in the platform](/_astro/cdn/26c639b9c5/using-23.png)

This is sent back to the originating system as a `PAYMENT.SUCCESS` webhook. In the
PayTomorrow backend the order shows as **Ready to Settle**:

![Ready to Settle in PayTomorrow](/_astro/cdn/faed6ac051/using-24.png)

You can capture the authorisation in one of two ways:

- Capture via the Merchant Portal, Merchant View or the API (initiating a capture
  from the source system)
- Capture via the PayTomorrow backend

### Capture via the platform

In the Merchant Portal or Merchant View, select the **Capture** link at the top of
the authorisation, or use the [capture API](/platforms/reference/operations/capturepayment/):

![Capture link in the platform](/_astro/cdn/fc8a76b251/using-25.png)

![Capture confirmation in the platform](/_astro/cdn/57dc4bc39d/using-26.png)

The originating system receives a `CAPTURE.SUCCESS` webhook, and the transaction
is automatically settled in PayTomorrow:

![Settled transaction in PayTomorrow](/_astro/cdn/5fbcb606e6/using-27.png)

### Capture via PayTomorrow

In the PayTomorrow backend, find the order and select the **Settle** option:

![Settle option in PayTomorrow](/_astro/cdn/3343efe86f/using-28.png)

![Settle order in PayTomorrow](/_astro/cdn/6c1b500f2c/using-29.png)

![Settle order confirmation in PayTomorrow](/_astro/cdn/f32a315e3d/using-30.png)

After a few seconds the integration is notified and automatically generates a capture
transaction, which is sent to the source system as a `CAPTURE.SUCCESS`:

![Capture transaction in the platform](/_astro/cdn/a4d4be533a/using-31.png)

![Capture transaction in the platform](/_astro/cdn/f0c944a868/using-32.png)

![Capture transaction in the platform](/_astro/cdn/e453a25433/using-33.png)

![Capture transaction in the platform](/_astro/cdn/b892946828/using-34.png)

![Capture transaction in the platform](/_astro/cdn/3abcd1af3e/using-35.png)

If you view the timeline of the capture, you can see it was initiated by the
gateway (PayTomorrow) — programmatically this is the field `offline: true`.