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

# Simular pagamento

> 
          Simula o pagamento de uma transação em modo sandbox.
          Funciona apenas com transações criadas usando chaves de API de teste (sk_test_*).
          A transação deve estar no status 'waiting_payment'.
        



## OpenAPI

````yaml POST /api/v1/sandbox/transactions/{transactionId}/pay
openapi: 3.0.3
info:
  title: Bob Payments API
  description: >-
    API de pagamentos Bob Payments para criar, acompanhar e conciliar transações
    com PIX e cartão de crédito.
  version: 1.0.0
servers:
  - url: https://api.payments.bob.company
    description: Servidor de produção
security: []
paths:
  /api/v1/sandbox/transactions/{transactionId}/pay:
    post:
      summary: Simular pagamento de transação sandbox
      description: |2-

                  Simula o pagamento de uma transação em modo sandbox.
                  Funciona apenas com transações criadas usando chaves de API de teste (sk_test_*).
                  A transação deve estar no status 'waiting_payment'.
                
      parameters:
        - schema:
            type: string
            format: cuid
            pattern: ^[cC][^\s-]{8,}$
          in: path
          name: transactionId
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    default: true
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      transactionId:
                        type: string
                      status:
                        type: string
                      paidAt:
                        type: string
                    required:
                      - transactionId
                      - status
                      - paidAt
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 400
                    maximum: 599
                  detail:
                    type: string
                  instance:
                    type: string
                  details:
                    type: object
                    additionalProperties: {}
                required:
                  - type
                  - title
                  - status
                  - detail
                  - instance
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 400
                    maximum: 599
                  detail:
                    type: string
                  instance:
                    type: string
                  details:
                    type: object
                    additionalProperties: {}
                required:
                  - type
                  - title
                  - status
                  - detail
                  - instance
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 400
                    maximum: 599
                  detail:
                    type: string
                  instance:
                    type: string
                  details:
                    type: object
                    additionalProperties: {}
                required:
                  - type
                  - title
                  - status
                  - detail
                  - instance
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 400
                    maximum: 599
                  detail:
                    type: string
                  instance:
                    type: string
                  details:
                    type: object
                    additionalProperties: {}
                required:
                  - type
                  - title
                  - status
                  - detail
                  - instance
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  title:
                    type: string
                  status:
                    type: integer
                    minimum: 400
                    maximum: 599
                  detail:
                    type: string
                  instance:
                    type: string
                  details:
                    type: object
                    additionalProperties: {}
                required:
                  - type
                  - title
                  - status
                  - detail
                  - instance
                additionalProperties: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Autenticação por API Key usando token SK (sk_live_xxx ou sk_test_xxx).
        Envie como: Authorization: Bearer sk_live_xxx

````