openapi: 3.0.1 info: title: AbacatePay Billing Customer API description: REST API for AbacatePay, a Brazilian payment gateway focused on instant Pix payments. Create billings and charges, generate and check Pix QR Codes, manage customers and coupons, and request withdrawals. All responses follow the {data, error} envelope and authenticate with a Bearer API key. termsOfService: https://www.abacatepay.com/termos contact: name: AbacatePay Support url: https://docs.abacatepay.com version: v1 servers: - url: https://api.abacatepay.com/v1 description: AbacatePay API v1 production server security: - bearerAuth: [] tags: - name: Customer description: Create and list customers (clients). paths: /customer/create: post: operationId: createCustomer tags: - Customer summary: Create a new customer description: Creates a customer (client) to associate with billings and charges. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateCustomerRequest' responses: '200': description: Customer created content: application/json: schema: $ref: '#/components/schemas/CustomerResponse' '401': $ref: '#/components/responses/Unauthorized' /customer/list: get: operationId: listCustomers tags: - Customer summary: List customers description: Returns the list of customers for the authenticated store. responses: '200': description: A list of customers content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Customer' error: nullable: true '401': $ref: '#/components/responses/Unauthorized' components: schemas: Error: type: object properties: data: nullable: true error: type: string description: Human-readable error message. CustomerData: type: object properties: name: type: string cellphone: type: string email: type: string format: email taxId: type: string description: Brazilian tax identifier (CPF or CNPJ). CreateCustomerRequest: type: object required: - name - cellphone - email - taxId properties: name: type: string cellphone: type: string email: type: string format: email taxId: type: string description: Brazilian tax identifier (CPF or CNPJ). CustomerResponse: type: object properties: data: $ref: '#/components/schemas/Customer' error: nullable: true Customer: type: object properties: id: type: string metadata: $ref: '#/components/schemas/CustomerData' responses: Unauthorized: description: Missing or invalid API key content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: 'Authenticate with your AbacatePay API key as a Bearer token: `Authorization: Bearer `.'