Rotate a webhook endpoint signing secret
curl --request POST \
--url https://api.simplepay.mx/v1/webhook_endpoints/{id}/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-sp-step-up-token: <x-sp-step-up-token>' \
--data '
{
"overlap_seconds": 3600
}
'const options = {
method: 'POST',
headers: {
'x-sp-step-up-token': '<x-sp-step-up-token>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({overlap_seconds: 3600})
};
fetch('https://api.simplepay.mx/v1/webhook_endpoints/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/webhook_endpoints/{id}/rotate-secret"
payload = { "overlap_seconds": 3600 }
headers = {
"x-sp-step-up-token": "<x-sp-step-up-token>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)POST
/
v1
/
webhook_endpoints
/
{id}
/
rotate-secret
Rotate a webhook endpoint signing secret
curl --request POST \
--url https://api.simplepay.mx/v1/webhook_endpoints/{id}/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-sp-step-up-token: <x-sp-step-up-token>' \
--data '
{
"overlap_seconds": 3600
}
'const options = {
method: 'POST',
headers: {
'x-sp-step-up-token': '<x-sp-step-up-token>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({overlap_seconds: 3600})
};
fetch('https://api.simplepay.mx/v1/webhook_endpoints/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.simplepay.mx/v1/webhook_endpoints/{id}/rotate-secret"
payload = { "overlap_seconds": 3600 }
headers = {
"x-sp-step-up-token": "<x-sp-step-up-token>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Short-lived, single-use SimplePay recent-auth proof bound to this mutation and Idempotency-Key.
Required string length:
32 - 4096Required string length:
8 - 255Path Parameters
Pattern:
^spwe_[a-z0-9]{32}$Body
application/json
Required range:
300 <= x <= 86400Response
2XX
Forwarded to the owning origin Worker.
Last modified on September 1, 2026