Create Transaction
The Create Transaction API enables authorized users to create a new transaction record, which may involve customer information, risk assessments, and transaction details.
API Method
POST
Endpoint
https://cebuana-apiuat.veryfyglobal.com/transactions
Headers
Accept
application/json
Authorization
Bearer <YOUR_TOKEN>
Body Parameters
The request body consists of several parameters that vary depending on the step in the transaction process. Below are the detailed descriptions:
General Parameters
step
integer
Yes
Indicates the current step in the transaction process. Valid values are 1, 2, or 3, where each step requires different parameters.
type
integer
Yes
Transaction Type wheater Buy or Sell (uses enumeration defined by TransactionType).
Step 1: Customer Information
When step is 1, the following parameters are required:
first_name
string
Yes
The first name of the customer.
middle_name
string
Yes
The middle name of the customer.
last_name
string
Yes
The last name of the customer.
email
string
Yes
The email address of the customer.
current_address
string
No
The current address of the customer.
permanent_address
string
No
The permanent address of the customer.
date_of_birth
date
No
The date of birth of the customer (format: YYYY-MM-DD).
place_of_birth
string
No
The place of birth of the customer.
tin
string
No
Tax Identification Number, must be a maximum of 12 characters.
sss
string
No
Social Security System number.
document_type
integer
No
Type of document (uses enumeration defined by DocumentType).
id_no
string
Yes
Identification number.
id_photo
string
No
Base64 encoded image of the identification document.
nationality
string
No
The nationality of the customer.
contact_number
string
No
The contact number of the customer.
Step 2: Risk Assessment
When step is 2, the following parameters are added:
risk_assessments
array
No
An array of risk assessment objects.
risk_assessments.*.type
integer
Yes
The type of risk assessment (uses enumeration defined by AssessmentType).
risk_assessments.*.value
string
Yes
The value of the risk assessment.
risk_assessments.*.grade
integer
Yes
The grade assigned to the risk assessment, must be zero or positive.
Step 3: Transaction Details
When step is 3, all parameters from previous steps are required in addition to the following transaction-specific parameters:
purpose
integer
Yes
The purpose of the transaction (uses enumeration defined by TransactionPurpose).
signature
string
No
Base64 encoded image of the customer's signature; required if attachment is not provided.
attachment
string
No
A string that represents an attachment; required if signature is not provided.
items
array
Yes
An array of transaction items.
items.*.currency_id
integer
Yes
The ID of the currency used for each item; must exist in the currencies table.
items.*.amount
number
Yes
The amount for each item in the transaction; must be greater than or equal to 1.
Example Request
POST https://cebuana-apiuat.veryfyglobal.com/transactions
Content-Type: application/json
{
"step": 3,
"type": 0,
"first_name": "John",
"middle_name": "Doe",
"last_name": "Smith",
"email": "[email protected]",
"current_address": "123 Main St",
"permanent_address": "456 Elm St",
"date_of_birth": "1980-01-01",
"place_of_birth": "Cityville",
"tin": "123456789012",
"sss": "987654321",
"document_type": 1,
"id_no": "ID123456",
"id_photo": "<base64_encoded_image>",
"nationality": "American",
"contact_number": "1234567890",
"risk_assessments": [
{
"type": 1,
"value": "High Risk",
"grade": 3
}
],
"purpose": 2,
"signature": "<base64_encoded_signature>",
"attachment": "some_attachment_info",
"items": [
{
"currency_id": 1,
"amount": 1000
},
{
"currency_id": 2,
"amount": 500
}
]
}Response Sample
{
"message": "Ok",
"data": []
}{
"code": "422.000.000",
"message": "The step field is required. (and 8 more errors)",
"errors": {
"step": [
"The step field is required."
],
"first_name": [
"The first name field is required."
],
"middle_name": [
"The middle name field is required."
],
"last_name": [
"The last name field is required."
],
"email": [
"The email field is required."
],
"purpose": [
"The purpose field is required."
],
"signature": [
"The signature field is required when attachment is not present."
],
"attachment": [
"The attachment field is required when signature is not present."
],
"items": [
"The items field is required."
]
}
}{
"code": "403.000.000",
"message": "Invalid ability provided."
}Last updated