> ## Documentation Index
> Fetch the complete documentation index at: https://yuno-3979e326-docs-agent-readable-descriptions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Payment

> Create a payment in the sandbox environment to test your integration.



## OpenAPI

````yaml /openapi/yuno_sandbox_tested.json POST /v1/payments
openapi: 3.1.0
info:
  title: Yuno Payments API
  version: 1.0.0
  description: >
    The Yuno Payments API is built around REST principles, using standard HTTP
    methods and JSON payloads.


    ## Authentication

    All requests require two headers:

    ```

    public-api-key: YOUR_PUBLIC_KEY

    private-secret-key: YOUR_PRIVATE_KEY

    ```


    ## Idempotency

    Payment mutations (create, capture, cancel, refund, payout) require an
    `X-Idempotency-Key` header (UUID).

    The API stores the key and returns the same response for duplicate requests
    within 24 hours.


    ## Environments

    | Environment | Base URL |

    |-------------|----------|

    | Sandbox | `https://api-sandbox.y.uno/v1` |

    | Production | `https://api.y.uno/v1` |
  contact:
    name: Yuno Support
    url: https://docs.y.uno
  license:
    name: Proprietary
servers:
  - url: https://api-sandbox.y.uno
    description: Sandbox
  - url: https://api.y.uno
    description: Production
security:
  - PublicApiKey: []
    PrivateSecretKey: []
tags:
  - name: Customers
    description: Create and manage customer records.
  - name: Checkout Sessions
    description: Initialize the Yuno SDK on the front-end.
  - name: Payment Methods
    description: Enroll and manage vaulted payment methods.
  - name: Payments
    description: Create and manage payment transactions.
  - name: Payment Links
    description: Hosted payment pages requiring no SDK.
  - name: Subscriptions
    description: Recurring billing management.
  - name: Payouts
    description: Disburse funds to individuals or entities.
  - name: Reports
    description: Generate and download transaction reports.
  - name: Currency Conversion
    description: Dynamic currency conversion (DCC).
paths:
  /v1/payments:
    post:
      tags:
        - Payments
      summary: Create Payment
      description: >
        Creates a payment.


        - `capture: true` — single-step: authorize and charge immediately.

        - `capture: false` — two-step: authorize only, charge later via
        **Capture Authorization**.
      operationId: create-payment
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentRequest'
            examples:
              single_step:
                summary: Single-step (capture now)
                value:
                  account_id: YOUR_ACCOUNT_ID
                  description: 'Order #001'
                  country: US
                  merchant_order_id: order-001
                  amount:
                    currency: USD
                    value: 10000
                  customer_payer:
                    id: CUSTOMER_UUID
                    first_name: John
                    last_name: Doe
                    email: john.doe@example.com
                    country: US
                  checkout:
                    session: CHECKOUT_SESSION_UUID
                  payment_method:
                    type: CARD
                    vaulted_token: VAULTED_TOKEN_UUID
                    detail:
                      card:
                        capture: true
                        installments: 1
                  additional_data:
                    order:
                      items:
                        - id: prod-001
                          name: Product Name
                          quantity: 1
                          unit_amount: 100
                          category: electronics
              authorize_only:
                summary: Authorize only (capture later)
                value:
                  account_id: YOUR_ACCOUNT_ID
                  description: Pre-authorization
                  country: US
                  merchant_order_id: order-auth-001
                  amount:
                    currency: USD
                    value: 10000
                  customer_payer:
                    id: CUSTOMER_UUID
                  checkout:
                    session: CHECKOUT_SESSION_UUID
                  payment_method:
                    type: CARD
                    vaulted_token: VAULTED_TOKEN_UUID
                    detail:
                      card:
                        capture: false
                  additional_data:
                    order:
                      items:
                        - id: prod-001
                          name: Product Name
                          quantity: 1
                          unit_amount: 100
                          category: electronics
      responses:
        '201':
          description: Payment created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    IdempotencyKey:
      name: X-Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        format: uuid
      description: Unique UUID per request. Prevents duplicate processing on retries.
  schemas:
    CreatePaymentRequest:
      type: object
      required:
        - account_id
        - description
        - country
        - merchant_order_id
        - amount
        - payment_method
        - checkout
        - additional_data
      properties:
        account_id:
          type: string
          format: uuid
        description:
          type: string
          minLength: 3
          maxLength: 255
        country:
          $ref: '#/components/schemas/Country'
        merchant_order_id:
          type: string
          minLength: 3
          maxLength: 255
        amount:
          $ref: '#/components/schemas/Amount'
        customer_payer:
          $ref: '#/components/schemas/CustomerPayer'
        checkout:
          type: object
          required:
            - session
          properties:
            session:
              type: string
              format: uuid
        payment_method:
          $ref: '#/components/schemas/PaymentMethodInput'
        additional_data:
          $ref: '#/components/schemas/AdditionalData'
        metadata:
          $ref: '#/components/schemas/Metadata'
    Payment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        merchant_order_id:
          type: string
        description:
          type: string
        country:
          type: string
        amount:
          $ref: '#/components/schemas/Amount'
        payment_status:
          type: object
          properties:
            status:
              type: string
              enum:
                - CREATED
                - READY_TO_PAY
                - SUCCEEDED
                - DECLINED
                - CANCELED
                - REFUNDED
                - EXPIRED
                - PENDING
            transactions:
              type: array
              items:
                $ref: '#/components/schemas/Transaction'
        created_at:
          type: string
          format: date-time
    Country:
      type: string
      enum:
        - AR
        - BO
        - BR
        - CL
        - CO
        - CR
        - EC
        - SV
        - GT
        - HN
        - MX
        - NI
        - PA
        - PY
        - PE
        - US
        - UY
      description: ISO 3166-1 alpha-2 country code
    Amount:
      type: object
      required:
        - currency
        - value
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        value:
          type: number
          multipleOf: 0.0001
          description: Amount in cents (e.g. 10000 = $100.00)
    CustomerPayer:
      type: object
      properties:
        id:
          type: string
          format: uuid
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
          format: email
        country:
          $ref: '#/components/schemas/Country'
        document:
          $ref: '#/components/schemas/Document'
    PaymentMethodInput:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          example: CARD
        vaulted_token:
          type: string
          format: uuid
        detail:
          type: object
          properties:
            card:
              type: object
              properties:
                capture:
                  type: boolean
                  description: true = charge now, false = authorize only
                installments:
                  type: integer
                  minimum: 1
                  maximum: 50
                verify:
                  type: boolean
            wallet:
              type: object
              properties:
                merchant_id:
                  type: string
                payment_token:
                  type: string
                capture:
                  type: boolean
                verify:
                  type: boolean
                card_data:
                  type: object
    AdditionalData:
      type: object
      properties:
        order:
          type: object
          properties:
            items:
              type: array
              items:
                type: object
                required:
                  - id
                  - name
                  - quantity
                  - unit_amount
                  - category
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  quantity:
                    type: integer
                  unit_amount:
                    type: number
                  category:
                    type: string
                    enum:
                      - electronics
                      - clothing
                      - food
                      - services
                      - art
                      - baby
                      - beauty_&_personal_care
                      - books
                      - coupons
                      - entertainment
                      - health
                      - home
                      - sports
                      - toys
                      - travel
                  brand:
                    type: string
                  sku_code:
                    type: string
    Metadata:
      type: array
      maxItems: 120
      items:
        type: object
        properties:
          key:
            type: string
            maxLength: 48
          value:
            type: string
            maxLength: 512
    Transaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
        type:
          type: string
          enum:
            - PURCHASE
            - CAPTURE
            - CANCEL
            - REFUND
            - VERIFY
        amount:
          $ref: '#/components/schemas/Amount'
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
    Currency:
      type: string
      minLength: 3
      maxLength: 3
      description: ISO 4217 currency code (e.g. USD, BRL, MXN)
    Document:
      type: object
      properties:
        document_type:
          type: string
          enum:
            - DNI
            - CI
            - LC
            - LE
            - CUIT
            - CUIL
            - PAS
            - CPF
            - RG
            - CNH
            - CNPJ
            - RUT
            - RUN
            - CC
            - CE
            - NIT
            - DUI
            - PIC
            - DPI
            - IFR
            - INE
            - CP
            - RFC
            - CURP
            - CIP
            - CIC
            - CUI
            - RUC
        document_number:
          type: string
          minLength: 3
          maxLength: 40
  responses:
    BadRequest:
      description: Invalid request — schema violation or missing required field
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid or missing API credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````