Pagar.me Anticipations API

Receivable anticipations for recipients.

Documentation

Specifications

Other Resources

OpenAPI Specification

pagarme-anticipations-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Pagar.me Core Anticipations API
  description: The Pagar.me Core API (v5) is a REST API for online payments in Brazil. It processes orders and charges via credit card, PIX, and boleto; manages customers, addresses, cards, and tokens; supports recurring billing through plans, subscriptions, and invoices; and provides marketplace capabilities via recipients, split, transfers, and anticipations, with webhook event notifications. Authentication uses HTTP Basic auth with the account secret key as the username and an empty password.
  termsOfService: https://pagar.me/termos-de-uso/
  contact:
    name: Pagar.me Support
    url: https://docs.pagar.me
  version: '5'
servers:
- url: https://api.pagar.me/core/v5
  description: Pagar.me Core API v5 production
security:
- basicAuth: []
tags:
- name: Anticipations
  description: Receivable anticipations for recipients.
paths:
  /recipients/{recipient_id}/anticipations:
    post:
      operationId: createAnticipation
      tags:
      - Anticipations
      summary: Create anticipation
      description: Requests an advance (anticipation) of a recipient's future receivables.
      parameters:
      - $ref: '#/components/parameters/RecipientId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              - timeframe
              - payment_date
              properties:
                amount:
                  type: integer
                timeframe:
                  type: string
                  enum:
                  - start
                  - end
                payment_date:
                  type: string
                  format: date-time
      responses:
        '200':
          description: The created anticipation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Anticipation'
    get:
      operationId: listAnticipations
      tags:
      - Anticipations
      summary: List anticipations
      parameters:
      - $ref: '#/components/parameters/RecipientId'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Size'
      responses:
        '200':
          description: A list of anticipations
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Anticipation'
components:
  parameters:
    Size:
      name: size
      in: query
      schema:
        type: integer
        default: 10
    RecipientId:
      name: recipient_id
      in: path
      required: true
      schema:
        type: string
    Page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
  schemas:
    Anticipation:
      type: object
      properties:
        id:
          type: string
        amount:
          type: integer
        net_amount:
          type: integer
        fee:
          type: integer
        status:
          type: string
        timeframe:
          type: string
          enum:
          - start
          - end
        payment_date:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic auth with the account secret key as the username and an empty password.