Rules V2

Create Basic Rule

Changed on

This web service allows to create different types of advanced rules. <p>Version 2 Basic Rules api support idempotency;</p>

post/pws/v2/pws_advanced_rules/

Request

  • Base URL
    https://api.uat.paymentology.com/ppws/api
  • URL
    https://api.uat.paymentology.com/ppws/api/pws/v2/pws_advanced_rules/
  • Auth
    none declared

Request body

api_call_unique_identifierstring required

Unique number that must be passed at each API request. Identifier to make each API request unique

client_idinteger required

Unique identifier for the client which Paymentology will provide at outset

rule_descstring required

Rule description. Description should specific and should describe rule in a concise manner.

rule_namestring required

Rule name

rule_typestring required

Rule type : <ul><li class="docBullet">Au = Authorisation</li><li class="docBullet">Se = Settlement</li><li class="docBullet">Sc = Scheduled</li><li class="docBullet">Lo = Load</li><li class="docBullet">Un = Unload</li><li class="docBullet">Ot = Others</li><li class="docBullet">Da = Deactivated</li></ul>

scopestring required

Rule applicable scope. Values of scope can be : <ul><li class="docBullet">C=Direct card rules (These rules are held at individual card level and therefore can be personalized per card holder.)</li><li class="docBullet">G=Group rules (These rules are more generic to card program and typically used to set upper limit controls.)</li><li class="docBullet">T=Token Group rules (These rules are more generic to card program which is set at token level and typically used to set upper limit controls.)</li><li class="docBullet">A=Parent Account rules (These rules cascade down to the cards linked to all children accounts of this parent.)</li><li class="docBullet">P=Product rules (These rules are set to the product.)</li></ul>

user_idstring

User Id of the Customer who triggered the API request.

remarksstring

Remarks for API request

tokeninteger

Public token for card. Required in case of scope 'C'

severityinteger

Severity level. It can be 0(lowest)-10(highest). As per severity level, rules with highest severity are checked in priority

group_idinteger

Group Id. Required in case of scope 'G' or 'T'

amount_limit_cumulativenumber
<p>This will define cumulative limit for a card within a time_window frame.</br >If you need to include cumulative amount limit, then time_window value should be set otherwise it limit will be ignored. </ br>This field will be applicable to billing currency of card.</p>
time_windowstring

Time window for limit.<ul><li class="docBullet">min=>Minute eg: 30min</li> <li class="docBullet">hrs=>hour eg: 12hrs</li><li class="docBullet">day=> days eg: 5day</li><li class="docBullet">wks=> weeks eg: 4wks</li><li class="docBullet">mts => Months eg: 3mts</li><li class="docBullet">yrs=> years eg: 2yrs </li> </br ></br >To include rule limit for certain time frame use like this : time_window = 30 min and amount_limit_cumulative = 1000, then within 30 min maximum of 1000 amount can be spent. </br ></br >To include rule limit for overall card lifetime, if card has expiry of 3 years : set time_window = 3yrs and amount_limit_cumulative = 1000000 </br ></br >To include rule limit for current transaction only please don't use any value for time_window field.

amount_limit_singlenumber

This will define single transaction limit. Will be applicable to current transaction only

count_limitinteger
<p>Total number of transaction count limit for given time window.</br >This value without time window will be ignored.</p>
spend_typestring

Spend mode can be comma separated values of: <ul><li class="docBullet">POS (Including ECOM)</li> <li class="docBullet">ATM </li><li class="docBullet">POSCB ( Purchase with cashback)</li><li class="docBullet">CR (credit)</li><li class="docBullet">BAL (Balance inquiry)</li><li class="docBullet">PINU (Pin unblock)</li><li class="docBullet">PINC (Pin change)</li></ul>

spend_types_advancedstring

Spend mode advanced can be comma separated values of: <ul><li class="docBullet">RECR (Recurring)</li> <li class="docBullet">ECOM </li><li class="docBullet">CONTL (Contactless)</li><li class="docBullet">CONF (Card on file)</li><li class="docBullet">MAG (Mag stripe)</li></ul>

show_how_far_to_hit_limitboolean
<ul><li class="docBullet">True = Rule is for limit check like (amount limit or transaction count limit)</li><li class="docBullet">False =Rule is not for limit check like (amount limit or transaction count limit)</li></ul>
rule_idinteger

Rule Id To Edit. Existing rule will be updated when this value is passed.

action_declinestring

Decline action,de39 response code <ul> <li class="docBullet">57 = Txn not permitted</li> <li class="docBullet">03 = Invalid merchant</li> <li class="docBullet">04 = Capture card</li> <li class="docBullet">05 = Do not honour</li> <li class="docBullet">12 = Invalid txn</li> <li class="docBullet">13 = Invalid amt</li> <li class="docBullet">14 = Invalid card no</li> <li class="docBullet">30 = Format error</li> <li class="docBullet">41 = Lost card</li> <li class="docBullet">43 = Stolen card</li> <li class="docBullet">51 = Insufficient funds</li> <li class="docBullet">54 = Expired card</li> <li class="docBullet">55 = Invalid pin</li> <li class="docBullet">57 = Txn not allowed</li> <li class="docBullet">58 = Invalid txn/terminal</li> <li class="docBullet">61 = Exceed cash limit</li> <li class="docBullet">62 = Restricted card</li> <li class="docBullet">63 = Security violation</li> <li class="docBullet">71 = Pin not changed</li> <li class="docBullet">75 = Pin tries exceeded</li> <li class="docBullet">88 = crypto Fail</li> <li class="docBullet">96 = System error</li> <li class="docBullet">70 = Contact card issuer</li> </ul>

account_idinteger

Account Id. Required in case of scope 'A'

product_idinteger

Product Id. Required in case of scope 'P'

Example request

{
  "api_call_unique_identifier": "438574845790657485",
  "client_id": 760131,
  "rule_desc": "Fraud Rule Description",
  "rule_name": "Fraud Rule",
  "rule_type": "Au",
  "scope": "G",
  "token": 311012081,
  "group_id": 1267,
  "amount_limit_cumulative": 2000,
  "time_window": "12hrs",
  "amount_limit_single": 500,
  "count_limit": 20,
  "spend_type": "ATM",
  "spend_types_advanced": "RECR",
  "rule_id": 103,
  "action_decline": "05",
  "account_id": 12671234,
  "product_id": 1326
}

Response

Successful Response

Example response

{
  "header": {
    "error_desc": "success"
  },
  "body": {
    "rule_id": 103
  }
}

Changes