Create a Payment Token
This sample shows how to save a payment method and generate a token using a simple Javascript call.
This implementation allows you to create your own form and use the dhango Javascript to send the payment information to the dhango API for tokenization. While tokenization is supported beyond just credit/debit cards, this is a simple example that only tokenizes one payment method.
Upon sucessful tokenization, the token Id is displayed below the form. In a real-world example, your application would submit only the toke to your server for saving. You can also use that token Id to execute a GET /tokens/{id} against the dhango API to gather other information such as the last 4 digits, the card brand, etc. This information can be shown to the user the next time they would like to use the payment method.