代码之家  ›  专栏  ›  技术社区  ›  Praveen Kumar Krupa Suthar

通过API POSTMAN在Stripe中创建卡片令牌

  •  0
  • Praveen Kumar Krupa Suthar  · 技术社区  · 7 年前

    邮递员资料

    Request Method: POST,
    Request URL: https://api.stripe.com/v1/tokens
    

    标题数据

    Content-Type:application/x-www-form-urlencoded
    Authorization:Bearer SECRET_KEY
    

    身体 x-www-form-url编码

    card:{"exp_month":12,"exp_year":2020,"number":'4242424242424242',"cvc":'123'}
    

    响应(输出)

    {
        "error": {
            "message": "You must pass full card details to create a token.",
            "type": "invalid_request_error"
        }
    }
    

    标题

    enter image description here

    身体

    enter image description here

    0 回复  |  直到 7 年前
        1
  •  13
  •   Danny Dainton    7 年前

    我从 Stripe 把文件交给邮递员。此请求应如下所示。

    Postman

    header

    仅供参考 key/value

    Syntax