---
updatedAt: 2025-09-29T21:37:30.000Z
agentTools:
  projectIndex: https://docs.gratifypay.com/llms.txt
---

# Delete a merchant

Deletes a merchant entity identified by the `merchantId`.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Gratify BNPL API",
    "description": "# Overview\nThis API is used by Gratify payment partners to create integrations between the Gratify backend and partner client environments.  The BNPL API serves as a bridge between Gratify's backend system and our partners systems.\n\nAs a technical manager or systems architect, understanding the relationships between Gratify Consumers, Merchants, PaymentProviders and other key entities is helpful for effectively utilizing the Gratify API. \n\n- **Consumers:** Consumers are end users loan holders. They can access various payment options, including the Buy Now Pay Later (BNPL) scheme and immediate payment. Consumers are required to have a valid email address, mobile number, and supported ecommerce payment method such as a credit card or ACH bank account. The API allows API clients to create and retrieve consumer entities, update consumer details, manage consumer payment methods, and delete consumers.\n- **Merchants:** Merchants are businesses that wish to offer loans and payment services to their customers. The API enables API clients to manage merchant details, create new merchant entities, retrieve specific merchant information, and list available merchants. API clients can also retrieve all orders associated with a specific merchant and process new orders.\n- **PaymentProviders**: PaymentProviders are the financial institutions or services that handle payment transactions. The API supports integrations with different payment providers and allows API clients to retrieve payment gateways associated with a tenant, manage payment methods such as credit cards and bank accounts, and handle payment-related operations for orders.  Each payment provider has a group of associated Merchants.\n- **Orders:** Orders are created by merchants and represent a purchase of goods or services by a consumer. The API allows API clients to create new orders, retrieve specific orders, and list orders associated with a specific merchant or consumer.\n- **Payments:** Payments are created when an order is processed. The API enables clients to retrieve payments associated with a specific order, retrieve specific payments, and perform payment-related operations such as adjustments and refunds.\n- **PaymentMethods:** PaymentMethods are the payment instruments used by consumers to pay for orders. The API allows API clients to create and retrieve payment methods, update payment method details, and delete payment methods.\n\n# Key Use Cases\nWith an understanding of the Gratify entities, the Gratify BNPL API provides the solution the following use cases.\n\n## Use Case: Whitelabeling Consumer Checkout\nGratify Partners can fully customize and whitelabel their own Consumer Checkout experience. This includes branding the checkout flow with their own logo, colors, and design elements. API clients can also customize the payment options available to consumers, such as Buy Now Pay Later (BNPL) or immediate payment, and enhance the overall user experience.\n\n## Use Case: Streamlining Back-Office and Merchant Onboarding\nGratify Partners have the ability to whitelabel the back-office tools , merchant reporting views or merchant onboarding processes. This allows Partner businesses to provide their own branding and user interface for their merchants while integrating with the Gratify platform.  API clients can customize the merchant onboarding flow, including the collection of required information and verification processes, to align with their own branding and requirements. \n\n## Use Case: Other Custom Integrations\nAPI clients can build custom integrations between their own systems and the Gratify platform.  This includes integrating with partner systems such as CRM, ERP, or order management systems to optimize data exchange and provide a seamless experience for merchants, consumers and Partner business users.\n\n# Lets Get Started!\nBy utilizing the Gratify BNPL API, clients can effectively whitelabel the BNPL Consumer Checkout experience, streamline the back-office tools and merchant onboarding process, and create custom integrations with their client systems. \n\nThis enables businesses to provide a branded and tailored experience to their merchants and consumers while leveraging the capabilities of the Gratify platform.\n\nContact [Info@GratifyPay.com](mailto:Info@GratifyPay.com) to get started!\n",
    "version": "2.0.1"
  },
  "tags": [
    {
      "name": "Merchants",
      "description": "Operations related to merchants"
    }
  ],
  "servers": [
    {
      "url": "https://api.gratifypay.com/bnpl/2.0",
      "description": "Gratify BNPL API"
    }
  ],
  "security": [
    {
      "GratifyPartnerAPIAuth": []
    }
  ],
  "paths": {
    "/merchants/{merchantId}": {
      "delete": {
        "summary": "Delete a merchant",
        "description": "Deletes a merchant entity identified by the `merchantId`.\n",
        "tags": [
          "Merchants"
        ],
        "parameters": [
          {
            "name": "merchantId",
            "description": "Unique string identifier for the Gratify merchant",
            "example": "merchant_fnaSF322facnNNf3s12",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The merchant was successfully deleted",
            "content": {
              "application/json": {
                "example": {
                  "result": "ok"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "5XX": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GratifyAPIError": {
        "description": "An API error message structure",
        "required": [
          "errorCode",
          "errorMessage"
        ],
        "type": "object",
        "properties": {
          "errorCode": {
            "description": "Short name for the error",
            "type": "string"
          },
          "errorMessage": {
            "description": "Detailed error message",
            "type": "string"
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request is malformed or input is not valid. Double check your request message body is to specification and try again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GratifyAPIError"
            },
            "example": {
              "errorCode": 400,
              "errorMessage": "Bad Request Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unuahtorized access to the Gratify API. Double check your API credentials and try again.",
        "headers": {
          "WWW_Authenticate": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GratifyAPIError"
            },
            "example": {
              "errorCode": 401,
              "errorMessage": "Unauthorized Access Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "The specified resource was not found.  Double check your URL and version strings try again.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GratifyAPIError"
            },
            "example": {
              "errorCode": 404,
              "errorMessage": "Object now found"
            }
          }
        }
      },
      "ServerError": {
        "description": "An unexpected error occurred at the Gratify Server",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/GratifyAPIError"
            },
            "example": {
              "errorCode": 500,
              "errorMessage": "An unknown error has occurred. Please try again later"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "GratifyPartnerAPIAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "The Gratify BNPL API uses standardized Basic Auth over HTTPS for authentication of all API calls.  Provide you Gratify Partner ID as the username and your API Shared Secret as the password."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```