Pagar.me Cards API

Reusable card wallet and tokens for a customer.

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pagarme-cards-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

pagarme-cards-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Pagar.me Core Anticipations Cards 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: Cards
  description: Reusable card wallet and tokens for a customer.
paths:
  /customers/{customer_id}/cards:
    post:
      operationId: createCard
      tags:
      - Cards
      summary: Create card
      description: Adds a card to the customer wallet. Send card_token or card_id; never raw card data in production flows that require tokenization.
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCardRequest'
      responses:
        '200':
          description: The created card
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Card'
    get:
      operationId: listCards
      tags:
      - Cards
      summary: List customer cards
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      responses:
        '200':
          description: A list of cards
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardList'
  /customers/{customer_id}/cards/{card_id}:
    get:
      operationId: getCard
      tags:
      - Cards
      summary: Get card
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      - $ref: '#/components/parameters/CardId'
      responses:
        '200':
          description: The card
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Card'
    delete:
      operationId: deleteCard
      tags:
      - Cards
      summary: Delete card
      parameters:
      - $ref: '#/components/parameters/CustomerId'
      - $ref: '#/components/parameters/CardId'
      responses:
        '200':
          description: The deleted card
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Card'
  /tokens:
    post:
      operationId: createToken
      tags:
      - Cards
      summary: Create card token
      description: Generates a single-use token from card data using the account public key (appId query parameter).
      parameters:
      - name: appId
        in: query
        required: true
        description: Account public key.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenRequest'
      responses:
        '200':
          description: The created token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
components:
  schemas:
    Address:
      type: object
      properties:
        line_1:
          type: string
        line_2:
          type: string
        zip_code:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code.
    Paging:
      type: object
      properties:
        total:
          type: integer
        page:
          type: integer
        size:
          type: integer
    CardList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Card'
        paging:
          $ref: '#/components/schemas/Paging'
    Token:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        card:
          $ref: '#/components/schemas/Card'
        expires_at:
          type: string
          format: date-time
    CreateCardRequest:
      type: object
      properties:
        number:
          type: string
        holder_name:
          type: string
        exp_month:
          type: integer
        exp_year:
          type: integer
        cvv:
          type: string
        token:
          type: string
        billing_address:
          $ref: '#/components/schemas/Address'
    CreateTokenRequest:
      type: object
      properties:
        type:
          type: string
          enum:
          - card
        card:
          $ref: '#/components/schemas/CardInput'
    Card:
      type: object
      properties:
        id:
          type: string
        first_six_digits:
          type: string
        last_four_digits:
          type: string
        brand:
          type: string
        holder_name:
          type: string
        exp_month:
          type: integer
        exp_year:
          type: integer
        status:
          type: string
        type:
          type: string
        created_at:
          type: string
          format: date-time
    CardInput:
      type: object
      properties:
        number:
          type: string
        holder_name:
          type: string
        exp_month:
          type: integer
        exp_year:
          type: integer
        cvv:
          type: string
        billing_address:
          $ref: '#/components/schemas/Address'
  parameters:
    CardId:
      name: card_id
      in: path
      required: true
      schema:
        type: string
    CustomerId:
      name: customer_id
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic auth with the account secret key as the username and an empty password.