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

# Retrieve configured URLs

> This endpoint fetch the merchant's preference and return the redirection URL saved in there.
    This is mostly used for the Hub2 modal feature.
    You must provide the payment intent token for that.



## OpenAPI

````yaml get /payment-intents/url/{token}
openapi: 3.0.0
info:
  title: Hub2 Service · Api
  description: |-
    This is the Hub2 api reference |
          Please check https://docs.hub2.io/ for the full documentation |
          Rate limits of endpoints are here : https://docs.hub2.io/en/details/limits.html.
  version: 2.149.1
  contact:
    name: Hub2
    url: https://www.hub2.io/
    email: contact@hub2.io
servers: []
security: []
tags:
  - name: Payments
    description: >-
      Best known as the PAY-IN API, it provides endpoints for merchants to
      perform Hub2 PAY-IN transactions.
  - name: Transfers
    description: >-
      Best known as the PAY-OUT API, it provides endpoints for merchants to
      perform Hub2 PAY-OUT transactions.
  - name: IRT
    description: International Remittance Transfers
  - name: Balance
    description: ''
  - name: Webhooks
    description: ''
  - name: Provisioning
    description: ''
  - name: Payment on Terminal
    description: ''
  - name: Receipt
    description: ''
  - name: Sms
    description: ''
  - name: Data
    description: ''
  - name: Compliance
    description: ''
  - name: Recipient
    description: ''
  - name: Delegation
    description: ''
  - name: Deposits
    description: ''
  - name: Payment Links
    description: ''
  - name: Submerchants
    description: ''
paths:
  /payment-intents/url/{token}:
    get:
      tags:
        - Payments
      summary: Retrieve configured URLs
      description: >-
        This endpoint fetch the merchant's preference and return the redirection
        URL saved in there.
            This is mostly used for the Hub2 modal feature.
            You must provide the payment intent token for that.
      operationId: PaymentIntentsController_getUrl
      parameters:
        - name: token
          required: true
          in: path
          description: Provided merchant's token.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MerchantPreferencesUrl'
        '401':
          description: Invalid token provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiBadPaymentIntentTokenError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiNotFoundErrorAlias'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiInternalErrorAlias'
components:
  schemas:
    MerchantPreferencesUrl:
      type: object
      properties:
        onSuccessRedirectionUrl:
          type: string
          description: Redirection url on success
          title: onSuccessRedirectionUrl
        onFailRedirectionUrl:
          type: string
          description: Redirection url on fail
          title: onFailRedirectionUrl
        onCancelRedirectionUrl:
          type: string
          description: Redirection url on cancel
          title: onCancelRedirectionUrl
      required:
        - onSuccessRedirectionUrl
        - onFailRedirectionUrl
        - onCancelRedirectionUrl
    ApiBadPaymentIntentTokenError:
      type: object
      properties:
        status:
          type: number
          description: HTTP error code.
          example: 401
        error:
          description: HTTP error description.
          allOf:
            - $ref: '#/components/schemas/InternalApiUnauthorizedError'
        code:
          type: string
          description: Error code
          enum:
            - api_error
            - transaction_error
            - invalid_request
            - rate_limit_error
            - authorization_error
            - connection_error
            - policy_error
          example: bad_payment_intent_token
        message:
          type: string
          description: Detailed error message which describe what happened.
          example: The provided token is incorrect
      required:
        - status
        - error
        - code
        - message
    ApiNotFoundErrorAlias:
      type: object
      properties:
        httpStatus:
          type: number
          description: Http status
          enum:
            - 404
          example: 404
        message:
          type: string
          description: Detailed error message which describe what happened.
          example: X not found
        error:
          type: string
          description: Error message
          example: Not found
      required:
        - httpStatus
        - message
        - error
    ApiInternalErrorAlias:
      type: object
      properties:
        type:
          type: string
          description: The type of this error.
          example: internal_error
        code:
          type: string
          description: The error code for this error.
          example:
            - internal_error
            - wrong_credentials
            - not_granted
            - live_mode_not_granted
            - invalid_sandbox_msisdn
            - invalid_url
            - orange_invalid_url
            - wrong_provider
            - override_business_name
            - do_not_override_business_name
        message:
          type: string
          description: The error message describing what happens to throw this error.
          example: An error occurred on our system. Please try again later.
      required:
        - type
        - code
        - message
    InternalApiUnauthorizedError:
      type: object
      properties:
        type:
          type: string
          description: The type of this error.
          example: authorization_error
        code:
          type: string
          description: The internal error code describing what happened.
          enum:
            - bad_payment_intent_token
            - wrong_credentials
          example: wrong_credentials
        message:
          type: string
          description: Detailed error message which describe what happened.
          example: L'ID marchand et/ou la clé d'API sont incorrects.
      required:
        - type
        - code
        - message

````