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

# Get payment link

> Returns invoice state, or checkout parent with sessions array and sessionCount.



## OpenAPI

````yaml /openapi.yaml get /collections/{id}
openapi: 3.1.0
info:
  title: Remitflex API
  version: 1.0.0
  description: >
    Programmatic access to Remitflex payment routes, fiat rates, customers, and
    transactions.


    **Dashboard:** Create API keys at https://dashboard.remitflex.io


    **Authentication:** Send your API key as `Authorization: Bearer
    rmf_live_...` or `rmf_test_...`.


    **Idempotency:** Mutating requests (`POST`, `PUT`, `PATCH`, `DELETE`)
    require an `Idempotency-Key` header when authenticated with an API key.
servers:
  - url: http://localhost:4000/v1
    description: Local development
  - url: https://api.remitflex.io/v1
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /collections/{id}:
    get:
      tags:
        - Payment links
      summary: Get payment link
      description: >-
        Returns invoice state, or checkout parent with sessions array and
        sessionCount.
      operationId: getCollection
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          $ref: '#/components/responses/Collection'
      security:
        - ApiKeyAuth: []
components:
  responses:
    Collection:
      description: Payment link
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/SuccessEnvelope'
              - type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Collection'
          examples:
            invoice:
              $ref: '#/components/examples/CollectionInvoiceResponse'
            checkout:
              $ref: '#/components/examples/CollectionCheckoutResponse'
  schemas:
    SuccessEnvelope:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
        data:
          nullable: true
    Collection:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - active
            - awaiting_origin
            - awaiting_deposit
            - deposit_received
            - completed
            - refunded
            - failed
            - expired
            - cancelled
        linkMode:
          $ref: '#/components/schemas/CollectionLinkMode'
        pricingType:
          $ref: '#/components/schemas/CollectionPricingType'
        payerSource:
          type: string
          enum:
            - wallet
            - exchange
        label:
          type: string
          nullable: true
        reference:
          type: string
          nullable: true
        fromName:
          type: string
          nullable: true
        payeeName:
          type: string
          nullable: true
        payerFields:
          type: array
          items:
            $ref: '#/components/schemas/PayerFieldConfig'
          description: Configured fields to collect from payers.
        payerDetails:
          $ref: '#/components/schemas/PayerDetails'
          nullable: true
          description: Values collected from the payer at quote time.
        logoUrl:
          type: string
          format: uri
          nullable: true
        customerId:
          type: string
          format: uuid
        customerName:
          type: string
        sessionCount:
          type: integer
          description: Checkout links only — number of payer sessions.
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/CollectionSession'
          description: Checkout link detail only — recent payer sessions.
        receiveAmount:
          type: number
          nullable: true
        receiveAmountAtomic:
          type: string
          nullable: true
        sendAmount:
          type: number
          nullable: true
        amount:
          type: number
          nullable: true
        amountAtomic:
          type: string
          nullable: true
        origin:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/NetworkEndpoint'
        destination:
          $ref: '#/components/schemas/NetworkEndpoint'
        expectedAmountOut:
          type: string
          nullable: true
        receivedAmountOut:
          type: string
          nullable: true
        refundTo:
          type: string
          nullable: true
        depositAddress:
          type: string
          nullable: true
        relayRequestId:
          type: string
          nullable: true
        relayStatus:
          type: string
          nullable: true
        depositTxHash:
          type: string
          nullable: true
        inTxHashes:
          type: array
          items:
            type: string
        outTxHashes:
          type: array
          items:
            type: string
        failReason:
          type: string
          nullable: true
        successRedirectUrl:
          type: string
          format: uri
          nullable: true
        payUrl:
          type: string
          format: uri
        embedUrl:
          type: string
          format: uri
        embedConfig:
          $ref: '#/components/schemas/EmbedConfig'
        quoteValidUntil:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the current fixed-price quote expires. Re-quote after this
            time.
        quotedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    CollectionLinkMode:
      type: string
      enum:
        - invoice
        - checkout
      description: >
        invoice — single-use link; one id tracks one payment (default).

        checkout — reusable parent URL; each payer quote creates a session
        child; parent stays active.
    CollectionPricingType:
      type: string
      enum:
        - fixed
        - open
    PayerFieldConfig:
      type: object
      required:
        - key
        - required
      properties:
        key:
          $ref: '#/components/schemas/PayerFieldKey'
        required:
          type: boolean
          default: false
        label:
          type: string
          minLength: 1
          maxLength: 120
          description: >-
            Required for `metadata` fields — the prompt shown to the payer (e.g.
            Tax ID).
    PayerDetails:
      type: object
      properties:
        name:
          type: string
          maxLength: 120
        email:
          type: string
          maxLength: 254
        phone:
          type: string
          maxLength: 32
        kyc:
          $ref: '#/components/schemas/PayerKycDetails'
        metadata:
          type: object
          additionalProperties:
            type: string
            maxLength: 500
          description: Custom field values keyed by the label configured on the link.
    CollectionSession:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
        sendAmount:
          type: number
          nullable: true
        receiveAmount:
          type: number
          nullable: true
        receivedAmountOut:
          type: string
          nullable: true
        originSymbol:
          type: string
          nullable: true
        payerDetails:
          $ref: '#/components/schemas/PayerDetails'
          nullable: true
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
    NetworkEndpoint:
      type: object
      properties:
        key:
          type: string
        network:
          type: string
        symbol:
          type: string
        address:
          type: string
        acceptableTokens:
          type: array
          items:
            $ref: '#/components/schemas/TokenCode'
    EmbedConfig:
      type: object
      properties:
        layout:
          type: string
          enum:
            - default
            - minimal
            - compact
          default: default
        accentColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
        backgroundColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
        textColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
        mutedTextColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
        borderColor:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
        borderRadius:
          type: integer
          minimum: 0
          maximum: 32
        fontFamily:
          type: string
        hideBrandFooter:
          type: boolean
        hideStepIndicator:
          type: boolean
        hideMerchantBanner:
          type: boolean
        labels:
          $ref: '#/components/schemas/EmbedLabels'
    PayerFieldKey:
      type: string
      enum:
        - name
        - email
        - phone
        - kyc
        - metadata
    PayerKycDetails:
      type: object
      properties:
        documentType:
          type: string
          maxLength: 64
        documentNumber:
          type: string
          maxLength: 128
        country:
          type: string
          maxLength: 64
    TokenCode:
      type: object
      properties:
        symbol:
          type: string
        code:
          type: string
    EmbedLabels:
      type: object
      properties:
        continueButton:
          type: string
        sentButton:
          type: string
        checkAgainButton:
          type: string
        modalTitle:
          type: string
  examples:
    CollectionInvoiceResponse:
      value:
        status: success
        message: Payment link created
        data:
          id: a1b2c3d4-e5f6-7890-abcd-ef1234567891
          status: awaiting_origin
          linkMode: invoice
          pricingType: fixed
          payerSource: wallet
          label: 'Invoice #1042'
          reference: INV-1042
          fromName: null
          payeeName: Acme Ltd
          logoUrl: null
          customerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          customerName: Acme Ltd
          receiveAmount: 500
          receiveAmountAtomic: '500000000'
          sendAmount: null
          amount: 500
          amountAtomic: '500000000'
          origin: null
          destination:
            key: solana
            network: Solana
            symbol: USDC
            address: 2dudFU32c5wsRpfRZDXBAJFirHC4hindqpKSCwwtDaAB
          expectedAmountOut: null
          receivedAmountOut: null
          refundTo: null
          depositAddress: null
          relayRequestId: null
          relayStatus: null
          depositTxHash: null
          inTxHashes: []
          outTxHashes: []
          failReason: null
          successRedirectUrl: null
          payUrl: https://pay.remitflex.io/a1b2c3d4-e5f6-7890-abcd-ef1234567891
          embedUrl: https://pay.remitflex.io/embed/a1b2c3d4-e5f6-7890-abcd-ef1234567891
          embedConfig:
            layout: default
          quoteValidUntil: null
          quotedAt: null
          completedAt: null
          createdAt: '2026-06-26T09:00:00.000Z'
          updatedAt: '2026-06-26T09:00:00.000Z'
    CollectionCheckoutResponse:
      value:
        status: success
        message: Payment link fetched
        data:
          id: b2c3d4e5-f6a7-8901-bcde-f12345678902
          status: active
          linkMode: checkout
          pricingType: fixed
          payerSource: wallet
          label: Pro plan
          reference: null
          fromName: null
          payeeName: Acme Ltd
          logoUrl: >-
            https://api.remitflex.io/v1/pay/b2c3d4e5-f6a7-8901-bcde-f12345678902/logo
          customerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          customerName: Acme Ltd
          sessionCount: 2
          sessions:
            - id: c3d4e5f6-a7b8-9012-cdef-123456789003
              status: completed
              sendAmount: 49.12
              receiveAmount: 49
              receivedAmountOut: '49'
              originSymbol: USDT
              createdAt: '2026-06-26T10:00:00.000Z'
              completedAt: '2026-06-26T10:05:00.000Z'
            - id: d4e5f6a7-b8c9-0123-def0-234567890104
              status: awaiting_deposit
              sendAmount: 49.08
              receiveAmount: 49
              receivedAmountOut: null
              originSymbol: USDT
              createdAt: '2026-06-26T11:00:00.000Z'
              completedAt: null
          receiveAmount: 49
          receiveAmountAtomic: '49000000'
          sendAmount: null
          amount: 49
          amountAtomic: '49000000'
          origin: null
          destination:
            key: solana
            network: Solana
            symbol: USDC
            address: 2dudFU32c5wsRpfRZDXBAJFirHC4hindqpKSCwwtDaAB
          expectedAmountOut: null
          receivedAmountOut: null
          refundTo: null
          depositAddress: null
          relayRequestId: null
          relayStatus: null
          depositTxHash: null
          inTxHashes: []
          outTxHashes: []
          failReason: null
          successRedirectUrl: https://example.com/thanks
          payUrl: https://pay.remitflex.io/b2c3d4e5-f6a7-8901-bcde-f12345678902
          embedUrl: https://pay.remitflex.io/embed/b2c3d4e5-f6a7-8901-bcde-f12345678902
          embedConfig:
            layout: minimal
            accentColor: '#0F766E'
          quoteValidUntil: null
          quotedAt: null
          completedAt: null
          createdAt: '2026-06-26T08:00:00.000Z'
          updatedAt: '2026-06-26T11:00:00.000Z'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >
        API key created in the Remitflex Dashboard at dashboard.remitflex.io
        (`rmf_live_...` or `rmf_test_...`).

        Key management endpoints require a dashboard JWT and are not part of
        this reference.

````