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

# Return from an unfinished connect session

> Ends a pending session without granting access. Requires the scoped returnToken delivered in the authorization URL fragment; a session ID alone grants no authority. Sign-in is not required. The token expires 15 minutes after creation, including a five-minute grace period after consent expires. Invalid or expired tokens return 404. Returns only the registered callback with its original state and a server-selected error. Retries preserve the first terminal outcome. Approved sessions return 409.



## OpenAPI

````yaml https://platform.spritz.finance/openapi.json post /v1/connect/sessions/{sessionId}/return
openapi: 3.0.3
info:
  title: Spritz Finance API
  version: 1.0.0
  description: API for the Spritz Finance platform with RFC 9457 error handling
servers:
  - url: https://platform.spritz.finance
    description: Production
  - url: https://sandbox.spritz.finance
    description: Sandbox
security: []
tags:
  - name: Users
    description: User management endpoints
  - name: ACH Debit
    description: ACH debit eligibility and deposit endpoints
  - name: Bank Accounts
    description: Manage bank accounts for off-ramp destinations
  - name: Bills
    description: Manage bill pay accounts
  - name: Cards
    description: Spritz-issued debit cards
  - name: Auto-Ramp Accounts
    description: Virtual bank accounts that automatically convert fiat deposits to crypto
  - name: Spritz App
    description: >-
      Endpoints used by the Spritz app and internal SDKs. Excluded from the
      public partner spec.
paths:
  /v1/connect/sessions/{sessionId}/return:
    post:
      tags:
        - Integrator Connect
      summary: Return from an unfinished connect session
      description: >-
        Ends a pending session without granting access. Requires the scoped
        returnToken delivered in the authorization URL fragment; a session ID
        alone grants no authority. Sign-in is not required. The token expires 15
        minutes after creation, including a five-minute grace period after
        consent expires. Invalid or expired tokens return 404. Returns only the
        registered callback with its original state and a server-selected error.
        Retries preserve the first terminal outcome. Approved sessions return
        409.
      operationId: postV1ConnectSessionsBySessionIdReturn
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            minLength: 1
            maxLength: 128
            pattern: ^[a-zA-Z0-9_-]+$
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                returnToken:
                  minLength: 43
                  maxLength: 43
                  pattern: ^[A-Za-z0-9_-]+$
                  description: >-
                    Scoped return capability from the authorization URL
                    fragment.
                  type: string
                reason:
                  type: string
                  enum:
                    - cancelled
                    - failed
              required:
                - returnToken
                - reason
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                returnToken:
                  minLength: 43
                  maxLength: 43
                  pattern: ^[A-Za-z0-9_-]+$
                  description: >-
                    Scoped return capability from the authorization URL
                    fragment.
                  type: string
                reason:
                  type: string
                  enum:
                    - cancelled
                    - failed
              required:
                - returnToken
                - reason
          multipart/form-data:
            schema:
              type: object
              properties:
                returnToken:
                  minLength: 43
                  maxLength: 43
                  pattern: ^[A-Za-z0-9_-]+$
                  description: >-
                    Scoped return capability from the authorization URL
                    fragment.
                  type: string
                reason:
                  type: string
                  enum:
                    - cancelled
                    - failed
              required:
                - returnToken
                - reason
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  callbackUri:
                    type: string
                  error:
                    type: string
                    enum:
                      - access_denied
                      - server_error
                      - session_expired
                required:
                  - callbackUri
                  - error
        '401':
          description: Response for status 401
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                    example: urn:problem-type:auth:unauthorized
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                    example: Unauthorized
                  status:
                    description: The HTTP status code
                    type: number
                    example: 401
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                    example: Bearer token required
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                  realm:
                    description: The authentication realm
                    type: string
                    example: API
                  scope:
                    description: The required scope for this resource
                    type: string
                    example: read:users
                required:
                  - title
                  - status
                additionalProperties: false
        '404':
          description: Response for status 404
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                  status:
                    description: The HTTP status code
                    type: number
                    example: 404
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                  resourceType:
                    description: The type of resource that was not found
                    type: string
                    example: user
                  resourceId:
                    description: The identifier of the resource that was not found
                    type: string
                required:
                  - title
                  - status
                  - resourceType
                  - resourceId
                additionalProperties: false
        '409':
          description: Response for status 409
          content:
            application/problem+json:
              schema:
                additionalProperties: true
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                    example: urn:problem-type:auth:unauthorized
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                    example: Unauthorized
                  status:
                    description: The HTTP status code
                    type: number
                    example: 400
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                    example: /errors/1234567890
                  code:
                    description: >-
                      Machine-readable cause, present when exactly one thing
                      failed. Branch on this, never on `detail`, which is
                      human-facing copy and may change. For deposit limits the
                      vocabulary matches the `reason` values the limits API
                      returns pre-flight.
                    type: string
                    example: transaction_limit
                  field:
                    description: The offending request field, present alongside `code`.
                    type: string
                    example: amountUsd
                  retryable:
                    description: >-
                      Whether retrying the same request later may succeed
                      without changing its inputs.
                    type: boolean
                    example: true
                  retryAfter:
                    description: >-
                      Seconds to wait before retrying, present alongside
                      `retryable: true`. Mirrors the `Retry-After` response
                      header and is meant for short backoffs the server chose
                      (load shedding); for a condition that clears on its own
                      schedule, `clearsAt` carries the absolute time instead.
                    type: number
                    example: 5
                  suggestedAction:
                    type: string
                    enum:
                      - auto_ramp
                      - wait_for_settlement
                  clearsAt:
                    format: date-time
                    type: string
                    description: >-
                      Earliest known time the current temporary condition may
                      clear.
                    nullable: true
                  availableAt:
                    format: date-time
                    type: string
                    description: >-
                      When a temporarily ineligible funding source may become
                      available again.
                    nullable: true
                  permanent:
                    description: >-
                      Whether the current funding-source restriction will not
                      clear automatically.
                    type: boolean
                required:
                  - title
                  - status
        '500':
          description: Response for status 500
          content:
            application/problem+json:
              schema:
                additionalProperties: true
                type: object
                properties:
                  type:
                    default: about:blank
                    description: A URI reference that identifies the problem type
                    type: string
                    example: urn:problem-type:auth:unauthorized
                  title:
                    description: A short, human-readable summary of the problem type
                    type: string
                    example: Unauthorized
                  status:
                    description: The HTTP status code
                    type: number
                    example: 400
                  detail:
                    description: A human-readable explanation specific to this occurrence
                    type: string
                  instance:
                    description: A URI reference that identifies the specific occurrence
                    type: string
                    example: /errors/1234567890
                  code:
                    description: >-
                      Machine-readable cause, present when exactly one thing
                      failed. Branch on this, never on `detail`, which is
                      human-facing copy and may change. For deposit limits the
                      vocabulary matches the `reason` values the limits API
                      returns pre-flight.
                    type: string
                    example: transaction_limit
                  field:
                    description: The offending request field, present alongside `code`.
                    type: string
                    example: amountUsd
                  retryable:
                    description: >-
                      Whether retrying the same request later may succeed
                      without changing its inputs.
                    type: boolean
                    example: true
                  retryAfter:
                    description: >-
                      Seconds to wait before retrying, present alongside
                      `retryable: true`. Mirrors the `Retry-After` response
                      header and is meant for short backoffs the server chose
                      (load shedding); for a condition that clears on its own
                      schedule, `clearsAt` carries the absolute time instead.
                    type: number
                    example: 5
                  suggestedAction:
                    type: string
                    enum:
                      - auto_ramp
                      - wait_for_settlement
                  clearsAt:
                    format: date-time
                    type: string
                    description: >-
                      Earliest known time the current temporary condition may
                      clear.
                    nullable: true
                  availableAt:
                    format: date-time
                    type: string
                    description: >-
                      When a temporarily ineligible funding source may become
                      available again.
                    nullable: true
                  permanent:
                    description: >-
                      Whether the current funding-source restriction will not
                      clear automatically.
                    type: boolean
                required:
                  - title
                  - status
      security: []

````