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
The token you obtain after calling this API method can be used only for authorizing other requests. You can use this token to open the payment UI only if you integrated the Subscriptions product.
object User details. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Custom project settings. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object Object containing purchase details. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
object You can pass additional parameters in the token in the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Created.
Unprocessable Entity.
{- "settings": {
- "currency": "USD",
- "language": "en",
- "project_id": 16184,
- "ui": {
- "size": "medium"
}
}, - "user": {
- "email": {
- "value": "email@example.com"
}, - "id": {
- "value": "user_2"
}, - "name": {
- "value": "John Smith"
}
}
}
{- "token": "eop57k1boA7nnYPtewZ6KEXJyJADEwRT"
}