Bem-vindo à documentação da API do MK Pay. Este guia irá ajudá-lo a entender os endpoints disponíveis e como integrá-los à sua aplicação.
URL Base: https://api.mkgestor.com.br
Autentique-se e gere um token Bearer para acessar a API.
Endpoint: POST /auth/logIn
{
"client_id": "your_client_id",
"client_secret": "your_client_secret"
}
{
"token": "your_generated_token",
"expires_in": 3600
}
Crie um depósito e gere um QR Code para pagamento.
Endpoint: POST /payments/deposit
{
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
{
"amount": 100.00,
"external_id": "unique_deposit_id",
"clientCallbackUrl": "https://example.com/callback",
"payer": {
"name": "John Doe",
"email": "johndoe@example.com",
"document": "12345678901"
}
}
{
"message": "Depósito criado com sucesso.",
"qrcode_response": {
"transaction_id": "12345",
"status": "PENDING",
"qrcode": "base64_encoded_qr_code"
},
"amount": 100.00
}
Inicie um saque e envie fundos via Pix.
Endpoint: POST /payments/withdraw
{
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
{
"amount": 50.00,
"external_id": "unique_withdrawal_id",
"pix_key": "user_pix_key",
"key_type": "CPF",
"name": "John Doe",
"tax_id": "12345678901",
"description": "withdraw_request",
"clientCallbackUrl": "https://example.com/callback"
}
{
"message": "Saque iniciado com sucesso.",
"transaction_id": "67890",
"status": "PENDING",
"amount": 50.00
}
Os webhooks permitem que você receba notificações sobre mudanças no status das transações em tempo real.
{
"transaction_id": "bcdb1177191628c6f8164508e6c71504f",
"status": "PENDING",
"amount": 1,
"type": "DEPOSIT"
}
{
"transaction_id": "2e79273435565c953312a5f0feyeae3q2h",
"status": "COMPLETED",
"amount": 2.00,
"type": "DEPOSIT"
}
{
"transaction_id": "bcdb1177191628c6f8164508e6c71504f",
"status": "PENDING",
"amount": 1,
"type": "WITHDRAW"
}
{
"transaction_id": "2e79273435565c953312a5f0feyeae3q2h",
"status": "COMPLETED",
"amount": 2.00,
"type": "WITHDRAW"
}