Pre Auth
The Pre-auth endpoint enables partners to check the validity of a payment request against the set of configured rules.
Perform a pre-auth
POST https://<PayEngine-host>/transaction-monitoring/pre-auth
This endpoints accepts the payload similar to auth and sale endpoints and responds with a decision and list of rules that were applied to allow or decline the transaction.
Body
transaction_type*
string
The type of payment request you want to perform. sale |auth|capture|refund
merchant_id*
string
PayEngine merchant ID
data.card_token
string
Payengine secure vault token. Only used if card is tokenized with Payengine secure vault.
If using cardToken then account holder information is optional
data.cardholder_name
string
Card holder name
data.card_exp
string
MM/YY card expiration data
data.card_number
string
Primary account number (PAN)
data.currency*
string
Currency code (USD|CAD etc.)
data.transaction_amount*
string
Max Length=12 Allowed characters: 0-9 and .(dot)
Note: this value always reflects the total dollar amount for example 1.00 and 1 both will be considered $1.00 and 0.10 will be 10 cents.
data.ip_address
string
Client IP address
processing_status*
string
Overall processing status allow|decline
transaction_status*
string
The transaction status. If all rules are passed it will be preauth otherwise failed
roc_text_data*
string
Unique PayEngine assigned ID for this transaction. This ID is generally used to reconcile settlement data and should be passed to processing gateways
transaction_id*
string
PayEngine's transaction ID
triggered_rules*
array
List of configured rules and decisions
Sample Request / Response
Example Sale Request
{
"transaction_type": "sale",
"merchant_id": "a9e30f16-1ef5-41e5-9ec2-c8e51a15b406",
"data": {
"card_token": "card_test_FhoSMXnzRcG88fa85XtcSF2h",
"transaction_amount": "1.4",
"ip_address": "100.43.79.254"
}
}Example Auth Request
{
"transaction_type": "auth",
"merchant_id": "a9e30f16-1ef5-41e5-9ec2-c8e51a15b406",
"data": {
"card_number": "4111111111111111",
"cardholder_name": "John Doe",
"card_exp": "12/27",
"currency_code": "USD",
"transaction_amount": "5.50",
"ip_address": "100.43.79.254"
}
}Example Refund Request
{
"transaction_type": "refund",
"id": "09536b98-d422-45e4-98b1-9068623ac509",
"amount": "5.00",
"reason": "Item retuned"
}{
"processing_status": "decline",
"transaction_status": "failed",
"roc_text_data": "1eaf22fa-80fa-429b-870a-649d2cdd232a",
"transaction_id": "1eaf22fa-80fa-429b-870a-649d2cdd232a",
"triggered_rules": [
{
"rule": "auth-count-per-card",
"data": {
"amount": "3",
"time_frame": "1 hours"
},
"decisions": {
"preauth": "hold-merchant-captures"
},
"result": false,
"execution_time": 8,
"decision": "allow"
},
{
"rule": "duplicate-transaction-count",
"data": {
"exceed_limit": "1",
"time_frame": "1 hours"
},
"decisions": {
"preauth": "hold-transaction-capture"
},
"result": false,
"execution_time": 2,
"decision": "allow"
},
{
"rule": "duplicate-transaction-count",
"data": {
"exceed_limit": "1",
"time_frame": "1 hours"
},
"decisions": {
"preauth": "block-merchant"
},
"result": false,
"execution_time": 1,
"decision": "allow"
},
{
"rule": "ip-address",
"data": {
"ip_address": "100.43.79.255"
},
"decisions": {
"preauth": "decline"
},
"result": false,
"execution_time": 0,
"decision": "allow"
},
{
"rule": "ip-address-origin-country",
"data": {
"countries": "RU"
},
"decisions": {
"preauth": "decline"
},
"result": true,
"execution_time": 0,
"decision": "decline"
}
]
}Last updated