API - LoanPro Set Payment Account to Primary

General

Send a PUT request to the URL, https://loanpro.simnang.com/api/public/api/1/odata.svc/Customers({ID}). Make sure to replace {ID} with the ID of the customer for which you are changing the primary payment profile.

The payload for this request should look like this:

{    
"id":"37", 
"PaymentAccounts":{       
"results":[         
{             
"id":1059,           
"isPrimary": 0,           
"isSecondary": 0,           
"__id":1059,           
"__update":true       
},       
{             
"id":312,           
"isPrimary": 1,           
"isSecondary": 0,           
"__id":312,           
"__update":true       
}     

}, 
"__update":true, 
"__id": 37
}

It is important the the first payment account listed under "results" is the one that is currently set as primary (or secondary, if you are updating the secondary payment profile). The payload should set the first payment profile to no longer be the primary (or secondary). The system will first remove this as primary (or secondary) and then update the second account in the payload to make it the primary (or secondary) payment profile.

The return from the PUT request will not reflect the change. You will need to submit a GET to https://loanpro.simnang.com/api/public/api/1/odata.svc/Customers({ID})?$expand=PaymentAccounts in order to see a response that correctly shows the new primary payment method.


How did we do?


Powered by HelpDocs (opens in a new tab)