Receives reversals (synchronously)
Webhook for receiving reversals. The reversal notification is sent when a transfer is reversed by the Switch (CCA). ⚠️ This is a special case becase you need to respond syncronously to the reversal.
Body
application/json
Reversal notifications to transfers participants, sent by Shinkansen (Originated by Switch or IFO)
- Type: objectdocumentrequiredProperties: 2
Envelops the message content
Responses
- application/json
- 400
Invalid message (e.g: invalid payload) - Maybe you want to respond with detailed error message for tracking purposes
- 401
Invalid signature JWS (e.g: invalid certificate or expired)
- 409
Duplicate message or reversal ID (e.g: Send same message twice)
Request Example for post/reversals
curl https://example.customer.url/reversals \
--request POST \
--header 'Content-Type: application/json' \
--header 'Shinkansen-JWS-Signature: YOUR_SECRET_TOKEN' \
--data '{
"document": {
"header": {
"shinkansen_message_id": "0421c147-1d4a-484c-b855-9dcd8b9b67d9",
"creation_date": "2022-04-08T18:25:45-04:00",
"sender": "SHINKANSEN",
"receiver": "TENPO"
},
"reversals": [
{
"reversal_code": "reversal_switch_timeout",
"reversal_message": "Network timeout during transaction processing",
"shinkansen_reversal_id": "8d267f06-84c8-448b-bebb-1eaf4c60b986",
"transaction_id": "3c11df48-dfab-41eb-a3c1-b9f90a0da063",
"shinkansen_transaction_id": "455765a6-0b51-4e48-8827-06192824a1ab"
}
]
}
}'
{
"message_id": "903feb07-8a90-4e2a-ab4c-cec902903263",
"reversals": [
{
"reversal_id": "c5bae6b3-7c11-4b09-aad8-340ecc1a042c",
"shinkansen_reversal_id": "a517a741-e84f-4ac1-8d9d-922162fc703b",
"response_status": "approved"
},
{
"reversal_id": "6f913677-8d84-4dae-a30d-3639608ec3f3",
"shinkansen_reversal_id": "4266ca42-b990-4f59-9b08-623660a72ee2",
"response_status": "error_reversal_insufficient_balance"
}
]
}