---
updatedAt: 2026-06-23T16:55:19.000Z
agentTools:
  projectIndex: https://sticky.readme.io/llms.txt
---

# Dunning v4

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Sticky Recovery Production and Sandbox",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://api.sticky.io",
      "description": "Production"
    },
    {
      "url": "https://sandbox-api.sticky.io",
      "description": "Sandbox"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key",
        "description": "API key used to authenticate requests."
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/dunning-hub/v4/dunning": {
      "post": {
        "description": "",
        "operationId": "post_dunning-hubv3dunning",
        "responses": {
          "200": {
            "description": ""
          },
          "400": {
            "description": "400",
            "content": {}
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "smartdunningProfileId",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Optional Smart Dunning Profile Id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "description": "A unique identifier specific to the dunning session. Automatically generated if not provided. This should be submitted in the request to obtain subsequent retry attempts. It informs the system what retry attempt number the dunning session is on."
                  },
                  "bin": {
                    "type": "string",
                    "description": "The Payment Account Number (PAN) or Bank Identification Number (BIN) is linked to the payment method and should consist of a minimum of 6 digits when utilized.\n\n"
                  },
                  "paymentProvider": {
                    "type": "string",
                    "description": "The payment provider or gateway used for the transaction. e.g., NMI, Stripe"
                  },
                  "declineCode": {
                    "type": "string",
                    "description": "The reason provided by the payment provider for the payment failure. The parameter is used to input the **decline reason string response** from the gateway. Should be populated with the **decline reason as a string** response. This helps in accurately capturing the reason for payment failure as provided by the payment provider. e.g., Do Not Honor, Insufficient Funds"
                  },
                  "networkAdviceCode": {
                    "type": "string",
                    "description": "An issuer-provided code that advises whether or not a declined transaction should be retried. Primarily used for Mastercard, this value helps optimize retry behavior by indicating if a retry should be avoided, delayed, or attempted using a different method."
                  },
                  "processorDeclineCode": {
                    "type": "string",
                    "description": "A numeric value (e.g., “51”, “05\") returned by the payment processor, not the gateway, indicating the standardized reason for decline per ISO 8583 (e.g., “51” = Insufficient Funds, “05\" = Do Not Honor)."
                  },
                  "amount": {
                    "type": "string",
                    "description": "Actual value of the payment that is being processed."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 Code for the type of currency in which the payment is being made. e.g., USD, CAD."
                  },
                  "email": {
                    "type": "string",
                    "description": "The email address associated with the payment transaction."
                  },
                  "phone": {
                    "type": "string",
                    "description": "The phone number associated with the payment transaction."
                  },
                  "gatewayTransactionId": {
                    "type": "string",
                    "description": "Gateway transaction ID of the original decline transaction used for payment recovery."
                  },
                  "paymentProfileId": {
                    "type": "string",
                    "description": "Identifier for the payment gateway profile to be used for recovery attempts."
                  },
                  "responseCode": {
                    "type": "string",
                    "description": "The decline response code returned by the payment gateway, indicating the specific reason the transaction was rejected."
                  },
                  "avsResultCode": {
                    "type": "string",
                    "description": "The Address Verification Service (AVS) result code returned by the gateway or processor, indicating whether the billing address provided matches the information on file with the card issuer."
                  },
                  "cvvResultCode": {
                    "type": "string",
                    "description": "The Card Verification Value (CVV) result code returned by the gateway or processor, indicating whether the CVV provided matches the value on file with the card issuer."
                  },
                  "cavvResultCode": {
                    "type": "string",
                    "description": "The Cardholder Authentication Verification Value (CAVV) result code returned by the gateway or processor, typically used for 3-D Secure transactions to indicate the authentication outcome."
                  },
                  "processorName": {
                    "type": "string",
                    "description": "The name of the payment processor handling the transaction."
                  },
                  "customerId ": {
                    "type": "string",
                    "description": "Unique identifier for the customer."
                  },
                  "gatewayPaymentProfileId": {
                    "type": "string",
                    "description": "Unique identifier for the tokenized payment method."
                  },
                  "retryHoldUntilUTC": {
                    "type": "string",
                    "description": "An ISO 8601 UTC timestamp representing the earliest time a retry may be recommended. When provided, the recommendation engine guarantees the returned retry datetime will be strictly after this value. If omitted, standard retry logic applies. Format: YYYY-MM-DDTHH:mm:ssZ\nExample: \"retryHoldUntilUTC\": \"2025-08-10T18:00:00Z\""
                  },
                  "externalId": {
                    "type": "string",
                    "description": "An optional merchant-defined reference ID used to identify the transaction externally."
                  },
                  "priorAttemptCount": {
                    "type": "integer",
                    "description": "Indicates how many recovery attempts were already made by the merchant before sending the transaction to Sticky."
                  },
                  "priorDeclines ": {
                    "type": "array",
                    "description": "Captures the reasons for the decline from previous recovery attempts performed by the merchant.",
                    "items": {
                      "properties": {
                        "declineReason": {
                          "type": "string",
                          "description": "Code or reason provided by the payment provider indicating the reason for payment failure. (e.g. \"Do Not Honor\" or \"Insufficient Funds\")"
                        },
                        "bin": {
                          "type": "string",
                          "description": "The Payment Account Number (PAN) or Bank Identification Number (BIN) is linked to the payment method and should consist of a minimum of 6 digits when utilized."
                        },
                        "responseCode": {
                          "type": "string",
                          "description": "Gateway Response Code indicating the reason for the transaction decline."
                        },
                        "avsResultCode": {
                          "type": "string",
                          "description": "Address Verification System (AVS) result code for the declined transaction."
                        },
                        "cvvResultCode": {
                          "type": "string",
                          "description": "Card Verification Value (CVV) result code for the declined transaction."
                        },
                        "cavvResultCode": {
                          "type": "string",
                          "description": "Cardholder Authentication Verification Value (CAVV) result code for the declined transaction."
                        },
                        "processorName": {
                          "type": "string",
                          "description": "Name of the payment processor handling the declined transaction."
                        },
                        "timeStampUTC": {
                          "type": "string",
                          "description": "UTC timestamp indicating when the original transaction was declined, in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ), e.g., 2026-06-19T21:05:00Z."
                        },
                        "networkAdviceCode": {
                          "type": "string",
                          "description": "An issuer-provided code that advises whether or not a declined transaction should be retried. Primarily used for Mastercard, this value helps optimize retry behavior by indicating if a retry should be avoided, delayed, or attempted using a different method."
                        },
                        "processorDeclineCode": {
                          "type": "string",
                          "description": "A numeric value (e.g., “51”, “05\") returned by the payment processor, not the gateway, indicating the standardized reason for decline per ISO 8583 (e.g., “51” = Insufficient Funds, “05\" = Do Not Honor)."
                        }
                      },
                      "type": "object"
                    }
                  },
                  "timestampUTC": {
                    "type": "string",
                    "description": "UTC timestamp indicating when the original transaction was declined, in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ), e.g., 2026-06-19T21:05:00Z."
                  },
                  "billingZipCode": {
                    "type": "string",
                    "description": "The ZIP or postal code associated with the customer’s billing address and payment method."
                  }
                }
              }
            }
          }
        },
        "summary": "Dunning v4"
      }
    }
  }
}
```