The getPossibleLoyalty
request returns the name of the loyalty program the bonus points of which can be used to pay for the order, as well as the maximum and minimum number of such points.
In this document, the following data type conventions are used when describing request and response parameters:
Request parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS36 | Yes |
Identifier of the order in the payment system. It is unique within the system. The identifier is missing if the order registration failed due to an error detailed in errorCode. |
|
A2 | No |
Language in the ISO 639-1 encoding. If the language is not specified, the default language defined in the store settings is used. |
|
AN..255 | required if pan is not passed |
Identifier of the binding created earlier. |
|
N12…19 | required if not passed bindingId |
Payment card number. |
Response parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
|
ANS..3 | Yes |
Error code. |
|
|
No |
|
|
N..20 | No |
The minimum amount of bonus points that can be used along with payment for an order. |
|
N..20 | No |
The maximum amount of bonus points that can be used along with payment for an order. Within one payment, the user cannot spend more points than specified in this parameter. |
|
AN..512 | No |
Bonus program code within the system. |
Error codes (errorCode field):
Value | Description |
---|---|
0 | The request has been processed without system errors. |
5 | Access denied. |
6 | Order not found. |
7 | System error. |
Request example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:loy="http://engine.paymentgate.ru/webservices/sbrf/loyalty"> <soapenv:Header/> <soapenv:Body> <loy1:getAvailableLoyalty xmlns:loy1="http://engine.paymentgate.ru/webservices/merchant/loyalty"> <arg0> <bindingId> </bindingId> <language> </language> <orderId>3c52bbe4-777f-49b0-afb8-bb2b6a971f74</orderId> <pan>4276010013866254</pan> </arg0> </loy1:getAvailableLoyalty> </soapenv:Body> </soapenv:Envelope>
Response example:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns1:getAvailableLoyaltyResponse xmlns:ns1="http://engine.paymentgate.ru/webservices/merchant/loyalty"> <return errorCode="0"> <loyaltyOperations> <maxAmount>6000</maxAmount> <minAmount>0</minAmount> <serviceName>sbrf_spasibo</serviceName> </loyaltyOperations> </return> </ns1:getAvailableLoyaltyResponse> </soap:Body> </soap:Envelope>