send_sms_from_device, are not defined. You need to implement these where possible.
responseCode to decide what to do, in both success and error cases.
See Bango Payment / Merchant API reference / API reference overview for detailed information on all request parameters and all possible response bodies.
FAQ
Which request parameters should I set?
The skeleton code sets request_body_params to be empty. You might be able to supply more parameters in your production code. For example:
deviceCapabilitySendSms(default the stringtrue) lets your store tell the Bango Platform if the user’s device can’t send SMS messages.identificationMethodKeylets your store tell the Bango Platform which Mobile Network Operator the user’s device uses.thirdPartyUserIdlets your store tell the Bango Platform of any bespoke user identifier.
CLIENT_ACTION_REQUIRED with action REDIRECT, for example. Other stores might always receive a Bango ID in the response of the first API request.
Contact Bango Support if you’re unsure what you need to implement.
What should I do if I can’t perform an action?
The Bango Platform may be extended at any time to support new identification methods. This may mean the response code CLIENT_ACTION_REQUIRED might start to reference actions your code doesn’t currently handle – and possibly cannot ever handle, due to device limitations.
The skeleton code shows how to deal with this scenario: if you don’t recognize or can’t perform a CLIENT_ACTION_REQUIRED action, send the parameter action with string value cancel in the next request to the Identity resource, and let the conversation continue.
If you don’t handle unrecognized actions in this way, your store may stop working when Bango introduces new identification methods.
What if none of my supported devices can send SMS?
In this scenario, include the parameter "deviceCapabilitySendSms": "false" with your requests to the Identity resource. You don’t need to handle the SEND_SMS action in this case: treat it as an unrecognized action.
