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

# Hosted Payment Statuses and Phases

> Understand payment status and phase values for Yapily Hosted Pages. Track payment lifecycle from initiation through completion, including all intermediate states.

<Note>
  Hosted Pages is available as a [Beta version](/getting-started/overview#yapily-hosted-pages-beta).
  Please contact your Customer Success Manager if you would like to access it.
</Note>

***

## Introduction

Hosted payment statuses and phases are used to track the progress of a payment made using Yapily Hosted Pages.
We explain the differences among status fields and the phases field in the get hosted payment request response below.

## Related fields in get payment request response

Given below is an example from a response of the get hosted payment request endpoint.
For brevity, only the `phases`, `paymentStatus`, and `statusDetails` fields are included.

**Note:** `statusDetails` will get populated after the payment gets accepted by the institution and it will also contain the iso status and states of the payment.

```json theme={null}
{
  ...
  "data":{
    ...
    "payments": [
      {
        ...
        "phases": [
          {
            "phaseName": "INITIATED",
            "phaseCreatedAt": "2021-06-10T11:26:54.887Z"
          },
          {
            "phaseName": "INSTITUTION_SUBMITTED",
            "phaseCreatedAt": "2021-06-10T11:26:55.123Z"
          },
          {
            "phaseName": "AUTHORISATION_INITIATED",
            "phaseCreatedAt": "2021-06-10T11:27:05.123Z"
          },
          {
            "phaseName": "VALIDATION_COMPLETED",
            "phaseCreatedAt": "2021-06-10T11:27:05.223Z"
          },
          {
            "phaseName": "AUTHORISATION_CREATED",
            "phaseCreatedAt": "2021-06-10T11:27:06.637Z"
          },
          {
            "phaseName": "AUTHORISED",
            "phaseCreatedAt": "2021-06-10T11:27:10.637Z"
          },
          {
            "phaseName": "SUBMITTED",
            "phaseCreatedAt": "2021-06-10T11:27:10.654Z"
          },
          {
            "phaseName": "ACCEPTED",
            "phaseCreatedAt": "2021-06-10T11:27:11.867Z"
          },
          {
            "phaseName": "SETTLEMENT_COMPLETED",
            "phaseCreatedAt": "2021-06-10T11:27:13.887Z"
          }
        ],
        "paymentStatus": "COMPLETED",
        "statusDetails": [
          {
            "status": "PENDING",
            "statusUpdateDate": "2021-06-10T11:27:11.867Z",
            "isoStatus": {
              "code": "PDNG",
              "name": "Pending"
            }
          },
          {
            "status": "COMPLETED",
            "statusUpdateDate": "2021-06-10T11:27:13.887Z",
            "isoStatus": {
              "code": "ACSC",
              "name": "AcceptedSettlementCompleted"
            }
          }
        ]
        ...
```

The `phases` is an array that records the chronological sequence of phases that the payment has gone through;
the `paymentStatus` field indicates the current status of the payment request
and the `statusDetails` field is an array that provides the statuses the payment has gone through,
including each status's specific details such as corresponding ISO status code and name.

## Mapping between status and phases

As phases are recorded by every step that a payment goes through, it provides a more detailed view of the payment's progress.
Therefore, multiple phases can map to a single status. We provide a mapping of the phases to the payment statuses below.

| Phase Name                      | Phase Description                                                                                         | Status    |
| ------------------------------- | --------------------------------------------------------------------------------------------------------- | --------- |
| INITIATED                       | Payment process initiated                                                                                 | PENDING   |
| DECLINED                        | Payment process failed and will not proceed further                                                       | FAILED    |
| INSTITUTION\_SUBMITTED          | Payment institution submitted                                                                             | PENDING   |
| AUTHORISATION\_INITIATED        | Authorisation of payment initiated                                                                        | PENDING   |
| VALIDATION\_COMPLETED           | Payer successfully validated                                                                              | PENDING   |
| VALIDATION\_FAILED              | Failed to validate additional input attributes                                                            | FAILED    |
| EMBEDDED\_CREDENTIAL\_REQUESTED | Payment Institution submitted and embedded credentials are requested for further processing               | PENDING   |
| EMBEDDED\_TYPE\_REQUESTED       | SCA method requested for embedded payment authorisation                                                   | PENDING   |
| EMBEDDED\_TYPE\_SELECTED        | SCA method selected for embedded payment authorisation                                                    | PENDING   |
| EMBEDDED\_CODE\_COLLECTED       | SCA code collected from psu                                                                               | PENDING   |
| DECOUPLED\_AUTHORISATION        | Authorisation for payment that is known to follow the decoupled flow                                      | PENDING   |
| EMBEDDED\_CODE\_REQUESTED       | Expecting user to provide a code                                                                          | PENDING   |
| AUTHORISATION\_CREATED          | Payment authorisation request created with Institution, awaiting authorisation completion                 | PENDING   |
| PRE\_AUTHORISED                 | Payment pre authorisation request created with Institution, awaiting pre authorisation completion         | PENDING   |
| AUTHORISED                      | Payment authorisation completed                                                                           | PENDING   |
| AUTHORISATION\_FAILED           | Payment authorisation failed and will not proceed further                                                 | FAILED    |
| AUTHORISATION\_REJECTED         | Payment authorisation rejected and will not proceed further                                               | FAILED    |
| SUBMITTED                       | Payment execution created and submitted to Institution                                                    | PENDING   |
| SUBMITTED\_AUTO                 | Payment execution created and submitted to Institution automatically after polling consent status success | PENDING   |
| ACCEPTED                        | Payment execution accepted by Institution and awaiting settlement                                         | PENDING   |
| REJECTED                        | Payment or Authorisation request rejected by Institution and will not proceed further                     | FAILED    |
| SETTLEMENT\_COMPLETED           | Payment settlement completed                                                                              | COMPLETED |
| STATUS\_POLLING\_STARTED        | Payment status polling started                                                                            | PENDING   |
| STATUS\_POLLING\_ENDED          | Payment status polling ended                                                                              | PENDING   |
| MERCHANT\_ACKNOWLEDGED          | Payment acknowledgement received from merchant                                                            | COMPLETED |
| FINISHED                        | Payment process completed                                                                                 | -         |

***

## Related Resources

### Hosted Pages Resources

* [Payment Tutorial](/tools-and-services/hosted-pages/payment-tutorial-hosted-pages) - Complete payment integration guide
* [Payment Webhooks](/tools-and-services/hosted-pages/payment-webhooks) - Receive real-time payment status notifications

### Implementation Resources

* [Error Handling](/resources/errors) - Handle payment failures gracefully
* [Support](/resources/support) - Get help with implementation
