dLocal Accounts API

Platform sub-account management

OpenAPI Specification

dlocal-accounts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: dLocal Payins Accounts API
  description: 'Accept payments from customers in emerging markets using 1,000+ local payment methods including cards, bank transfers, cash, mobile money, eWallets, and Pix. Supports 3D Secure, installments, recurring payments, merchant-initiated transactions, and authorization/capture flows.

    '
  version: '2.1'
  contact:
    name: dLocal Developer Support
    url: https://docs.dlocal.com/
  termsOfService: https://www.dlocal.com/terms-of-service/
servers:
- url: https://api.dlocal.com
  description: Production
- url: https://sandbox.dlocal.com
  description: Sandbox
security:
- HmacAuth: []
tags:
- name: Accounts
  description: Platform sub-account management
paths:
  /accounts:
    post:
      summary: Create a Platform Account
      description: Onboard a new sub-account (marketplace seller or platform participant).
      operationId: createAccount
      tags:
      - Accounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountRequest'
            example:
              merchant_id: M-001
              name: Seller Store A
              email: seller@example.com
              document: '12345678000195'
              document_type: CNPJ
              country: BR
      responses:
        '200':
          description: Account created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts/{account_id}:
    get:
      summary: Get Account Status
      description: Retrieve status and details of a platform sub-account.
      operationId: getAccount
      tags:
      - Accounts
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Account retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
  /accounts/{account_id}/balances:
    get:
      summary: Get Account Balance
      description: Retrieve the balance for a specific platform sub-account.
      operationId: getAccountBalance
      tags:
      - Accounts
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Balance retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  balances:
                    type: array
                    items:
                      $ref: '#/components/schemas/Balance'
components:
  schemas:
    Balance:
      type: object
      properties:
        currency:
          type: string
        amount:
          type: number
          format: float
        available_amount:
          type: number
          format: float
        pending_amount:
          type: number
          format: float
    Address:
      type: object
      properties:
        street:
          type: string
        number:
          type: string
        city:
          type: string
        state:
          type: string
        zip_code:
          type: string
        country:
          type: string
    Account:
      type: object
      properties:
        id:
          type: string
          description: dLocal account identifier
        merchant_id:
          type: string
        name:
          type: string
        email:
          type: string
        document:
          type: string
        country:
          type: string
        status:
          type: string
          enum:
          - PENDING
          - ACTIVE
          - SUSPENDED
          - CLOSED
        kyc_status:
          type: string
          enum:
          - NOT_SUBMITTED
          - PENDING
          - APPROVED
          - REJECTED
        created_date:
          type: string
          format: date-time
    CreateAccountRequest:
      type: object
      required:
      - name
      - email
      - document
      - country
      properties:
        merchant_id:
          type: string
          description: Merchant-assigned identifier for the sub-account
        name:
          type: string
          description: Business or individual name
        email:
          type: string
          format: email
        document:
          type: string
          description: Tax or national ID number
        document_type:
          type: string
          description: Document type (e.g. CPF, CNPJ, DNI)
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code
        address:
          $ref: '#/components/schemas/Address'
        phone:
          type: string
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        param:
          type: string
  securitySchemes:
    HmacAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'HMAC-SHA256 signature. Format: "V2-HMAC-SHA256, Signature: {hmac_value}" Signature = HMAC-SHA256(X-Login + X-Date + RequestBody, SecretKey)

        '