---
title: "Submit branch selection"
method: POST
path: "/v3/payments/{id}/authorization-flow/actions/branch-selection"
tags: ["Payments"]
---

# Submit branch selection

`POST /v3/payments/{id}/authorization-flow/actions/branch-selection`

## Request

- Base URL: `https://api.truelayer-sandbox.com`
- URL: `https://api.truelayer-sandbox.com/v3/payments/{id}/authorization-flow/actions/branch-selection`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `https://auth.truelayer.com/connect/token` scopes: `payments`
  - HTTP bearer

Submit the branch details selected by the end user

This API can be called:
- using the `resource_token` associated with the payment you are trying to authorize;
- using a backend bearer token.

## Path parameters

- `id` string, required: Unique ID for the Payment

## Headers

- `Idempotency-Key` string
- `Tl-Signature` string

## Request body

- PerformActionBranchSelection
  - `branch_id` string, required: Unique ID for the branch

## Response `200`

Payment

- union
  - PaymentAuthorizationFlowAuthorizing
    - `authorization_flow` PaymentAuthorizationFlow, required: Contains information regarding the nature and the state of the authorization flow
      - `actions` object, required
        - `next` union, required: The next action can be performed via `POST /v3/payments/{id}/authorization_flow/action/{action_name}` - check its documentation for relevant examples.
          - ActionSpecProviderSelection: Provider selection represents the end user action of selecting a provider
            - `type` 'provider_selection', required
            - `providers` Provider[], required: List of providers to be presented to the end user
              - …
          - ActionSpecSchemeSelection: Scheme selection represents the end user action of selecting a scheme
            - `type` 'scheme_selection', required
            - `schemes` Scheme[], required: List of schemes to be presented to the end user
              - …
          - ActionSpecRedirect
            - `type` 'redirect', required
            - `uri` string, url, required: URL the end user must be redirected to.
          - ActionSpecWaitForOutcome: Indication that there are currently no actions to perform. Clients must poll the `GET /v3/payment/{id}` endpoint until the status changes, or the next action is available.
            - `type` 'wait', required
            - `display_message` DisplayText
              - …
          - ActionSpecForm: Form action represents the end user action of entering further details into the UI.
            - `type` 'form', required
            - `inputs` ActionSpecAdditionalInput[], required: The inputs to be presented to the end user in the UI.
              - …
          - ActionSpecConsent
            - `type` 'consent', required
            - `requirements` ConsentRequirements, required: The details of the consents required to be captured from the user.
              - …
            - `subsequent_action_hint` 'redirect' | 'form' | 'wait', required
          - ActionSpecUserAccountSelection: Provides the end user with a list of previously saved user accounts for reuse.
            - `type` 'user_account_selection', required
            - `user_accounts` UserAccountDetails[], required: List of user accounts to be presented to the end user
              - …
          - ActionSpecRetry
            - `type` 'retry', required
            - `retry_options` RetryOption[], required: List of retry options available
          - ActionSpecBranchSelection: Branch selection represents the end user action of selecting a branch of the provider
            - `type` 'branch_selection', required
            - `branches` Branch[], required: List of branches to be presented to the end user
              - …
        - `adjacent` AdjacentActions: Actions that can be submitted alongside the next action
          - `consent` object
            - `requirements` ConsentRequirements, required: The details of the consents required to be captured from the user.
              - …
    - `status` 'authorizing', required
  - PaymentAuthorizationFlowAuthorizationFailed
    - `status` 'failed', required
    - `failure_stage` 'authorization_required' | 'authorizing' | 'authorized' | 'executed', required: The status the payment was in when it failed.
    - `failure_reason` string, required: The <a href="https://docs.truelayer.com/docs/single-payment-statuses#failure-reasons" target="_blank">reason</a> that the payment failed.

## Other responses

- `400`: Invalid Request
- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Payment Not Found
- `409`: Conflict
- `422`: Idempotency-Key Reuse
- `500`: Unknown Error

---

[API](https://skmtc.dev/truelayer/apis/payments-api-v3.md) - [All operations](https://skmtc.dev/truelayer/apis/payments-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/truelayer/apis/payments-api-v3/revisions/a7c585fc9b84?raw)
