Error converting value \"\" to type 'SPS.Gateway.Models.Recurrence.NonBusinessDaysHandling'.

You are here

2 posts / 0 new
Last post
Khalid Chauhan
Error converting value \"\" to type 'SPS.Gateway.Models.Recurrence.NonBusinessDaysHandling'.
Hello, Try to call below API.   https://api-cert.sagepayments.com/bankcard/v1/charges.   Always getting below response.   { "code": "400000", "message": "There was a problem with the request. Please see 'detail' for more.", "info": "https://developer.sagepayments.com/docs/errors#400000", "detail": "InvalidRequestData : Error converting value \"\" to type 'SPS.Gateway.Models.Recurrence.NonBusinessDaysHandling'. Path 'eCommerce.recurringSchedule.nonBusinessDaysHandling', line 1, position 774." }   Below is my request.   "isRecurring": false, "recurringSchedule": {             "amount": 1,             "frequency": "1",             "interval": 0,             "nonBusinessDaysHandling": "",             "startDate": "2017-01-04",             "totalCount": 0,             "groupId": ""         }   Can someone help me what wrong I am doing here.   Thanks in advance.  
thomash
Re: Error converting value \"\" to type 'SPS.Gateway.Models.Recu

Khalid,

Thanks for the post, we're happy to help. The field nonBusinessDaysHandling is a required field when submitting a transaction for recurring processing. The valid values are ThatDay, Before, or After. I have listed the field information below. Also, I notice you have set isRecurring to false. This value should be set to true for recurring transactions. Please reply to this post if you have any follow up questions. Also, feel free to contact us directly at [email protected].

"recurringSchedule": {

  "amount": 30, //Recurring amount

  "frequency": "Monthly", //You can pass “Daily” or “Monthly”.

  "interval": 1, //The value “1” means once a month.

  "nonBusinessDaysHandling": "ThatDay", //You can use “ThatDay”, “Before”, or “After”

  "startDate": "03-01-18", //Has to be a furture date.

  "totalCount": 12, //The amount of times the recurring will last. Use “-1" if you want the recurring to be indefinite.

  "groupId": "45359" //You only need one Group. You can create one manually in the Virtual Terminal or through the SOAP API.       

}
Log in or register to post comments