Scenario 1: Authorization and clearing
- Create a card with
type: VIRTUAL - Simulate authorization with a
cardIdandamount - Confirm
CARD_TRANSACTION_CREATEDwebhook received withstatus: PENDING - Simulate clearing with the
transactionId - Confirm
CARD_TRANSACTION_UPDATEDwebhook received withstatus: CLEARED
Scenario 2: Declined transaction
- Create a card
- Simulate decline with a
cardId,amount, and optionaldeclineReason(defaults toINSUFFICIENT_BALANCE) - Confirm
CARD_TRANSACTION_CREATEDwebhook received withstatus: DECLINED
declineReason.
Scenario 3: Decline against a frozen card
- Freeze a card
- Confirm
CARD_STATUS_UPDATEDwebhook received withstatus: FROZEN - Simulate authorization (confirm it is declined)
- Unfreeze a card
- Confirm
CARD_STATUS_UPDATEDwebhook received withstatus: ACTIVE
Scenario 4: Refund on a cleared transaction
- Create a card
- Simulate authorization
- Simulate clearing with the
transactionId - Simulate refund with the
transactionId - Confirm
CARD_TRANSACTION_UPDATEDwebhook received
Simulating card statuses
To force a card into a status that is otherwise hard to trigger (BLOCKED, EXPIRED), see Simulating card statuses.