Update Payment Method

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

ParameterTypeDescription
recaptchastring

The recaptcha token (can be invisible recaptcha).

Response fields

AttributesTypeDescription
pending_paymentinteger

The ID of the PendingPayment instance.

stripe_client_secretstring

The client_secret for the Stripe SetupIntent.

stripe_setup_intentstring

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": "...",
}