After sending a request to cancel a payment, I’m receiving a response that the status is not allowed.
I’m using the python library and the request is as follows:
request_body = {'status': 'cancelled'}
app_token.post(transfer_url, request_body)
The response I receive is:
dwollav2.error.ValidationError: {
"code":"ValidationError",
"message":"Validation error(s) present. See embedded errors list for more details.",
"_embedded":
{"errors":[{"code":"NotAllowed","message":"Status not allowed.","path":"/status","_links":{}}]}
}
Immediately following this response, I receive a successful webhook:
{
"id": "8b4dca60-1688-4781-960d-982fa00c9952",
"resourceId": "b2d80f41-75e7-eb11-8136-b0300d0c7e2a",
"topic": "customer_transfer_cancelled",
"timestamp": "2021-07-19T13:20:22.327Z",
"_links": {
"self": {
"href": "https://api-sandbox.dwolla.com/events/8b4dca60-1688-4781-960d-982fa00c9952"
},
"account": {
"href": "https://api-sandbox.dwolla.com/accounts/84cfb86b-54db-44e9-ba91-07968962450c"
},
"resource": {
"href": "https://api-sandbox.dwolla.com/transfers/b2d80f41-75e7-eb11-8136-b0300d0c7e2a"
},
"customer": {
"href": "https://api-sandbox.dwolla.com/customers/aeefa7e4-4025-4fa9-ac38-50e8d560b2bd"
}
},
"created": "2021-07-19T13:20:22.327Z"
}