Skip to main content

Update Web Client Settings

Updates the web client settings of the project

HTTP Request

PATCH/api/settings/web_client

Authorization

Authorization

  • Required: Yes
  • Permission: Staff with WebClientSettingsPermission or Admin
  • Permission Code: 1032
  • Authentication: Token authentication

Request Body

FieldTypeRequiredDescription
web_client_failed_payment_urlURLNoURL for failed payment redirects (default: "http://localhost:8000/failed_payment")
web_client_successful_payment_urlURLNoURL for successful payment redirects (default: "http://localhost:8000/successful_payment")

Example Requests

1import requests
2
3# Update web client settings
4response = requests.patch('http://www.example.com/api/settings/web_client', 
5  headers={'Authorization': 'Token <your_api_key>'},
6  json={
7      "web_client_failed_payment_url": "http://www.example.com/failed_payment",
8      "web_client_successful_payment_url": "http://www.example.com/successful_payment"
9  }
10)
11print(response.json())

Response Fields

FieldTypeDescription
web_client_failed_payment_urlURLURL for failed payment redirects (default: "http://localhost:8000/failed_payment")
web_client_successful_payment_urlURLURL for successful payment redirects (default: "http://localhost:8000/successful_payment")

Example Response

{
"web_client_failed_payment_url": "http://example.com/failed_payment",
"web_client_successful_payment_url": "http://example.com/successful_payment"
}

Notes

  • Both fields are URL fields, so valid url must be provided