Weav Docsv1

API reference / Webhooks

Repost a payment's latest webhook

POST/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 429 with a Retry-After header. 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 its data stay 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_idstringRequired
    Weav's payment reference.
    Pattern: ^PY[0-9A-Z]{12}$

Headers

  • AuthorizationstringRequired
    Bearer plus your API key. See Authentication.

Responses

202 Accepted

Queued for repost (code 2020200).

What data holds
  • eventstring
    One of: PAYMENT_COMPLETED PAYMENT_FAILED PAYMENT_CANCELLED PAYMENT_REVERSED PAYMENT_REFUNDED CHECKOUT_COMPLETED CHECKOUT_EXPIRED PAYMENT_METHOD_SAVED PAYMENT_METHOD_FAILED PAYMENT_METHOD_REMOVED WITHDRAWAL_COMPLETED WITHDRAWAL_FAILED
  • reference_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.

POST

Try it: Repost a payment's latest webhook

Test mode
Authorization
Path
cURL

Uses $WEAV_API_KEY, never your key. Paste it into a terminal, or import it into Postman.

Response

Send the request to see Weav's answer here.

curl -X POST https://api.weavpayments.com/v1/payments/PY7K3Q9M2X4TBA/webhooks/repost \
    -H "Authorization: Bearer $WEAV_API_KEY"
{
    "code": "2020200",
    "success": true,
    "message": "Webhook queued for repost",
    "data": {
        "event": "PAYMENT_COMPLETED",
        "reference_id": "PY7K3Q9M2X4TBA"
    }
}