- 04 Oct 2024
- 1 Minute to read
- DarkLight
- PDF
Create Transaction
- Updated on 04 Oct 2024
- 1 Minute to read
- DarkLight
- PDF
Transactions are the main resource in OneSpan Identity Verification (see also Transaction model). This API creates and starts the execution of a new transaction:
Create transactions with documents, signatures, signers, and an instance of the predefined workflow.
Create transactions with predefined document templates.
Create transactions by providing additional metadata that will be retained as electronic evidence.
Create transactions with an instance of a predefined workflow to request identity validation checks to be executed through OneSpan Identity Verification.
Create transactions that require implicit or explicit user consent. For an example request, see Example request with explicit consent. For consent configuration, see Transaction model.
The number of agreements may not exceed a total size of 50 MB, and the size of a single agreement must not exceed 10 MB.
Syntax
PUT /api/transaction/
Examples
Example requests
PUT api/transaction/ HTTP/1.1
Host: onespan.com
Accept: application/json, text/javascript
{
"tenant_id":"5e52d7b8-8b18-41a4-9187-d4ce75af6815",
"workflow_id":"80b601c9-f102-4761-9eaa-90ba8fcb58b6",
"urlSetKey":"default",
"brand_id":"a089f718-f12d-4b13-b82e-e1d8b324337d",
"language": "english",
"opaque_id": "WorkflowExternalMitAtPwd=1234",
"configuration": {
"redirects": [
{
"id": "REDIRECT_DOCID_PASS",
"url": "https://www.overriddenUrl.com/?user={{userRole}}&transaction={{transactionId}}&opaqueId={{opaqueId}}"
}
]
},
"users"[...],
"documents"[...]
}
Example request with explicit consent
PUT api/transaction/ HTTP/1.1
Host: onespan.com
Accept: application/json, text/javascript
{
"tenant_id":"5e52d7b8-8b18-41a4-9187-d4ce75af6815",
"workflow_id":"80b601c9-f102-4761-9eaa-90ba8fcb58b6",
"urlSetKey":"default",
"brand_id":"a089f718-f12d-4b13-b82e-e1d8b324337d",
"language": "english",
"opaque_id": "WorkflowExternalMitAtPwd=1234",
"configuration": {
"redirects": [
{
"id": "REDIRECT_DOCID_PASS",
"url": "https://www.overriddenUrl.com/?user={{userRole}}&transaction={{transactionId}}&opaqueId={{opaqueId}}"
},
"consent": {
"explicit": true,
"text": "I agree to the <URL link=\"myTermsURL"\> Terms and Conditions</URL> consent."
}
]
},
"users"[...],
"documents"[...]
}
Example response
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"id":"dcaad720-d1e9-47ba-a76b-a6370ef0373b",
"status":"new",
"created":"2017-04-23T18:25:43.511Z",
"tokens": [...],
...
}
Headers
The following headers are included in the request and the response:
Request headers
Accept: The response content type depends on the Accept header.
Authorization: The OAuth/JWT token to authenticate.
Response headers
Content-Type: application/json