curl --request GET \
--url https://api.example.com/organizations/{organizationId}/payment-methods/{paymentMethodId} \
--header 'Authorization: <authorization>'{
"paymentMethodId": "pm_abc123",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"type": "CARD",
"brand": "visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2027,
"isDefault": true,
"billingDetails": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+5511999999999",
"address": {
"line1": "Av Paulista 1000",
"line2": null,
"city": "Sao Paulo",
"state": "SP",
"postalCode": "01310-100",
"country": "BR"
}
}
}
Buscar um metodo de pagamento especifico por ID, incluindo detalhes do cartao e informacoes de billing.
curl --request GET \
--url https://api.example.com/organizations/{organizationId}/payment-methods/{paymentMethodId} \
--header 'Authorization: <authorization>'{
"paymentMethodId": "pm_abc123",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"type": "CARD",
"brand": "visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2027,
"isDefault": true,
"billingDetails": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+5511999999999",
"address": {
"line1": "Av Paulista 1000",
"line2": null,
"city": "Sao Paulo",
"state": "SP",
"postalCode": "01310-100",
"country": "BR"
}
}
}
payment_method:read.CARD or BOLETO).{
"paymentMethodId": "pm_abc123",
"organizationId": "019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2",
"type": "CARD",
"brand": "visa",
"last4": "4242",
"expMonth": 12,
"expYear": 2027,
"isDefault": true,
"billingDetails": {
"name": "John Doe",
"email": "john@example.com",
"phone": "+5511999999999",
"address": {
"line1": "Av Paulista 1000",
"line2": null,
"city": "Sao Paulo",
"state": "SP",
"postalCode": "01310-100",
"country": "BR"
}
}
}
curl https://api.awsales.io/admin/organizations/019525fd-4c38-7e30-a5c1-b6e3f4d8a9c2/payment-methods/pm_1Oy2pL2eZvKYlo2C0vIqMZ8y \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
| Status | Codigo | Descricao |
|---|---|---|
400 | validation_error | Entrada invalida ou campos obrigatorios ausentes |
401 | unauthorized | Autenticacao ausente ou invalida |
403 | forbidden | Permissoes insuficientes |
404 | organization.not_found | Organizacao nao encontrada |
404 | payment_method.not_found | Metodo de pagamento nao encontrado |
500 | internal_server_error | Ocorreu um erro inesperado |