Callback - Refund Decision or Cancellation
GTR uses callbackType: 22 in three distinct scenarios. Inspect callbackData.refundDecision.decision and the callback recipient to determine which scenario applies.
Required implementation roles: OriginatorVASP and BeneficiaryVASP
Scenario 1: OriginatorVASP accepts
- Your role: BeneficiaryVASP
- Decision maker: OriginatorVASP
- Your responsibility: Arrange the on-chain refund using the agreed refund destination, then notify the refund TXID.
{
"requestId": "beneficiary-exchange-550e8400-e29b-41d4-a716-446655440000",
"invokeVaspCode": "beneficiary-vasp-code",
"originatorVasp": "originator-vasp-code",
"beneficiaryVasp": "beneficiary-vasp-code",
"callbackType": 22,
"callbackData": {
"refundBasicInfo": {"requestId": "beneficiary-exchange-550e8400-e29b-41d4-a716-446655440000"},
"refundDecision": {"decision": "ACCEPT"}
}
}
After receiving ACCEPT, execute the refund transfer and call Notify the Refund Transaction ID with the resulting transaction ID.
Scenario 2: OriginatorVASP rejects
- Your role: BeneficiaryVASP
- Decision maker: OriginatorVASP
- Your responsibility: Record the rejection reason and close the refund workflow without executing a refund transaction.
{
"requestId": "beneficiary-exchange-550e8400-e29b-41d4-a716-446655440000",
"invokeVaspCode": "beneficiary-vasp-code",
"originatorVasp": "originator-vasp-code",
"beneficiaryVasp": "beneficiary-vasp-code",
"callbackType": 22,
"callbackData": {
"refundBasicInfo": {"requestId": "beneficiary-exchange-550e8400-e29b-41d4-a716-446655440000"},
"refundDecision": {"decision": "REJECT", "refundRejectReason": {
"rejectReasonType": "OTHER",
"rejectReason": "The asset and network are not supported for refunds"
}}
}
}
Scenario 3: BeneficiaryVASP cancels
- Your role: OriginatorVASP
- Cancellation initiator: BeneficiaryVASP
- Your responsibility: Stop processing the refund and record the cancellation reason.
{
"requestId": "beneficiary-exchange-550e8400-e29b-41d4-a716-446655440000",
"invokeVaspCode": "originator-vasp-code",
"originatorVasp": "originator-vasp-code",
"beneficiaryVasp": "beneficiary-vasp-code",
"callbackType": 22,
"callbackData": {
"refundBasicInfo": {"requestId": "beneficiary-exchange-550e8400-e29b-41d4-a716-446655440000"},
"refundDecision": {"decision": "CANCEL", "refundCancelReason": {
"cancelReasonType": "SYSTEM_ERROR",
"cancelReason": "The refund transfer could not be created"
}}
}
}
| Field | Description |
|---|---|
refundDecision.decision | ACCEPT, REJECT, or CANCEL. |
refundRejectReason | Present for a rejected request; contains rejectReasonType and rejectReason. |
refundCancelReason | Present for a cancellation; contains cancelReasonType and cancelReason. |
After recording any scenario, acknowledge the callback:
{"verifyStatus": 100000, "verifyMessage": "Refund decision received", "data": null}