---
title: "Override one rule's answer for this business"
description: "A field left ABSENT is not written; a field set to null CLEARS that part and hands the rule's own answer back."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/payments/override-one-rule-s-answer-for-this-business"
---
# Override one rule's answer for this business

> A field left ABSENT is not written; a field set to null CLEARS that part and hands the rule's own answer back.

<api-operation method="PATCH" path="/v1/businesses/{biz}/decline_rules/{rule}">
<template v-slot:docs="">

A field left ABSENT is not written; a field set to `null` CLEARS that part and hands the rule's own answer back. The two are different intents and one optional field cannot express both.

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Business id (biz_…)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        rule
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The decline rule's id.
    </td>
  </tr>
</tbody>
</table>

## Headers

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        Idempotency-Key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Safely retry writes — repeats return the original response. If a write FAILED after it had already taken effect, that failure is what repeats: the key is spent, and a new attempt needs a new key.
    </td>
  </tr>
</tbody>
</table>

## Body

The request body is optional.

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        retriable
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Whether a charge that fails under this rule can succeed on a retry.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        message
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      The message shown for a failure under this rule.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        exposed_to_payer
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Whether the message is shown to the payer.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gateway_account
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Scope this setting to one account.
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        decline_rule
      </code>
      
      . One of <code>
        decline_rule
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      e.g. stripe.code.expired_card
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        overridable
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      False for a code we recognise that no RULE names. Its answer is still real and a code-level override still governs it; there is simply no rule id to aim a rule-level PATCH at, and one aimed there answers 404.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        gateway
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The gateway this rule applies to. One of <code>
        stripe
      </code>
      
      , <code>
        paypal
      </code>
      
      , <code>
        razorpay
      </code>
      
      , <code>
        gocardless
      </code>
      
      , <code>
        braintree
      </code>
      
      , <code>
        cashfree
      </code>
      
      , <code>
        authorizenet
      </code>
      
      , <code>
        adyen
      </code>
      
      , <code>
        checkoutcom
      </code>
      
      , <code>
        mollie
      </code>
      
      , <code>
        square
      </code>
      
      , <code>
        payu
      </code>
      
      , <code>
        cybersource
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        matches
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The predicate that selects this rule. First match wins.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        code
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Our canonical code, e.g. expired_card
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        error_id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The canonical code on the namespaced axis: gateway.<family>.<code>, using Eleven families, so an imported book aggregates with ours.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        family
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The rule's decline family.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        built_in
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The rule's built-in behavior.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        override
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      Null until this business changes something.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        effective
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      What collection will actually do.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Success
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        400
      </code>
    </td>
    
    <td>
      Invalid body
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        404
      </code>
    </td>
    
    <td>
      No such business, rule, or gateway account
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        409
      </code>
    </td>
    
    <td>
      Idempotency-Key conflict — the key is already in flight, or was reused with a different request payload.
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl -X PATCH "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/decline_rules/mkr_XXXXXXXXXXXX01" \
  -H "Authorization: Bearer $TMBILLING_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "retriable": false,
    "message": "Requested by the customer."
  }'
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "object": "decline_rule",
  "id": "stripe.code.expired_card",
  "overridable": false,
  "gateway": "stripe",
  "matches": {
    "field": "email",
    "op": "eq",
    "value": "West"
  },
  "code": "expired_card",
  "error_id": "stripe.code.expired_card",
  "family": "authentication",
  "built_in": {
    "retriable": false,
    "message": "Requested by the customer.",
    "exposed_to_payer": false
  },
  "override": {
    "retriable": false,
    "message": "Requested by the customer.",
    "exposed_to_payer": false,
    "updated_by": "maya@example.com",
    "updated_at": "2026-03-14T09:30:00Z",
    "level": "rule"
  },
  "effective": {
    "retriable": false,
    "message": "Requested by the customer.",
    "exposed_to_payer": false
  }
}
```

```json [400 Bad Request]
{
  "error": {
    "type": "invalid_request_error",
    "message": "Invalid body"
  }
}
```

```json [404 Not Found]
{
  "error": {
    "type": "invalid_request_error",
    "message": "No such business, rule, or gateway account"
  }
}
```

```json [409 Conflict]
{
  "error": {
    "type": "idempotency_error",
    "message": "Idempotency-Key conflict — the key is already in flight, or was reused with a different request payload."
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
