> ## 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.

# Get Hosted payment request

> Used to get details of a payment request



## OpenAPI

````yaml /openapi-converted.json get /hosted/payment-requests/{paymentRequestId}
openapi: 3.0.1
info:
  description: >-
    The Yapily API enables connections between your application and users'
    banks. For more information check out our [documentation](/introduction).


    In particular, make sure to view our [Getting
    Started](/getting-started/get-started) steps if this is your first time
    here.


    While testing the API, our list of [sandbox
    credentials](/resources/sandbox/sandbox-credentials) maybe useful.
  title: Yapily API
  version: 12.3.4
  contact:
    name: Yapily Support
    url: https://docs.yapily.com/resources/support
    email: support@yapily.com
servers:
  - url: https://api.yapily.com
security:
  - basicAuth: []
tags:
  - description: >-
      The `Application` is the base entity that is used to interact with the API
      and contains a collection of `Institution` objects. You can have multiple
      Applications associated with your account e.g. a production application
      with live access to each `Institution` and a development application with
      access to sandboxes.
    name: Application
  - description: >-
      The Users endpoints are used to manage each user (otherwise known as the
      PSU) in Yapily. Each user belongs to an Application and as a consequence,
      so do each `Consent` created for a particular `User`.
    name: Users
  - description: >-
      An `Institution` object represents any Account Serving Payment Servicing
      Provider (ASPSP) that has been integrated and is accessible through the
      Yapily APIs (ASPSPs are entities that publish Read/Write APIs to permit,
      with customer consent, payments initiated by third party providers and/or
      make their customers financial data available to third party providers via
      their API endpoints).


      Any one of the following would be represented as Institution:


      - Traditional banks e.g. Santander

      - Neo-banks e.g. Monzo

      - Building societies e.g. Cumberland Building Society
    name: Institutions
  - description: >-
      The Consents endpoints are used to manage each `Consent` created by Yapily
      in response to an authorisation created for a user.


      The `Consent` object contains data that identifies a user's consent for a
      specific `Institution` within a Yapily application. Other than the id of
      the consent, the `institution-id` for the corresponding `Institution` and
      the user identifiers (`user-uuid` and `application-user-id`), it contains
      various details that indicates how the `Consent` can be used.
    name: Consents
  - description: >-
      Before calling [Financial Data](#yapily-api-financial-data) or
      [Payments](#yapily-api-payments) endpoints, a consent from an end-user
      must be obtained.


      Consents are valid for up to 90 days for Financial Data endpoints and have
      a single-use for Payment endpoints i.e. a new consent must be obtained for
      each payment.


      NOTE: A user consent is also referred to as an 'Authorisation'.
    name: Authorisations
  - description: >-
      In order to access a user's Financial Data, you are required to request an
      [Authorisation](#tag/Authorisations) from the user to share the account
      information the bank has. Once a `consent-token` is obtained, you can call
      the necessary Financial Data endpoint(s) to retrieve the user's data.
    name: Financial Data
  - description: >-
      In order to make a Payment on behalf of a user, you are required to
      request an [Authorisation](#tag/Authorisations) from the user to authorise
      the user's account to make the payment from. Once a `consent-token` is
      obtained, you can call the necessary Payments endpoint(s) to execute a
      payment.
    name: Payments
  - description: >+
      The Notifications endpoints provide an interactive way for user to receive
      notifications according to different event-types. This feature is
      currently in private beta. Please reach out if you require access. 

    name: Notifications
  - description: >-
      Variable Recurring Payments enables transfer of money between accounts
      held by the same person or transfer of money for business payments. 


      In order to make Sweeping Variable Recurring Payments on behalf of a user,
      you are required to request an [Consent](#tag/Authorisations) from the
      user by calling the Sweeping Consent endpoint to authorise the user's
      account to make the payment. Once a `consent-token` is obtained, you can
      call the Payments endpoint to execute the Sweeping Variable Recurring
      Payments transaction. Before executing the payment, you have the option to
      confirm availability of funds in the user's account by calling the Funds
      Confirmation endpoint. 


      See [VRP Payments](/payments/vrps/additional-information) for more
      information.
    name: Variable Recurring Payments
  - description: Hosted Payment Pages endpoints for payments products
    name: Hosted Payment Pages
  - description: Hosted Consent Pages endpoints for data products
    name: Hosted Consent Pages
  - description: >-
      The constraints endpoints can be used to retrieve institution specific
      data requirements and rules that will apply when performing other
      operations.
    name: Constraints
  - description: >-
      Application Management endpoints help with creating and managing client
      sub-applications.
    name: Application Management
  - description: 'Data Plus endpoints enable our customers to enrich transaction data. '
    name: Data Plus
  - description: Webhook endpoints
    name: Webhooks
  - description: Application Beneficiaries Endpoints
    name: Application Beneficiaries
  - description: User Beneficiaries Endpoints
    name: User Beneficiaries
paths:
  /hosted/payment-requests/{paymentRequestId}:
    get:
      tags:
        - Hosted Payment Pages
      summary: Get Hosted payment request
      description: Used to get details of a payment request
      operationId: getHostedPaymentRequest
      parameters:
        - description: Unique Identifier of the payment request
          in: path
          name: paymentRequestId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/SubAppHeader'
      responses:
        '200':
          content:
            application/json;charset=UTF-8:
              examples:
                Get Hosted Payment Request Response:
                  $ref: '#/components/examples/get-hosted-payment-request-response'
              schema:
                $ref: '#/components/schemas/ApiResponseOfGetHostedPaymentRequest'
          description: Ok
        '401':
          content:
            application/json;charset=UTF-8:
              examples:
                401 Error Response:
                  $ref: '#/components/examples/401-error-response'
              schema:
                $ref: '#/components/schemas/ApiResponseError'
          description: Unauthorized
        '404':
          content:
            application/json;charset=UTF-8:
              examples:
                404 Error Response:
                  $ref: '#/components/examples/404-error-response'
              schema:
                $ref: '#/components/schemas/ApiResponseError'
          description: Not Found
        '500':
          content:
            application/json;charset=UTF-8:
              examples:
                500 Error Response:
                  $ref: '#/components/examples/500-error-response'
              schema:
                $ref: '#/components/schemas/ApiResponseError'
          description: Unexpected Error
        default:
          content:
            application/json;charset=UTF-8:
              examples:
                Error Response:
                  $ref: '#/components/examples/error-response-code-401'
              schema:
                $ref: '#/components/schemas/ApiResponseError'
          description: Error Response
components:
  parameters:
    SubAppHeader:
      description: The sub-application ID to which event type is being subscribed to
      in: header
      name: sub-application
      required: false
      schema:
        type: string
        format: uuid
  examples:
    get-hosted-payment-request-response:
      description: Get Hosted payment request Response
      value:
        meta:
          tracingId: 2dbfd85b4f2940c6a206e96dd90e52d0
        data:
          paymentRequestId: eb39f8ae-aeff-4ffa-a23d-d4a5b3eff406
          userId: 3ddf5dd0-aa48-4d0f-baa7-fa057e9e911d
          applicationUserId: string
          applicationId: 64949de6-6510-4d70-9500-d4aa094c506c
          institutionIdentifiers:
            institutionId: modelo-sandbox
            institutionCountryCode: GB
          userSettings:
            language: en
            location: GB
          redirectUrl: https://tpp-application.com/
          paymentRequestDetails:
            amountDetails:
              amountToPay: 1
              currency: GBP
            reference: Test Payment
            contextType: OTHER
            type: DOMESTIC_PAYMENT
            payee:
              name: Jane Doe
              accountIdentifications:
                - type: SORT_CODE
                  identification: '123456'
                - type: ACCOUNT_NUMBER
                  identification: '12345678'
            payer:
              name: John Doe
              accountIdentifications:
                - type: SORT_CODE
                  identification: '121212'
                - type: ACCOUNT_NUMBER
                  identification: '87654321'
          createdAt: '2021-06-10T11:26:54.887Z'
          authorisationExpiresAt: '2021-06-10T11:36:54.887Z'
          status: ACTIVE
          payments:
            - paymentId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
              institutionIdentifiers:
                institutionId: string
                institutionCountryCode: GB
              userIdentifiers:
                psuId: string
                psuCorporateId: string
                psuIpAddress: string
              phases:
                - phaseName: INITIATED
                  phaseCreatedAt: '2021-06-10T11:26:54.887Z'
                - phaseName: INSTITUTION_SUBMITTED
                  phaseCreatedAt: '2021-06-10T11:26:55.123Z'
                - phaseName: INPUT_CAPTURED
                  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
              institutionPaymentId: string
              paymentLifecycleId: string
              paymentIdempotencyId: 04ab4536gaerfc0e1f93c4f4
              reference: Bill payment
              contextType: OTHER
              type: DOMESTIC_PAYMENT
              payee:
                name: Jane Doe
                accountIdentifications:
                  - identification: '401016'
                    type: SORT_CODE
                  - identification: '71518920'
                    type: ACCOUNT_NUMBER
                address:
                  country: GB
                merchantId: '24589303'
                merchantCategoryCode: '5551'
              payer:
                name: John Doe
                accountIdentifications:
                  - type: SORT_CODE
                    identification: '401016'
                address:
                  country: GB
              amount:
                amount: 10
                currency: GBP
    401-error-response:
      description: 401 Error
      value:
        error:
          tracingId: 0c2d0973bdd24224a65e5d0f7d1b6154
          code: 401
          status: UNAUTHORIZED
          supportUrl: https://support.yapily.com/
          source: YAPILY
          issues:
            - type: CREDENTIALS
              code: 10700
              message: Authorization header invalid or credentials not authenticated
    404-error-response:
      description: 404 Error
      value:
        error:
          tracingId: 0c2d0973bdd24224a65e5d0f7d1b6154
          code: 404
          status: NOT FOUND
          supportUrl: https://support.yapily.com/
          source: YAPILY
          issues:
            - type: INVALID_REQUEST
              code: 10800
              message: Resource not found
    500-error-response:
      description: 500 Error
      value:
        error:
          tracingId: 0c2d0973bdd24224a65e5d0f7d1b6154
          code: 500
          status: INTERNAL SERVER ERROR
          supportUrl: https://support.yapily.com/
          source: YAPILY
          issues:
            - type: INTERNAL_SERVER_ERROR
              code: 11000
              message: Unexpected server error
    error-response-code-401:
      description: Error Response
      value:
        error:
          code: 401
          status: UNAUTHORIZED
          message: Full authentication is required to access this resource
  schemas:
    ApiResponseOfGetHostedPaymentRequest:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/ResponseMeta'
        data:
          $ref: '#/components/schemas/HostedPaymentDetails'
    ApiResponseError:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
        raw:
          deprecated: true
          type: array
          items:
            $ref: '#/components/schemas/RawResponse'
      description: >-
        Used to return errors from the bank from each request


        - `400` - Returned by any `POST` endpoint when the body does not conform
        to the contract

        - `401` - Returned by any endpoint when an invalid `authToken` is used
        for authentication

        - `403` - Returned by any [Financial
        Data](/api-reference#financial-data) and any
        [Payments](/api-reference#payments) endpoint when the `Consent` is no
        longer authorised to access financial data or to make a payment

        - `404` - Returned by any endpoint where there are path parameters and
        the path parameters supplied are unable to find the desired resource

        - `409` - Returned by any `POST` endpoint when creating a resource that
        conflicts with any other existing resource e.g. [Create
        User](/api-reference/addUser)

        - `424` - Returned by any [Financial
        Data](/api-reference#financial-data) and any
        [Payments](/api-reference#payments) endpoint when the feature to be
        accessed is not supported by the `Institution`.

        - `500` - Returned by any endpoint when Yapily is down. If you encounter
        any false positives, please [notify us](mailto:support@yapily.com)
      example:
        error:
          tracingId: 74b13ce8ed51419f92c5d609e04532de
          code: 424
          institutionError:
            errorMessage: >-
              {"Code":"500 Internal Server
              Error","Id":"5ff8d331-4282-41e0-b5ef-1ac9ac39f009","Message":"Technical
              Error. Please try again
              later","Errors":[{"ErrorCode":"UK.OBIE.UnexpectedError","Message":"There
              was a problem processing your request. Please try again later"}]}
            httpStatusCode: 500
          source: INSTITUTION
          status: FAILED_DEPENDENCY
    ResponseMeta:
      type: object
      properties:
        tracingId:
          type: string
    HostedPaymentDetails:
      type: object
      properties:
        paymentRequestId:
          type: string
          format: uuid
          description: The unique ID of the payment request.
        userId:
          type: string
          format: uuid
          description: The Unique Identifier for the `User` assigned by Yapily.
        applicationUserId:
          type: string
          description: Your reference to the `User`.
        applicationId:
          type: string
          format: uuid
          description: >-
            The Unique Identifier of the `Application` the user is associated
            with.
        institutionIdentifiers:
          $ref: '#/components/schemas/InstitutionIdentifiersResponse'
        userSettings:
          $ref: '#/components/schemas/UserSettings'
        redirectUrl:
          type: string
          description: >-
            URL of your server to redirect the user after completion of the
            payment flow.
          example: https://tpp-application.com
        paymentRequestDetails:
          $ref: '#/components/schemas/HostedPaymentRequestDetailsLink'
        createdAt:
          type: string
          description: The date and time at which the payment request was created.
          format: date-time
        authorisationExpiresAt:
          type: string
          format: date-time
          description: The date and time at which the auth Token will expire.
        status:
          type: string
          description: |-
            Current status of the payment request. 

             Possible values: 

             ACTIVE 

             INACTIVE
        payments:
          uniqueItems: true
          type: array
          description: Payments that have been initiated as part of this request
          items:
            $ref: '#/components/schemas/HostedPayment'
    ApiError:
      type: object
      description: Provides details of the error that has occurred.
      properties:
        code:
          type: integer
          description: __Mandatory__. Numeric `HTTP` status code associated with the error.
          format: int32
        institutionError:
          $ref: '#/components/schemas/InstitutionError'
        message:
          type: string
          description: >-
            __Mandatory__. Description of the exact error that has been
            experienced.
        source:
          type: string
        status:
          type: string
          description: __Mandatory__. Textual description of the `HTTP` error status type.
        tracingId:
          type: string
          description: >-
            __Optional__.  A unique identifier assigned by Yapily for the
            request that can be used for support purposes.
    RawResponse:
      deprecated: true
      type: object
      description: >-
        [DEPRECATED] Interaction (raw request and response) that occurred with
        the `Institution` in order to fulfil a request.
      properties:
        request:
          $ref: '#/components/schemas/RawRequest'
        duration:
          type: string
          format: iso8601
        headers:
          type: object
          additionalProperties:
            type: string
        resultCode:
          type: integer
          format: int32
        result:
          type: object
    InstitutionIdentifiersResponse:
      description: Specifies the institution selected for making the payment.
      type: object
      properties:
        institutionId:
          type: string
          description: >-
            Yapily identifier which identifies the `Institution` the payment
            request is sent to.
        institutionCountryCode:
          type: string
          description: >-
            2 letter ISO Country code of the `Institution` the payment request
            is sent to.
          example: GB
    UserSettings:
      description: Specifies the language and location preferences of the user.
      type: object
      properties:
        language:
          type: string
          description: >-
            2 letter ISO Language code which denotes the language preference for
            the `User`.
          example: en
        location:
          type: string
          description: >-
            2 letter ISO Country code which denotes the location preference for
            the `User`.
          example: GB
    HostedPaymentRequestDetailsLink:
      type: object
      properties:
        reference:
          type: string
          description: >-
            The payment reference or description. Limited to a maximum of 18
            characters for UK institutions.
          example: Bill payment
        contextType:
          $ref: '#/components/schemas/PaymentContextTypeResponse'
        type:
          $ref: '#/components/schemas/PaymentTypeResponse'
        payee:
          $ref: '#/components/schemas/PayeeDetailsResponse'
        payer:
          $ref: '#/components/schemas/PayerDetailsResponse'
        amountDetails:
          $ref: '#/components/schemas/AmountDetailsResponse'
        paymentDueDate:
          type: string
          format: date
          description: >-
            The date that the payment is due. Displayed to the end user in the
            payment summary screen.
    HostedPayment:
      type: object
      properties:
        paymentId:
          type: string
          format: uuid
          description: The Unique Identifier of the payment.
        hostedPaymentId:
          type: string
          format: uuid
          description: >-
            The Unique Identifier of the payment created using Yapily hosted
            application.
        consentId:
          type: string
          format: uuid
          description: The Unique Identifier of the consent.
        institutionIdentifiers:
          $ref: '#/components/schemas/InstitutionIdentifiersResponse'
        phases:
          description: The phase reached by the payment and its timestamp.
          type: array
          items:
            $ref: '#/components/schemas/HostedPaymentPhase'
        paymentStatus:
          type: string
          description: >-
            Payment status based on latest HostedAuthPaymentPhase in phases.
            Value can be 


            - PENDING  -  Payment pending processing

            - COMPLETED  -  Payment processing completed

            - FAILED  -  Payment process failed
        statusDetails:
          description: Details of the payment status.
          type: array
          items:
            $ref: '#/components/schemas/HostedPaymentStatusDetails'
        institutionPaymentId:
          type: string
          description: The Unique Identifier of the payment created with the `Institution`.
        paymentLifecycleId:
          type: string
          description: >-
            The Unique Identifier provided by TPP in the Payment request to
            identify the payment.
        paymentIdempotencyId:
          type: string
          description: >-
            A unique identifier that you must provide to identify the payment.
            This can be any alpha-numeric string but is limited to a maximum of
            35 characters.
          example: 04ab4536gaerfc0e1f93c4f4
        reference:
          type: string
          description: >-
            The payment reference or description. Limited to a maximum of 18
            characters for UK institutions.
          example: Bill payment
        contextType:
          $ref: '#/components/schemas/PaymentContextTypeResponse'
        type:
          $ref: '#/components/schemas/PaymentTypeResponse'
        payee:
          $ref: '#/components/schemas/PayeeDetailsResponse'
        payer:
          $ref: '#/components/schemas/PayerDetailsResponse'
        amount:
          $ref: '#/components/schemas/AmountDetailsResponse'
    InstitutionError:
      type: object
      description: >-
        Raw error details provided by the `Institution`, when it was the error
        source.
      properties:
        errorMessage:
          type: string
          description: Textual description of the `Institution` error.
        httpStatusCode:
          type: integer
          description: Numeric HTTP status code associated with the `Institution` error.
          format: int32
    RawRequest:
      type: object
      properties:
        method:
          type: string
        url:
          type: string
        requestInstant:
          type: string
          format: date-time
        headers:
          type: object
          additionalProperties:
            type: string
        body:
          type: object
        bodyParameters:
          type: object
          additionalProperties:
            type: string
        startTime:
          type: string
          format: date-time
        startedAt:
          type: string
          format: date-time
          deprecated: true
    PaymentContextTypeResponse:
      title: Payment Code
      type: string
      description: The payment context code.
      enum:
        - BILL
        - GOODS
        - SERVICES
        - OTHER
        - PERSON_TO_PERSON
    PaymentTypeResponse:
      title: Payment Type
      type: string
      description: >-
        Specifies which of the [payment
        types](/payments/payment-resources/intro-to-payment-execution#payment-types)
        to execute.
      enum:
        - DOMESTIC_PAYMENT
        - DOMESTIC_INSTANT_PAYMENT
        - DOMESTIC_VARIABLE_RECURRING_PAYMENT
        - DOMESTIC_SCHEDULED_PAYMENT
        - DOMESTIC_PERIODIC_PAYMENT
        - INTERNATIONAL_PAYMENT
        - INTERNATIONAL_SCHEDULED_PAYMENT
        - INTERNATIONAL_PERIODIC_PAYMENT
    PayeeDetailsResponse:
      title: Payee Details
      type: object
      description: ' Details of the beneficiary [person or business].'
      properties:
        name:
          title: Payee Name
          type: string
          description: The account holder name of the beneficiary.
          example: Jane Doe
        accountIdentifications:
          uniqueItems: true
          type: array
          description: The account identifications that identify the `Payee` bank account.
          example:
            - identification: '401016'
              type: SORT_CODE
            - identification: '71518920'
              type: ACCOUNT_NUMBER
          items:
            $ref: '#/components/schemas/AccountIdentificationResponse'
        address:
          $ref: '#/components/schemas/AddressResponse'
        merchantId:
          title: Merchant Id
          type: string
          description: >-
            The merchant ID is a unique code provided by the payment processor
            to the merchant.
          example: '24589303'
        merchantCategoryCode:
          title: Merchant Category
          type: string
          description: >-
            The category code of the merchant in case the `Payee` is a business.
            Specified as a 3-letter ISO 18245 code.
          example: '5551'
    PayerDetailsResponse:
      title: Payer Details
      type: object
      properties:
        name:
          title: Payer Name
          type: string
          description: The account holder name of the Payer.
          example: John Doe
        accountIdentifications:
          uniqueItems: true
          type: array
          description: The account identifications that identify the `Payer` bank account.
          items:
            $ref: '#/components/schemas/AccountIdentificationResponse'
        address:
          $ref: '#/components/schemas/AddressResponse'
      description: Details of the benefactor [person or business].
    AmountDetailsResponse:
      title: Amount Details
      type: object
      properties:
        amount:
          title: Amount
          type: number
          description: The monetary value
          example: 10
        currency:
          title: Currency
          type: string
          description: The [ISO 4217](https://www.xe.com/iso4217.php) currency code
          example: GBP
      description: Monetary Amount.
    HostedPaymentPhase:
      type: object
      properties:
        phaseName:
          type: string
          description: >-
            The name of the hosted payment process phase. Allowed values are : 


            - INITIATED - Payment process initiated

            - DECLINED - Payment process failed and will not proceed further

            - INSTITUTION_SUBMITTED - Payment institution submitted

            - EMBEDDED_CREDENTIAL_REQUESTED - For embedded banks, a UI element
            to collect user credentials was displayed

            - CREDENTIALS_ERROR - embedded credentials refused by institution

            - AUTHORISATION_INITIATED - All details required for payment
            initiation have been collected

            - VALIDATION_COMPLETED - The payment payload was validated
            successfully

            - VALIDATION_FAILED - The payment data provided failed validation

            - AUTHORISATION_CREATED - Payment authorisation request created with
            Institution

            - EMBEDDED_CODE_REQUESTED - For embedded banks, a UI element to
            collect SCA for initiated consent was displayed

            - EMBEDDED_TYPE_REQUESTED - For embedded banks, a UI element to
            allow the user to select their preferred SCA method for this consent
            authorisation was displayed

            - DECOUPLED_AUTHORISATION - For embedded banks, decoupled
            authorisation was initiated by the bank

            - EMBEDDED_CODE_COLLECTED - For embedded banks, SCA code was
            collected for consent authorisation

            - EMBEDDED_TYPE_SELECTED - For embedded banks, preferred SCA method
            was selected for consent authorisation

            - PRE_AUTHORISED - pre authorisation was initiated by bank

            - CONSENT_POLLING_STARTED - We start polling the bank for consent
            authorisation status

            - CONSENT_POLLING_ENDED - We finish polling the bank for consent
            authorisation status

            - AUTHORISED - Payment authorisation completed

            - AUTHORISATION_FAILED - Payment authorisation failed and will not
            proceed further

            - AUTHORISATION_REJECTED - Payment authorisation rejected and will
            not proceed further

            - SUBMITTED - Payment execution created and submitted to Institution

            - SUBMITTED_AUTO - Payment execution created and submitted to
            Institution

            - ACCEPTED - Payment execution accepted by Institution and awaiting
            settlement

            - REJECTED - Payment or Authorisation request rejected by
            Institution and will not proceed further

            - SETTLEMENT_COMPLETED - Payment settlement completed

            - STATUS_POLLING_STARTED - Payment status polling started

            - STATUS_POLLING_ENDED - Payment status polling ended

            - MERCHANT_ACKNOWLEDGED - Payment acknowledgement received from
            merchant

            - FINISHED - Payment process completed
        phaseCreatedAt:
          type: string
          format: date-time
          description: The date and time when phase of the hosted payment was inserted.
      description: The phase of the payment.
    HostedPaymentStatusDetails:
      description: The status of the payment.
      type: object
      properties:
        status:
          $ref: '#/components/schemas/PaymentStatus'
        statusUpdateDate:
          description: Date and time the status was updated.
          type: string
          format: date-time
        isoStatus:
          $ref: '#/components/schemas/HostedPaymentIsoStatus'
    AccountIdentificationResponse:
      title: Account Identifications
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AccountIdentificationTypeResponse'
        identification:
          title: Account Identification
          type: string
          description: |-
            The value associated with the account identification type.

             See [Account Identification Combinations](/payments/payment-resources/intro-to-payment-execution#account-identifications-combinations) for more information on the format of the values.
          example: '401016'
    AddressResponse:
      title: Address Details
      type: object
      properties:
        addressLines:
          title: Address Lines
          type: array
          description: The address line of the address
          example:
            - Ardenham Court
          items:
            type: string
        streetName:
          title: Street
          type: string
          description: The street name of the address
          example: Oxford Road
        buildingNumber:
          title: Building Number
          type: string
          description: The building number of the address
          example: '45'
        postCode:
          title: Post Code
          type: string
          description: The post code of the address
          example: HP19 3EQ
        townName:
          title: Town
          type: string
          description: The town name of the address
          example: Aylesbury
        county:
          title: County
          type: array
          description: The list of counties for the address
          example:
            - Buckinghamshire
          items:
            type: string
        country:
          title: Country
          type: string
          description: The 2-letter country code for the address.
          example: GB
        department:
          title: Department
          type: string
          description: The department for the address
          example: Unit 2
        subDepartment:
          title: Sub-Department
          type: string
          description: The sub-department for the address
          example: Floor 3
        addressType:
          $ref: '#/components/schemas/AddressTypeEnumResponse'
      description: The address of the `Payee` or `Payer`.
      example:
        country: GB
    PaymentStatus:
      type: string
      description: >-
        The status of the Payment. 


        For more information, see [Payment
        Status](/guides/payments/payment-status/)
      enum:
        - PENDING
        - FAILED
        - DECLINED
        - COMPLETED
        - COMPLETED_SETTLEMENT_IN_PROCESS
        - EXPIRED
        - UNKNOWN
        - ACTIVE
        - INACTIVE
    HostedPaymentIsoStatus:
      description: The ISO status of the payment.
      type: object
      properties:
        code:
          type: string
          description: |-
            The ISO 20022 `PaymentStatusCode`. One of : 

             ACSC 

             ACCC 

             ACCP  

             ACSP 

             ACTC 

             ACWC 

             ACWP 

             ACFC 

             RCVD 

             PART 

             PATC 

             PDNG 

             RJCT 

             CANC
          example: ACSC
        name:
          type: string
          description: The full name of the ISO 20022 `PaymentStatusCode`.
          example: AcceptedCreditSettlementCompleted
    AccountIdentificationTypeResponse:
      title: Account Identification Type
      type: string
      description: |-
        Used to describe the format of the account.

         See [Account Identification Combinations](/payments/payment-resources/intro-to-payment-execution#account-identifications-combinations) for more information.
      example: SORT_CODE
      enum:
        - SORT_CODE
        - ACCOUNT_NUMBER
        - IBAN
        - BBAN
        - BIC
        - PAN
        - MASKED_PAN
        - MSISDN
        - BSB
        - NCC
        - ABA
        - ABA_WIRE
        - ABA_ACH
        - EMAIL
        - ROLL_NUMBER
        - BLZ
        - IFS
        - CLABE
        - CTN
        - BRANCH_CODE
        - VIRTUAL_ACCOUNT_ID
    AddressTypeEnumResponse:
      title: Address Type
      type: string
      description: The type of address
      enum:
        - BUSINESS
        - CORRESPONDENCE
        - DELIVERY_TO
        - MAIL_TO
        - PO_BOX
        - POSTAL
        - RESIDENTIAL
        - STATEMENT
        - UNKNOWN
  securitySchemes:
    basicAuth:
      description: >-
        Use HTTP Basic Authentication with your Application ID as username and
        Application Secret as password. Manage credentials in the [Yapily
        Console](https://console.yapily.com/). See
        [Authentication](/api-reference/authentication) for details.
      scheme: basic
      type: http

````