You can create a token with arbitrary user parameters. You send these parameters when obtaining the token and receive them back after a successful payment. A token can only contain parameters either described in this document or predefined by you.
If any parameter is sent in the wrong format or has the wrong type, no token will be issued. You will receive a 422 HTTP code with the error description in the JSON body. In extended_message
you will receive an information what exact parameters have been sent incorrectly.
Notice
This API call does not contain the project_id
path-parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.
object Puedes transmitir parámetros adicionales en el token en el objeto | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Objeto que contiene los detalles de la compra. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Ajustes del proyecto personalizados. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Datos del usuario. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Creado.
Entidad no procesable.
{- "purchase": {
- "checkout": {
- "amount": 10,
- "currency": "USD"
}, - "subscription": {
- "gift": {
- "email": "recipient_email@email.com",
- "recipient": "test_recipient_v1"
}
}
}, - "settings": {
- "currency": "USD",
- "language": "en",
- "project_id": 16184,
- "ui": {
- "components": {
- "virtual_currency": {
- "custom_amount": true
}
}, - "desktop": {
- "virtual_item_list": {
- "button_with_price": true,
- "layout": "list"
}
}, - "size": "medium"
}
}, - "user": {
- "age": 19,
- "country": {
- "allow_modify": true,
- "value": "US"
}, - "email": {
- "value": "john.smith@mail.com"
}, - "id": {
- "value": "user_2"
}, - "name": {
- "value": "John Smith"
}
}
}
{- "token": "eop57k1boA7nnYPtewZ6KEXJyJADEwRT"
}