Open Withdrawal MED
Use this endpoint to open a MED for a withdrawal, identifying it by the endToEnd.
Unlike transaction MEDs, which arrive through the acquirer, this one is opened by you. To look up the withdrawal MEDs already opened, use List Withdrawal MEDs.
Available Environments
- Production
https://api.gateway.com.br/core
Endpoint
- Method:
POST - Endpoint:
/med/withdrawal - Authentication: Bearer token
Request Body
| Name | Type | Required | Description | Validations |
|---|---|---|---|---|
endToEnd | string | Yes | End-to-end identifier of the disputed withdrawal | Must be between 8 and 255 characters |
reasonStatus | string (enum) - SCAM, FRAUDULENT_ACCESS, OPERATIONAL_ERROR, OTHER | Yes | Reason the MED is being opened | Must be a valid enum |
message | string | No | Message describing the case | Must be between 2 and 255 characters |
Request Example
- cURL
- JavaScript
curl --request POST \
--url https://api.gateway.com.br/core/med/withdrawal \
--header 'Authorization: Bearer your-jwt-token' \
--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 your-jwt-token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
endToEnd: 'E12345678202603061249abcdef0123',
reasonStatus: 'OPERATIONAL_ERROR',
message: 'Saque enviado para a chave errada',
})
});
Success Response
The endpoint returns 201 Created with no body. Use List Withdrawal MEDs to follow the case you opened.
Possible Errors
| Code | Description | Solution |
|---|---|---|
| 401 | Invalid credentials | Check your credentials |
| 403 | No permission/authorization | Contact support |
| 422 | Invalid or missing data | Check the format of the data |
| 422 | Validations | Contact support |
| 500 | Internal error | Contact support |