Tokenization
Create a token for deposit. This is the token that'll be used when trying to increment the balance using either gateways.
Deposit is a way to increment balance using either the CreditCard or CashPlus gateway. The balance is then incremented based on the amount specified when first creating the token.
Parameters
| Parameter | Type | Description |
|---|---|---|
amount | integer required | Amount to buy. |
currency | string required | Currency tied to the amount. Should be 3 characters long. |
Request
Endpoint: https://youcanpay.com/api/deposits/tokenizeMethod: POST
bash
$ curl --location --request POST 'https://youcanpay.com/api/deposits/tokenize' \
--form 'amount="500"' \
--form 'currency="MAD"' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN_eyJpc3...'Response
json
{
"token_id": "gh3pod873-2ca5-40e8-fg62-hk8r23nqx"
}