| Key | Value |
|---|---|
| Accept | application/json |
| Content-Type | application/json |
| Authorization | Bearer {API-KEY} |
Create a new token for your customer.
| Method | URI |
|---|---|
| POST | /tokenizations/create-token |
| KEY | TYPE | RULE |
|---|---|---|
email |
required |
|
| phone_no | string |
optional |
| redirect_url | string |
optional |
| title | string |
required |
| description | string |
required |
{
"email": "test@email.com",
"phone_no": "0123456789",
"redirect_url": "https://swipego.io/",
"title": "Lorem Ipsum",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
}
Here you may add extra information about the section.
{success} Success Response
Code 200
Response
{
"success": true,
"data": {
"email": "test@email.com",
"phone_no": "0123456789",
"redirect_url": "https://swipego.io/",
"title": "Lorem Ipsum",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
"token": "c1e3a6b219fcd8b4adb98f1f05130f359804ad7befd5b976f1412e734dad5736",
"updated_at": "2022-05-19T08:36:38.897000Z",
"created_at": "2022-05-19T08:36:38.897000Z",
"_id": "628601960641c9fdff637f3a",
"activation_url": "http://localhost:8080/tokenization/activation/c1e3a6b219fcd8b4adb98f1f05130f359804ad7befd5b976f1412e734dad5736?test=true"
},
"errors": null,
"meta": {
"timestamp": "2022-05-19 08:36:38 UTC",
"timezone": "UTC"
}
}
{danger} Error Response
Code 422
Response
{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
],
"title": [
"The title field is required."
],
"description": [
"The description field is required."
]
}
}