Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Get Stripe Token using client-side tokenization
Forum Updated to NodeBB v4.3 + New Features

Get Stripe Token using client-side tokenization

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 884 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bhupi012
    wrote on last edited by
    #1

    I want to get stripe's one-time use token.What could be the best way for me to get token without making api call using my publishable key. Can i use https://stripe.com/docs/stripe.js? for getting token into my Qt c++ mobile applicaiton for android and ios or If it is possible to use stripe's android and ios sdks to get token in my application, has anyone done this before. I am not clear on this.

    raven-worxR 1 Reply Last reply
    0
    • B bhupi012

      I want to get stripe's one-time use token.What could be the best way for me to get token without making api call using my publishable key. Can i use https://stripe.com/docs/stripe.js? for getting token into my Qt c++ mobile applicaiton for android and ios or If it is possible to use stripe's android and ios sdks to get token in my application, has anyone done this before. I am not clear on this.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @bhupi012
      As i said in another post already you should use QNetworkAccessManager for REST-API calls.
      The CURL examples are most appropriate for you.
      In order to use their API you of course need to register your application to get a dev-token (like for most other public webservices) and provide this token on each call.
      It seems they use the token simply as a username (HTTP auth).

      Using QNetworkAccessManager you can do this to provide HTTP AUTH credentials automatically:

      m_NAM = new QNetworkAccessManager(this);
      connect ( m_NAM, &QNetworkAccessManager::authenticationRequired, this, &MyClass::onAuthenticationRequired );
      
      ....
      
      void MyClass::onAuthenticationRequired(QNetworkReply *reply, QAuthenticator * authenticator)
      {
          authenticator->setUser( "<<<DEV-TOKEN>>>" );
      }
      

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      B 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @bhupi012
        As i said in another post already you should use QNetworkAccessManager for REST-API calls.
        The CURL examples are most appropriate for you.
        In order to use their API you of course need to register your application to get a dev-token (like for most other public webservices) and provide this token on each call.
        It seems they use the token simply as a username (HTTP auth).

        Using QNetworkAccessManager you can do this to provide HTTP AUTH credentials automatically:

        m_NAM = new QNetworkAccessManager(this);
        connect ( m_NAM, &QNetworkAccessManager::authenticationRequired, this, &MyClass::onAuthenticationRequired );
        
        ....
        
        void MyClass::onAuthenticationRequired(QNetworkReply *reply, QAuthenticator * authenticator)
        {
            authenticator->setUser( "<<<DEV-TOKEN>>>" );
        }
        
        B Offline
        B Offline
        bhupi012
        wrote on last edited by bhupi012
        #3

        @raven-worx I do not want to transfer user card-details in a unsecured way https://stripe.com/docs/api/curl#create_card_token to generate token. By token, I am referring here token which will be used to make a payment transaction and that token will be retrieved after making an api request with your app registered token(publishable key).

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved