Update payment method
You can use this API to update your payment method. The update payment method API uses only recaptcha
field.
This API endpoint requires recaptcha validation.
Request fields
Parameter | Type | Description |
---|---|---|
recaptcha | string | The recaptcha token (can be invisible recaptcha). |
Response fields
Attributes | Type | Description |
---|---|---|
pending_payment | integer | The ID of the PendingPayment instance. |
stripe_client_secret | string | The |
stripe_setup_intent | string | The ID of the Stripe SetupIntent. |
Request & Response
POST https://proxy.webshare.io/api/v2/payment/method/
update_payment_method.py
import requests
response = requests.post(
"https://proxy.webshare.io/api/v2/payment/method/",
json={
"recaptcha": "...",
},
headers={"Authorization": "Token "},
)
response.json()
The commands above return JSON structured like this:
response.json
{
"pending_payment": 3,
"stripe_client_secret": "...",
"stripe_payment_intent": "...",
}