Abrir MED de Retiro
Utilice este endpoint para abrir un MED referente a un retiro, identificándolo por el endToEnd.
A diferencia de los MED de transacción, que llegan por el adquirente, este lo abre usted. Para consultar los MED de retiro ya abiertos, use Listar MED de Retiro.
Entornos Disponibles
- Producción
https://api.gateway.com.br/core
Endpoint
- Método:
POST - Endpoint:
/med/withdrawal - Autenticación: Bearer token
Request Body
| Nombre | Tipo | Obligatorio | Descripción | Validaciones |
|---|---|---|---|---|
endToEnd | string | Sí | Identificador end-to-end del retiro en disputa | Debe tener entre 8 y 255 caracteres |
reasonStatus | string (enum) - SCAM, FRAUDULENT_ACCESS, OPERATIONAL_ERROR, OTHER | Sí | Motivo de la apertura del MED | Debe ser un enum válido |
message | string | No | Mensaje que describe el caso | Debe tener entre 2 y 255 caracteres |
Ejemplo de Solicitud
- cURL
- JavaScript
curl --request POST \
--url https://api.gateway.com.br/core/med/withdrawal \
--header 'Authorization: Bearer su-token-jwt' \
--header 'Content-Type: application/json' \
--data '{
"endToEnd": "E12345678202603061249abcdef0123",
"reasonStatus": "OPERATIONAL_ERROR",
"message": "Saque enviado para a chave errada"
}'
const response = await fetch('https://api.gateway.com.br/core/med/withdrawal', {
method: 'POST',
headers: {
'Authorization': 'Bearer su-token-jwt',
'Content-Type': 'application/json'
},
body: JSON.stringify({
endToEnd: 'E12345678202603061249abcdef0123',
reasonStatus: 'OPERATIONAL_ERROR',
message: 'Saque enviado para a chave errada',
})
});
Respuesta Exitosa
El endpoint responde 201 Created sin cuerpo. Use Listar MED de Retiro para dar seguimiento al caso abierto.
Errores Posibles
| Código | Descripción | Solución |
|---|---|---|
| 401 | Credenciales inválidas | Verifique sus credenciales |
| 403 | Sin permiso/autorización | Contacte al soporte |
| 422 | Datos inválidos o faltantes | Verifique el formato de los datos |
| 422 | Validaciones | Contacte al soporte |
| 500 | Error interno | Contacte al soporte |