API reference / Webhooks
Repost a payment's latest webhook
/v1/payments/{reference_id}/webhooks/repost Sends the payment's latest webhook again, to your current webhook URL, signed with your active key and a fresh sent_at. Only finished deliveries can be reposted. Once every 30 seconds per payment (4290201) and up to 20 a minute per account (4290202), API and dashboard together; to check a status, retrieve the payment instead. Proposed.
To check a payment’s status, retrieve the payment. It’s read-only and always has the latest status. A repost sends a signed request to your server each time, so it’s limited. Statuses can’t be set by hand: Weav confirms every result with the provider, and a late one still updates the payment and sends its webhook.
- Only a finished delivery can be reposted. If Weav is still retrying it, you get
409. - Once every 30 seconds per payment, and up to 20 a minute for your account in each mode, through the API and the dashboard together. Over either, you get
429with aRetry-Afterheader. Weav already retries every webhook for about 7 days (see Retries), so there’s never a need to repost in bulk. - The repost is signed with your active signing key and gets a fresh
sent_at. The event and itsdatastay the same, so handle it idempotently, as with any webhook. - Every attempt shows under Developers in the dashboard, where you can also repost with one click.
Errors
A payment with no webhook yet returns 404. A webhook still being retried returns 409 with code 4090201. Reposting the same payment within 30 seconds returns 429 with code 4290201; more than 20 reposts a minute for your account in one mode returns 429 with code 4290202.
Path parameters
reference_idstringRequiredWeav's payment reference.Pattern: ^PY[0-9A-Z]{12}$
Headers
AuthorizationstringRequiredBearerplus your API key. See Authentication.
Responses
202 Accepted
Queued for repost (code 2020200).
What data holds
eventstringOne of:PAYMENT_COMPLETEDPAYMENT_FAILEDPAYMENT_CANCELLEDPAYMENT_REVERSEDPAYMENT_REFUNDEDCHECKOUT_COMPLETEDCHECKOUT_EXPIREDPAYMENT_METHOD_SAVEDPAYMENT_METHOD_FAILEDPAYMENT_METHOD_REMOVEDWITHDRAWAL_COMPLETEDWITHDRAWAL_FAILEDreference_idstring
401 Unauthorized
Missing, malformed or unknown API key (code 4010000).
403 Forbidden
The key can't make this request (code 4030000): an address outside the key's IP allowlist, a live key before your live mode is on, or an account that isn't active. A live key sent from a browser is refused (code 4030001): keep live keys on your server.
404 Not Found
Not found in this mode for your account (code 4040000).
409 Conflict
The request conflicts with the current state, e.g. an Idempotency-Key reused with a different body (4090001), a request still in progress (4090002), a payment that can't be canceled (4090101) or can't be canceled at the provider yet (4090102, retry shortly), or a webhook still being sent (4090201).
429 Too Many Requests
Rate limited (code 4290000). Wait for Retry-After seconds.