This example shows how to collect tokens using our hosted tokenization buttons. We take care of the onboarding process at the wallet provider and offer you an easy and simple way to collect card details stored in the wallets of the cardholder. See the documentation.

Execute the following code in your terminal:
curl 'https://api.sandbox.datatrans.com/v1/transactions/secureFields/tokenize' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic MTEwMDAyNTgzNTozY29mTjNNeFhhQkg3VWw4' \
  --data '{
      "applePay": {
          "merchantName": "Sample merchant",
          "currency": "CHF",
          "country": "CH"
      },
      "googlePay": {
          "currency": "CHF"
      }
  }'
Provide the resulting transactionId: