python - Payment method token is invalid when I create subscription in Braintree -
i want create subscription using braintree using python , js. error:
'errors': <braintree.errors.errors object @ 0xb0d157cc>, 'transaction': none, 'subscription': none, 'message': 'payment method token invalid.', 'credit_card_verification': none, 'merchant_account': none
the way how create token , subscription
token = braintree.clienttoken.generate({ "customer_id": self.braintree_customer.id }) create_subscriptions = braintree.subscription.create({ "payment_method_token": token, "plan_id": self.plan_id })
the subscription needs payment method token, not client token:
https://developers.braintreepayments.com/javascript+php/reference/request/client-token/generate
Comments
Post a Comment