Token-related callback parameters
Once you submit a token generation or a token revoke request to the /v2/customer/card/tokenize endpoint, the payment platform returns a callback with the request execution result. The following table lists the parameters included in the callback.
For more general information about callbacks, see What callbacks in Rocketpay look like.
| Parameter | Description | tree |
|---|---|---|
|
project_id |
The unique identifier of your project. Example: |
10 |
|
customer |
The object with the customer data. |
20 |
|
id |
The unique identifier of the customer in your project. Example: |
20-120 |
|
request |
The object with the request data. | 30 |
|
id |
Unique identifier of the request. Example: |
30-130 |
|
action |
Type of the request. The following options are available:
Example: |
30-230 |
|
status |
The request status. Possible values:
Example: |
30-330 |
|
errors |
Array of error messages. | 30-430 |
|
ErrorItem |
The object with information about a single error. | 30-4-130-4 |
|
code |
Error code. Example: |
30-4-1-130-4-1 |
|
message |
A message that explains the error cause. Example: |
30-4-1-230-4-1 |
|
field |
The parameter in which the error occurred if it was defined | 30-4-1-330-4-1 |
|
token |
Token of the customer bank card. The token is generated automatically when a successful payment is performed if the appropriate option is enabled. | 40 |
|
token_created_at |
The date and time the token was generated. Example: |
50 |
|
token_status |
Token status. Example: |
60 |
|
signature |
Callback signature | 70 |
Figure: Example of the data from a callback with the token and some related information
{
"project_id": 12,
"customer": {
"id": "cust_123"
},
"request": {
"id": "3c7f53fdbb5b8c96f9707457d75f",
"action": "tokenize",
"status": "success"
},
"token": "2f0e75befacca30623354f9ffb0f44a80bee52982c39727b85039ef6f64309a1",
"token_created_at": "2017-11-28 13:30:57",
"token_status": "active",
"signature": "\/gmTHcy5wvrFD4ISuWEiV8+nOa3aqnLnyJ\/AupOYkl9S5eLJZ"
}