Transaction · Standard API · eKYC Core
Finish a transaction
POST/v1/transactions/{transaction_id}/finish
Finishes a transaction and returns the transaction id.
Request
MethodPOST
Path/v1/transactions/{transaction_id}/finish
Content-Typeapplication/json
Auth requiredYes — HMAC signing
| Name | Type | Required | Description | Supported countries |
|---|---|---|---|---|
vilcaf_number | string | Optional | CAF Number | india |
status_code | int | Optional | status code | india |
{
"vilcaf_number", string,
}
Sample request
curl -X POST \
https://tv-staging.trustingsocial.com/api/v1/transactions/3b4bf7b6-088b-4931-9279-9259f5c34fe3/finish \
-H 'Authorization: TV <YOUR ACCESS KEY>:<CREATED SIGNATURE>' \
-H 'X-TV-Timestamp: 2019-04-21T18:00:15+07:00' \
-H 'Content-Type: application/json' \
-d \
'
{
"vilcaf_number": "CAF_123456789"
}
'
Response
On success the HTTP status code is 200, and data.id is returned. The errors array uses the shared response envelope.
{
"data": {
"id": uuid,
},
"errors": [
{
"code": string,
"message": string,
"detail": {
"field": string, // optional, which parameter is invalid.
... // any other information that can be useful for client
},
},
... // other errors
]
}
A finished transaction comes back like this:
{
"data": {
"id": "416ab0e7-13a2-4b4b-9304-03bb8612d817"
}
}
Failure codes
If the data.status is "failure", the "errors" field will tell you why it failed.
In case of any other errors, the data field will be empty, and the server sends one of following HTTP status code with error code:
| HTTP code | Error code | Description |
|---|---|---|
401 | access_denied_exception | You are not authorized to perform the action. |
400 | invalid_parameter_exception | Input parameter violates a constraint. |
400 | request_time_too_skewed | The X-TV-Timestamp header is expired, need a newer one. |
408 | request_timeout_exception | Request takes too long to process |
429 | rate_limit_exception | The number of requests exceeded your throughput limit. |
500 | internal_server_error | Some unexpected error occurs while processing the request |
The codes above are the ones documented for this endpoint. Response errors on the Overview lists the codes for the eKYC Core surface as a whole — the two lists do not match on every endpoint.