Issue
I am using Checkout.com for payment processing. I want to test flagged transaction response in a test environment.
How can I get this response in test mode?
Solution
Flagging a transaction is an action that is taken by a Risk Rule in Checkout.com
To be able to flag a transaction you simply need to set a risk rule in your Checkout.com Hub and trigger this risk rule in your payment request.
For example, you can set up a "threshold" risk rule that will flag a transaction if it exceeds (or it's bellow) a certain amount.
After setting up this, sending a payment request with a value that will trigger the risk rule, will result in a flagged response from the API.
You can also see some sample responses in the API Reference of Checkout.com
Here is a sample:
{
"id": "pay_jf7xoknmva3upbatzkiqcwvkea",
"action_id": "act_jf7xoknmva3upbatzkiqcwvkea",
"amount": 20000,
"currency": "USD",
"approved": true,
"status": "Authorized",
"auth_code": "290947",
"eci": "05",
"scheme_id": "638284745624527",
"response_code": "10000",
"response_summary": "Approved",
"risk": {
"flagged": true
},
"source": {
// dynamic based on your source
},
"customer": {
"id": "cus_vh2hq53yioouvg3etkuw2xdhcu",
"name": "Sarah Mitchell"
},
"processed_on": "2019-06-25T18:27:10Z",
"reference": "ORD-5023-4E89",
"processing": {
"acquirer_transaction_id": "8138182777",
"retrieval_reference_number": "000290947597"
},
"_links": {
"self": {
"href": "https://api.sandbox.checkout.com/payments/pay_jf7xoknmva3upbatzkiqcwvkea"
},
"actions": {
"href": "https://api.sandbox.checkout.com/payments/pay_jf7xoknmva3upbatzkiqcwvkea/actions"
},
"capture": {
"href": "https://api.sandbox.checkout.com/payments/pay_jf7xoknmva3upbatzkiqcwvkea/captures"
},
"void": {
"href": "https://api.sandbox.checkout.com/payments/pay_jf7xoknmva3upbatzkiqcwvkea/voids"
}
}
}
Notice the:
"risk": {
"flagged": true
},
Answered By - johnnyshrewd Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.