API – Register a Phone Number with SBT


LoanPro is integrated with Solutions By Text (SBT), a third-party software that allows you to send text messages to your customers through our software. To send messages to a customer, their number will need to be registered within your SBT account. In this article, we'll explain how to register customer phone numbers via the API.

You can also view this material, as well as instructions to our other requests, on our API documentation site.

Register a Number

To register a phone number with SBT, you will need to send a few requests.

Getting the Phone Number's ID

Before registering the phone number, you will need to find its system ID. You can find customer phone number IDs a few ways, but it's easiest to send a GET request to either of the following endpoints:

GET https://loanpro.simnang.com/api/public/api/1/odata.svc/Customers({CustomerID})/Phones
GET https://loanpro.simnang.com/api/public/api/1/odata.svc/Customers({CustomerID})?$expand=Phones

(Just make sure to replace {CustomerId} with the ID of your customer.)

The response from this request will list each phone number associated with the customer. In the response, look for the id field—this is the system ID of each phone number, and you will need it to register the phone number with SBT.

Registering the Number

Now that you have the phone number's ID, you can send the request to register it with SBT. To do so, send a POST request to the following endpoint:

POST https://loanpro.simnang.com/api/public/api/1/sbt/requestVerification()

In the body of the request, list the ID of the phone number as the value for the customerPhoneId parameter. The body of the request will be formatted like the following:

"customerPhoneId": 178

When this request is sent, two text messages will be sent to the phone number to notify the customer that they will receive marketing and account information via text. The messages also each include a PIN that will be used to confirm the number.

Here's a sample response from this request:

Confirming the Number

After sending the verification message, you will need to confirm the number. You can confirm the number by sending a POST request to the following endpoint:

POST https://loanpro.simnang.com/api/public/api/1/sbt/confirmVerificationPIN()

Using the PIN from the registration request above, format the body of this request like shown below:

"customerPhoneId": 5463,
"type": "account",
"pin": "68662"

The PIN sent in the text message will be set as the value for the pin parameter. The type parameter refers to which type of messages the customer has opted in for. In this instance, the type is referring to account information.

If this request is successful, you will receive a 200 response verifying that the confirmation has been completed.

Alternative Process

There's an alternative way to verify and confirm phone numbers within LoanPro. If a customer has multiple phone numbers listed, you can request verification for all of them with a single request by sending a POST request to the following endpoint:

POST  https://loanpro.simnang.com/api/public/api/1/sbt/verifyCustomer({id})

However, using the endpoint above will still require that the phone numbers be confirmed by using the PINs sent within the verification text messages. To bypass this and complete the verification process without a PIN, you can add a bypass parameter to the endpoint like below:

POST  https://loanpro.simnang.com/api/public/api/1/sbt/verifyCustomer({id})?bypassVerify=true

(Make sure to replace {id} with the ID of the customer whose primary phone number is being verified.)

Bypassing verification is not the best option for everyone. Depending on where you operate your lending business, you will need to comply with customer communication laws—borrowers need to consent to receiving electronic messages. Before bypassing verification with the endpoint above, you will need to check your local laws to ensure you're remaining compliant with them; or, at the very least, you will need to have your borrowers consent to receive messages in some other way.

It's important to know that when a borrower is set up within SBT, any shortcode they send to you will be lost until an initial message is sent from LoanPro. That means that if you have never sent anything to the borrower, there is no way for SBT to know which customer they are inside of LoanPro. Consequently, all messages they send at that point will be lost and will be unrecoverable.

Please note that if your Verification by Text (VBT) type in SBT is set to 'None', no message will be sent when you request verification this way. If you send the verification a second time, a text message will be sent to the phone number with a reserved keyword verification message.

How did we do?

Powered by HelpDocs (opens in a new tab)