{
    "info": {
        "name": "ApexPy API v1",
        "description": "Endpoints públicos em produção. Webhooks se configuram no painel. Spec: https://docs.apexpy.com.br/openapi.yaml",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "item": [
        {
            "name": "Charges",
            "item": [
                {
                    "name": "Listar cobranças",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/charges"
                    }
                },
                {
                    "name": "Criar cobrança PIX",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/charges",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 10000,\n    \"currency\": \"BRL\",\n    \"payment_method\": \"pix\",\n    \"customer\": {\n        \"name\": \"João Silva\",\n        \"email\": \"joao@example.com\",\n        \"document\": \"12345678909\"\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Criar cobrança cartão",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/charges",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 10000,\n    \"currency\": \"BRL\",\n    \"payment_method\": \"card\",\n    \"card\": {\n        \"token\": \"tok_xxxxxxxxxxxxx\",\n        \"installments\": 1,\n        \"capture\": true\n    },\n    \"customer\": {\n        \"name\": \"João Silva\",\n        \"email\": \"joao@example.com\",\n        \"document\": \"12345678909\",\n        \"address\": {\n            \"street\": \"Rua das Flores\",\n            \"number\": \"123\",\n            \"city\": \"São Paulo\",\n            \"state\": \"SP\",\n            \"zipcode\": \"01234567\",\n            \"country\": \"BR\"\n        }\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Criar cobrança boleto",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/charges",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 10000,\n    \"currency\": \"BRL\",\n    \"payment_method\": \"boleto\",\n    \"customer\": {\n        \"name\": \"João Silva\",\n        \"email\": \"joao@example.com\",\n        \"document\": \"12345678909\",\n        \"address\": {\n            \"street\": \"Rua das Flores\",\n            \"number\": \"123\",\n            \"city\": \"São Paulo\",\n            \"state\": \"SP\",\n            \"zipcode\": \"01234567\"\n        }\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Consultar cobrança",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/charges/{{chargeId}}"
                    }
                },
                {
                    "name": "Reembolsar cobrança",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/charges/{{chargeId}}/refund"
                    }
                },
                {
                    "name": "Cancelar cobrança",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/charges/{{chargeId}}/cancel"
                    }
                }
            ]
        },
        {
            "name": "Payouts",
            "item": [
                {
                    "name": "Listar saques",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/payouts"
                    }
                },
                {
                    "name": "Criar saque",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/payouts",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 100.5,\n    \"payout_method_id\": 1,\n    \"description\": \"Saque operacional\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "Consultar saque",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/payouts/{{payoutId}}"
                    }
                }
            ]
        },
        {
            "name": "Account",
            "item": [
                {
                    "name": "Conta",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/account"
                    }
                },
                {
                    "name": "Saldo",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/balance"
                    }
                },
                {
                    "name": "Buscar seller (split)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{secretKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/sellers/search?email=parceiro@example.com"
                    }
                }
            ]
        },
        {
            "name": "Tokens",
            "item": [
                {
                    "name": "Tokenizar cartão",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "auth": {
                            "type": "bearer",
                            "bearer": [
                                {
                                    "key": "token",
                                    "value": "{{publicKey}}",
                                    "type": "string"
                                }
                            ]
                        },
                        "url": "{{baseUrl}}/api/v1/tokens/card"
                    }
                }
            ]
        }
    ],
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://api.apexpy.com.br"
        },
        {
            "key": "secretKey",
            "value": "sk_test_xxx"
        },
        {
            "key": "publicKey",
            "value": "pk_test_xxx"
        },
        {
            "key": "chargeId",
            "value": "ci_xxx"
        },
        {
            "key": "payoutId",
            "value": "co_xxx"
        }
    ]
}