Weav Docsv1

API reference / Payment methods

Remove a payment method

DELETE/v1/payment-methods/{id}

Removes the card at the card processor too, so nobody can charge it again (PAYMENT_METHOD_REMOVED). Removing one already removed is fine. 409 4090401 when the processor can't remove it right now (retry shortly).

Path parameters

  • idstringRequired

Headers

  • AuthorizationstringRequired
    Bearer plus your API key. See Authentication.

Responses

200 OK

Payment method removed (code 2000401).

What data holds
  • payment_methodobject
    16 fields in payment_method
    • idstring
    • typestring
      One of: CARD
    • statusstring
      PENDING until your customer saves it and their bank confirms it; ACTIVE (chargeable); FAILED when that never happens; REMOVED.
      One of: PENDING ACTIVE FAILED REMOVED
    • customerobject
      3 fields in customer
      • idstring
      • namestring | null
      • emailstring | null
    • cardobject | null
      Once saved. Never the card number.
      4 fields in card
      • brandstring
        From the card processor.
        One of: VISA MASTERCARD JCB
      • last4string
      • exp_monthinteger | null
        The expiry month your customer typed. Ask them for a new card before it passes (expires_by on the list).
        At least 1At most 12
      • exp_yearinteger | null
        Four digits.
    • labelstring | null
      To show your customer.
    • next_actionobject
      2 fields in next_action
      • typestring | null
        One of: REDIRECT
      • checkout_urlstring (uri) | null
        Weav's save page, while PENDING.
    • success_urlstring (uri) | null
    • cancel_urlstring (uri) | null
    • webhook_urlstring | null
    • expires_atstring (date-time) | null
      When the save link ends, while PENDING.
    • activated_atstring (date-time) | null
    • failed_atstring (date-time) | null
    • removed_atstring (date-time) | null
    • created_atstring (date-time)
    • updated_atstring (date-time)

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).

DELETE

Try it: Remove a payment method

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 DELETE https://api.weavpayments.com/v1/payment-methods/PM8K2Q7X9KBAT4MZ3N \
    -H "Authorization: Bearer $WEAV_API_KEY"
{
    "code": "2000401",
    "success": true,
    "message": "Payment method removed",
    "data": {
        "payment_method": {
            "id": "PM8K2Q7X9KBAT4MZ3N",
            "type": "CARD",
            "status": "REMOVED",
            "customer": {
                "id": "USER-123",
                "name": "Juan dela Cruz",
                "email": "juan@example.com"
            },
            "card": {
                "brand": "VISA",
                "last4": "1381",
                "exp_month": 12,
                "exp_year": 2030
            },
            "label": "Visa •••• 1381",
            "next_action": {
                "type": null,
                "checkout_url": null
            },
            "success_url": "https://shop.example/account/cards",
            "cancel_url": "https://shop.example/account",
            "webhook_url": null,
            "expires_at": null,
            "activated_at": "2026-11-02T10:14:20+08:00",
            "failed_at": null,
            "removed_at": "2026-11-20T09:00:00+08:00",
            "created_at": "2026-11-02T10:12:00+08:00",
            "updated_at": "2026-11-20T09:00:00+08:00"
        }
    }
}