spendLimit Control Works for Alert but Not Decline

leighcrowder
Helper

spendLimit Control Works for Alert but Not Decline

Hello,

I'm running into some confusion with VTC - Customer Rules API.

I'm trying to send a request in the sandbox environment to enable the declineThreshold control using spendLimit. With the following request, it seems declineThreshold does not get saved. However, alertThreshold does appear to be saved when I include it in the request instead.

Can you let me know if there's an issue with my request?

Furthermore, in this request there's a field called currentPeriodSpend and in the docs it's marked as a required field. However, I'm not sure what API to call to retrieve this value. What should I be setting this field to?

Request:

 

{
  "globalControls": [
    {
      "shouldDeclineAll": false,
      "isControlEnabled": true,
      "userInformation": {
        "applicationDefinedAttributes": [
          "APP"
        ],
        "bankingIdentifier": "BI",
        "name": "BOA"
      },
      "spendLimit": {
        "currentPeriodSpend": 100.00,
        "type": "LMT_MONTH",
        "declineThreshold": 200.00
      },
      "shouldAlertOnDecline": true
    }
  ]
}

 

 Response:

 

{
    "receivedTimestamp": "2023-02-13 21:17:31.62",
    "processingTimeinMs": 1423,
    "resource": {
        "globalControls": [
            {
                "shouldDeclineAll": false,
                "shouldAlertOnDecline": true,
                "spendLimit": {
                    "type": "LMT_MONTH",
                    "currentPeriodSpend": 100.0,
                    "alertThreshold": 200.0,
                    "timeZoneID": "GMT",
                    "currentPeriodEnd": "2023-02-28 23:59:59"
                },
                "userIdentifier": "4991104699359772",
                "userInformation": {
                    "name": "BOA",
                    "applicationDefinedAttributes": [
                        "APP"
                    ],
                    "bankingIdentifier": "BI"
                },
                "isControlEnabled": true
            },
            {
                "shouldDeclineAll": false,
                "shouldAlertOnDecline": true,
                "userInformation": {
                    "name": "BOA",
                    "applicationDefinedAttributes": [
                        "APP"
                    ],
                    "bankingIdentifier": "BI"
                },
                "isControlEnabled": true
            }
        ],
        "lastUpdateTimeStamp": "2023-02-13 21:17:32",
        "documentID": "ctc-vd-6a07eba1-e1fd-48e6-8206-65cd4d9dec51",
        "createdOnDate": "2023-02-10 18:41:32.709"
    }
}

 

  

6 REPLIES 6
I_Doroteo3
Visa Developer Support Specialist

Re: spendLimit Control Works for Alert but Not Decline

Hi @leighcrowder

 

I've reached out to the product team regarding your inquiry and will reach back out when I receive a response.

 

Thanks, 

Illana

leighcrowder
Helper

Re: spendLimit Control Works for Alert but Not Decline

Hi @I_Doroteo3 do you have any update on this? Thank you!

I_Doroteo3
Visa Developer Support Specialist

Re: spendLimit Control Works for Alert but Not Decline

Hi @leighcrowder

 

Could you also provide the following information so that I can share this with the team?

 

  1. Endpoint  
  2. Request Header 
  3. Request Body 
  4. Response Header (include the x-correlation-id) 
  5. Response Body 

Thanks, 

Illana

leighcrowder
Helper

Re: spendLimit Control Works for Alert but Not Decline

I ran the request again today with a new document-id and now that field seems to be saving... I'm not sure what changed as I ran the same request as I posted originally and now the response is returning with declineThreshold included. The only thing I can think of is that I somehow got my test data into a bad state.

 

I'm still not sure about my other question, though-- where should I get the value for currentPeriodSpend? Also, when setting an alert preference for example on transactionControls, will sending alertTheshold: "0.00" trigger an alert for any transaction performed on that card?

 

For example

 

{
  "transactionControls": [
    {
      "isControlEnabled": true,
      "controlType": "TCT_CROSS_BORDER",
      "userIdentifier": "4991104699359772",
      "alertThreshold": "0.00",
      "userInformation": {
        "bankingIdentifier": "BI",
        "name": "BOA",
        "applicationDefinedAttributes": []
      }
    }
  ]
}

 

 

---

Not sure if this is still needed, but I have my original request/response bodies in my initial post. I don't have the headers saved from the original request and since my new request is working, I don't have any header values/X-CORRELATION-ID that correspond to what I was originally seeing either.

 

Endpoint: https://sandbox.api.visa.com/vctc/customerrules/v1/consumertransactioncontrols/{document-id}/rules

 

Likewise with document-id, I didn't save the document-id from the original request.

leighcrowder
Helper

Re: spendLimit Control Works for Alert but Not Decline

hi @I_Doroteo3 

Do you have any update on my last questions? About what values should be used for currentPeriodSpend and whether alertThreshold being 0.00 will turn alerts on (and related if alertThreshold is null will that turn alerts off completely?)

Thank you so much!

I_Doroteo3
Visa Developer Support Specialist

Re: spendLimit Control Works for Alert but Not Decline

Hi @leighcrowder

 

Apologies for the late response; currentPeriodSpend is the total amount of all approved transactions performed within the time period for this control type. 

 

If the Alert threshold is set to $0.00, every approved transaction (assuming the transaction is equal to or more than $0.00) would trigger a notification to the user.

 

Hope this helps!

 

Thanks, 

Illana