Recurso da API
Clientes
Crie, consulte, liste e atualize perfis de clientes para associar a pagamentos, histórico de transações e emissão de faturas.
POST
/v1/customersRegista um novo cliente com identificação fiscal (NUIT) e contactos para faturação.
cURL
curl -X POST "https://api-pay.edutecka.com/v1/customers" \
-H "X-EDPay-Public-Key: <PUBLIC_KEY>" \
-H "X-EDPay-Private-Key: <PRIVATE_KEY>" \
-H "Accept: application/json" \
-H "Idempotency-Key: req_cust_849201" \
-H "Content-Type: application/json" \
-d '{
"name": "Amina Abdala",
"email": "[email protected]",
"phone": "+25884xxxxxxx",
"tax_id": "400123456",
"metadata": {
"account_id": "acc_7891"
}
}'GET
/v1/customersRetorna uma lista paginada de clientes registados na sua conta.
cURL
curl -X GET "https://api-pay.edutecka.com/v1/customers?limit=10" \
-H "X-EDPay-Public-Key: <PUBLIC_KEY>" \
-H "X-EDPay-Private-Key: <PRIVATE_KEY>" \
-H "Accept: application/json"GET
/v1/customers/{id}Recupera os detalhes completos de um cliente específico pelo ID.
cURL
curl -X GET "https://api-pay.edutecka.com/v1/customers/cus_3f8a1b2c4d5e" \
-H "X-EDPay-Public-Key: <PUBLIC_KEY>" \
-H "X-EDPay-Private-Key: <PRIVATE_KEY>" \
-H "Accept: application/json"PATCH
/v1/customers/{id}Atualiza campos parciais do cadastro do cliente (email, telefone, NUIT ou metadados).
cURL
curl -X PATCH "https://api-pay.edutecka.com/v1/customers/cus_3f8a1b2c4d5e" \
-H "X-EDPay-Public-Key: <PUBLIC_KEY>" \
-H "X-EDPay-Private-Key: <PRIVATE_KEY>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"phone": "+25884xxxxxxx",
"metadata": {
"tier": "vip"
}
}'