Trigger amounts
The trigger is the amount you set on the link,creditAmount, in the link’s currency. A link for ₱14.14 fails the debit whatever the exchange rate and fees are. Any other amount behaves as normal.
Run a test
1
Create a session
Call Create a Session with your operator details, as you do for any payment link.
2
Create a link with a trigger amount
Call Create a Payment Link and set Include any custom fields your merchant requires. Without them, the call returns
creditAmount to the trigger amount. This link fails the debit:400.3
Pay the link as the buyer
Open the payment link, connect a Sandbox test bank account, and authorize the payment. See Collect a payment for how to send a buyer to the link.
4
Receive the webhooks
Meridian sends the webhooks listed for that amount under Webhooks for each amount. Check that your system handles each one, and that your buyer sees your failure page.
Webhooks for each amount
Each tab lists the webhooks in the order Meridian sends them, then the body of each one. Every webhook carriesX-Meridian-Resource-Type: payment_link_transaction, and the event name in X-Meridian-Event-Type.
IDs, timestamps, and USD amounts in these examples are samples. paymentLink is shortened here, and the real webhook carries the full payment link.
- 12.12 Risk declined
- 13.13 Risk error
- 14.14 Debit failed
- 15.15 Debit timeout
Meridian’s risk check declines the payment before any debit. The transaction goes straight from
PENDING to FAILED.The link cannot be paid again after this failure. Create a new link to repeat the test.
1. payment_link_transaction_created (PENDING)
1. payment_link_transaction_created (PENDING)
2. payment_link_transaction_failed (FAILED)
2. payment_link_transaction_failed (FAILED)
statusReason is plain text, so do not match on its exact wording. Use transaction.status to decide what happened. See Track payments for how to handle these webhooks.
The payment link’s own status can also change after a failed payment. Read it with Get a Payment Link.