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

# Read a QR before quoting

> **Scope:** `payouts:write`

Send the QR your end user scanned and get who it pays and how much, to show before you quote. `amount_mode` `closed`: the QR fixes the amount — quote exactly `target.amount`. `open`: `target` is `null` — ask the end user for the amount and quote that. Then pay with `POST /payouts` and the same `content`. Nothing is paid, and it is optional: you can quote and pay without it.

The answer's `id` (`qrr_…`) names this read. Send it as `resolution_id` on `POST /fx/quotes`: the quote and the payout made at it carry it, so you — and we — can follow one payment from the QR to its outcome. Quote it when you ask us about a QR that never became a payment.

`merchant` is everything the QR network answers about who is paid: `name`, the bank (`bank_code`, `bank_name`), `account_number` and the holder's `identification_number` (CI or NIT). Show your end user what they need to recognise the merchant. `reference_number` is the network's reference for this read — every scan gets a new one. `expires_at` is when the QR stops being payable: the network gives a date, so it is the end of that day in La Paz, in UTC. A field the network leaves blank is `null`.



## OpenAPI

````yaml api-reference/openapi.json POST /payouts/qr/resolve
openapi: 3.0.3
info:
  title: Rampa Pay API
  version: 1.0.0
  description: >-
    Hold a USDT balance at Rampa and pay Bolivian merchant QRs in bolivianos.
    Amounts are decimal strings.
servers:
  - url: https://examples.staging.rampapay.com/v1
    description: 'Example server: sample answers, nothing real moves'
security:
  - apiKey: []
tags:
  - name: Accounts
    description: Every balance you hold with Rampa, in one place.
  - name: Wallet
    description: Your USDT balance at Rampa, and how money gets into it.
  - name: Payouts
    description: >-
      Quote a BOB amount in USDT; once your end user accepts, pay it out at that
      quote from your USDT wallet — to a merchant QR today, to a bank account
      soon.
  - name: Webhooks
    description: Where we send events. Each endpoint gets its own signing secret.
paths:
  /payouts/qr/resolve:
    post:
      tags:
        - Payouts
      summary: Read a QR before quoting
      description: >-
        **Scope:** `payouts:write`


        Send the QR your end user scanned and get who it pays and how much, to
        show before you quote. `amount_mode` `closed`: the QR fixes the amount —
        quote exactly `target.amount`. `open`: `target` is `null` — ask the end
        user for the amount and quote that. Then pay with `POST /payouts` and
        the same `content`. Nothing is paid, and it is optional: you can quote
        and pay without it.


        The answer's `id` (`qrr_…`) names this read. Send it as `resolution_id`
        on `POST /fx/quotes`: the quote and the payout made at it carry it, so
        you — and we — can follow one payment from the QR to its outcome. Quote
        it when you ask us about a QR that never became a payment.


        `merchant` is everything the QR network answers about who is paid:
        `name`, the bank (`bank_code`, `bank_name`), `account_number` and the
        holder's `identification_number` (CI or NIT). Show your end user what
        they need to recognise the merchant. `reference_number` is the network's
        reference for this read — every scan gets a new one. `expires_at` is
        when the QR stops being payable: the network gives a date, so it is the
        end of that day in La Paz, in UTC. A field the network leaves blank is
        `null`.
      operationId: resolve-qr
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - content
              properties:
                content:
                  type: string
                  description: >-
                    `string, ≤ 500`. Required. The raw content of the QR the end
                    user scanned — what POST /payouts takes as qr.content.
            example:
              content: 000201010212…
      responses:
        '200':
          description: Closed amount · Open amount
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  amount_mode:
                    type: string
                  target:
                    type: object
                    properties:
                      currency:
                        type: string
                      amount:
                        type: string
                    nullable: true
                  merchant:
                    type: object
                    properties:
                      name:
                        type: string
                      bank_code:
                        type: string
                      bank_name:
                        type: string
                      account_number:
                        type: string
                      identification_number:
                        type: string
                  description:
                    type: string
                    nullable: true
                  reference_number:
                    type: string
                  expires_at:
                    type: string
              examples:
                closed-amount:
                  summary: Closed amount
                  value:
                    id: qrr_8KqT2mWx5ZbN7cJ4hRvP1sLd
                    amount_mode: closed
                    target:
                      currency: BOB
                      amount: '1000.00'
                    merchant:
                      name: Café del Prado
                      bank_code: '1014'
                      bank_name: Banco Unión
                      account_number: '1000045821'
                      identification_number: '4567890'
                    description: Pago QR
                    reference_number: '547261019000003901'
                    expires_at: '2027-01-01T03:59:59.999Z'
                open-amount:
                  summary: Open amount
                  value:
                    id: qrr_3HfV9pLs2YdK6wQn8TzB4cRm
                    amount_mode: open
                    target: null
                    merchant:
                      name: Mercado Lanza
                      bank_code: '1001'
                      bank_name: Banco Nacional de Bolivia
                      account_number: '3000012345'
                      identification_number: '1020304015'
                    description: null
                    reference_number: '547261019000003902'
                    expires_at: '2026-10-20T03:59:59.999Z'
        '400':
          description: content is missing or longer than 500 characters.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          description: >-
            `QR_REFUSED` — The QR cannot be paid: it is not a payment QR, or it
            has expired. Ask for a new one.
components:
  responses:
    Unauthorized:
      description: >-
        `AUTHENTICATION_FAILED` — the key is missing, unknown, revoked or
        expired, or the tenant is suspended.
    Forbidden:
      description: '`SCOPE_REQUIRED` — your key lacks this endpoint''s scope. Ask Rampa.'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        On the example server, any key that starts with `rpk_mock_`, e.g.
        `rpk_mock_yourname`. Never your real key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.