PIN Payment Flow Update

If you decided to implement PIN flow for your service, besides entering a phone number, the end-user must enter a PIN that was received within an SMS message in order to authenticate the transaction and continue with the started purchase.
Submit PIN action is done for a transaction that is in status PENDING and operation is PIN.

Type: application/json composed of parameters with associated values.
Before initiating payment you will need to obtain tokenURL

URL to which request should be posted:

https://api.centili.com/payments/v3/transactions/{transactionId}/pin

POST payment request

https://api.centili.com/payments/v3/transactions/{transactionId}/pin HTTP/1.1
Host: api.centili.com:443
Content-Type: application/json
Authorization:bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhNTY2Nzk2YS0xYTNkLTQxNjMtNTY2Mi1lZGI4YzEyODlhMWMiLCJleHAiOjE1OTc2OTc2OTYsIm5iZiI6MCwiaWF0IjoxNTk3Njk3Mzk2LCJpc3MiOiJodHRwczovL2FwaS5jZW50aWxpLmNvbS9hdXRoL3JlYWxtcy9hcGkiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiMTExMWFhYWEtMDAwMC0wMDAwLTAwMDAtMTExMWFhYWExMTExIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoiYXBpLXBheW1lbnRzIiwiYXV0aF90aW1lIjowLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbImh0dHBzOi8vYXBpLmNlbnRpbGkuY29tIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiY2VudGlsaS5hcGkudXNlciJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJwcm9maWxlIGVtYWlsIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsInByZWZlcnJlZF91c2VybmFtZSI6InRlc3RfdG9rZW4iLCJtZXJjaGFudF9pZCI6IjAifQ.hNaM_UlFetIZeJKJXZVUX42k5KGWAmBVjq7SOsa9pGs

{
  "pin": "{pin}"
}

Request parameters

Parameter

Description

Example

transactionId

Unique identifier of transaction in Centili system.

123456789

pin

Pin which is being validated

5483

POST payment response

Once a request is received, Centili will synchronously respond with POST response containing an appropriate HTTP response and a list of parameters and values in JSON format:

👍

200

PIN validation successful

HTTP/1.1 200 OK
Content-Type: application/json

{
    "transactionId": "123456789",
    "clientData": {
        "clientUserId": null,
        "clientReference": null
    }
}

Response parameters

Parameter

Description

Example

transactionId

Unique identifier of transaction in Centili system.

123456789

clientUserId

Unique identification parameter under your system (pass-through variable).

appID1

clientReference

Identification of the customer.

usrId1983

❗️

4xx client error / 5xx server error

400 - Invalid PIN, request can be retried
401 - Invalid credentials
404 - Transaction not found
429 - Number of attempts over the max retry limit, request can not be retried.
500 - Request can not be processed at the current time

HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{
  "code": "PIN_INVALID_RETRY_NOT_POSSIBLE",
  "message": "Pin invalid retry not possible"
}

Parameter

Description

Example

code

Error response code

PIN_INVALID_RETRY_NOT_POSSIBLE

message

Error response message

Pin invalid retry not possible

📘

Note:

Please note that this applies only to cases when PIN input is done on client’s page and submitted to Centili for validation. In case PIN input and validation are done on operator’s page flow it will be handled as “URL_REDIRECT” flow.