> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chargeblast.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enroll Merchant

> Enroll a merchant in an alert or refund program. Send a `program` discriminator with that program's fields. `ethoca` and `cdrn` require `descriptors`. `rdr` requires `arns` and/or equal-length paired `bins`/`caids` (its `bins`/`caids` are persisted as queryable RDR descriptors). `amex` and `discover` require legal name, DBA, address, and their SE identifiers (they now persist a `Pending` descriptor you can poll). Enrollment files a request; records start `Pending` and become `Enrolled` once the provider-side enrollment confirms. Pass `merchant_id` to target a specific merchant, or omit it to create a brand-new merchant. Poll `GET /api/enrollment_status` for per-program state.



## OpenAPI

````yaml post /api/enroll_merchant
openapi: 3.0.1
info:
  title: Chargeblast API
  version: 0.1.0
servers:
  - url: https://api.chargeblast.com
security: []
tags:
  - name: Credit Requests
  - name: Sync Data
  - name: Alerts
  - name: Disputes
  - name: Enrollment
paths:
  /api/enroll_merchant:
    post:
      tags:
        - Enrollment
      summary: Enroll Merchant
      description: >-
        Enroll a merchant in an alert or refund program. Send a `program`
        discriminator with that program's fields. `ethoca` and `cdrn` require
        `descriptors`. `rdr` requires `arns` and/or equal-length paired
        `bins`/`caids` (its `bins`/`caids` are persisted as queryable RDR
        descriptors). `amex` and `discover` require legal name, DBA, address,
        and their SE identifiers (they now persist a `Pending` descriptor you
        can poll). Enrollment files a request; records start `Pending` and
        become `Enrolled` once the provider-side enrollment confirms. Pass
        `merchant_id` to target a specific merchant, or omit it to create a
        brand-new merchant. Poll `GET /api/enrollment_status` for per-program
        state.
      operationId: enroll-merchant
      parameters:
        - name: X-API-Key
          required: true
          in: header
          schema:
            type: string
          description: Your API key. Sent in the `X-API-Key` header.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrollMerchantRequest'
      responses:
        '200':
          description: Enrollment applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrollMerchantResponse'
        '400':
          description: >-
            Validation failed. Unknown `program`, a missing required per-program
            field, or a body in the old `{ type, merchantId, requestData }`
            shape.
        '401':
          description: Missing or invalid API key.
        '404':
          description: >-
            A `merchant_id` was supplied but no merchant with that id belongs to
            this account.
components:
  schemas:
    EnrollMerchantRequest:
      oneOf:
        - $ref: '#/components/schemas/EnrollMerchantEthocaRequest'
        - $ref: '#/components/schemas/EnrollMerchantCdrnRequest'
        - $ref: '#/components/schemas/EnrollMerchantRdrRequest'
        - $ref: '#/components/schemas/EnrollMerchantAmexRequest'
        - $ref: '#/components/schemas/EnrollMerchantDiscoverRequest'
      discriminator:
        propertyName: program
        mapping:
          ethoca: '#/components/schemas/EnrollMerchantEthocaRequest'
          cdrn: '#/components/schemas/EnrollMerchantCdrnRequest'
          rdr: '#/components/schemas/EnrollMerchantRdrRequest'
          amex: '#/components/schemas/EnrollMerchantAmexRequest'
          discover: '#/components/schemas/EnrollMerchantDiscoverRequest'
    EnrollMerchantResponse:
      type: object
      required:
        - merchantId
        - merchantCreated
        - program
        - descriptorIds
      properties:
        merchantId:
          type: string
          description: >-
            The merchant (retailer) id this enrollment was applied to. Newly
            created or reused.
        merchantCreated:
          type: boolean
          description: >-
            True if a new merchant was created for this request, false if an
            existing one was reused.
        program:
          type: string
          description: The program that was enrolled (lowercased).
        descriptorIds:
          type: array
          items:
            type: string
          description: >-
            Ids of descriptor records created or updated, retrievable via `GET
            /api/v2/descriptors`. Populated for Ethoca, CDRN, RDR (one per
            BIN/CAID pair), Amex, and Discover. Empty only when the program
            persisted no descriptor (e.g. an RDR enrollment sending `arns`
            alone).
        rulesetSnapshotId:
          type: string
          nullable: true
          description: >-
            Id of the ruleset snapshot recorded, or null if no ruleset change
            occurred.
    EnrollMerchantEthocaRequest:
      type: object
      required:
        - program
        - descriptors
      properties:
        program:
          type: string
          enum:
            - ethoca
          description: Program discriminator. Use `ethoca`.
        merchant_id:
          type: string
          nullable: true
          description: >-
            Existing merchant (retailer) id to enroll. Omit to create a
            brand-new merchant. The resolved id is returned as `merchantId`.
        ruleset:
          type: string
          nullable: true
          description: >-
            Optional refund / RDR threshold for the merchant (e.g. `<300`). When
            supplied and changed, a ruleset snapshot is recorded.
        descriptors:
          type: array
          items:
            type: string
          description: >-
            Billing descriptors to enroll. At least one non-blank value is
            required. Stored uppercased.
    EnrollMerchantCdrnRequest:
      type: object
      required:
        - program
        - descriptors
      properties:
        program:
          type: string
          enum:
            - cdrn
          description: Program discriminator. Use `cdrn`.
        merchant_id:
          type: string
          nullable: true
          description: >-
            Existing merchant (retailer) id to enroll. Omit to create a
            brand-new merchant. The resolved id is returned as `merchantId`.
        ruleset:
          type: string
          nullable: true
          description: >-
            Optional refund / RDR threshold for the merchant (e.g. `<300`). When
            supplied and changed, a ruleset snapshot is recorded.
        descriptors:
          type: array
          items:
            type: string
          description: >-
            Billing descriptors to enroll. At least one non-blank value is
            required. Stored uppercased.
    EnrollMerchantRdrRequest:
      type: object
      required:
        - program
      description: >-
        RDR enrollment. Provide `arns`, and/or equal-length paired
        `bins`/`caids` (each bin needs a matching caid at the same index).
        Submitted `bins`/`caids` are persisted as queryable RDR descriptor
        records (returned in `descriptorIds` and listed by `GET
        /api/v2/descriptors`), starting `Pending` and becoming `Enrolled` once
        the provider-side enrollment confirms.
      properties:
        program:
          type: string
          enum:
            - rdr
          description: Program discriminator. Use `rdr`.
        merchant_id:
          type: string
          nullable: true
          description: >-
            Existing merchant (retailer) id to enroll. Omit to create a
            brand-new merchant. The resolved id is returned as `merchantId`.
        ruleset:
          type: string
          nullable: true
          description: >-
            Optional refund / RDR threshold for the merchant (e.g. `<300`). When
            supplied and changed, a ruleset snapshot is recorded.
        arns:
          type: array
          items:
            type: string
          nullable: true
          description: Visa Acquirer Reference Numbers.
        bins:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            Card BINs. Paired positionally with `caids` and persisted as RDR
            descriptor records.
        caids:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            Card Acceptor IDs. Paired positionally with `bins` and persisted as
            RDR descriptor records.
    EnrollMerchantAmexRequest:
      type: object
      required:
        - program
        - legalName
        - dbaName
        - amexSe
        - amexDescriptor
        - streetAddress
        - city
        - state
        - country
        - zip
      properties:
        program:
          type: string
          enum:
            - amex
          description: Program discriminator. Use `amex`.
        merchant_id:
          type: string
          nullable: true
          description: >-
            Existing merchant (retailer) id to enroll. Omit to create a
            brand-new merchant. The resolved id is returned as `merchantId`.
        ruleset:
          type: string
          nullable: true
          description: >-
            Optional refund / RDR threshold for the merchant (e.g. `<300`). When
            supplied and changed, a ruleset snapshot is recorded.
        legalName:
          type: string
          description: Merchant legal name.
        dbaName:
          type: string
          description: Doing-business-as name.
        amexSe:
          type: string
          description: Amex Service Establishment (SE) number.
        amexDescriptor:
          type: string
          description: Amex billing descriptor.
        streetAddress:
          type: string
          description: Street address.
        city:
          type: string
          description: City.
        state:
          type: string
          description: State or province.
        country:
          type: string
          description: Country.
        zip:
          type: string
          description: Postal code.
    EnrollMerchantDiscoverRequest:
      type: object
      required:
        - program
        - legalName
        - dbaName
        - discoverSe
        - streetAddress
        - city
        - state
        - country
        - zip
      properties:
        program:
          type: string
          enum:
            - discover
          description: Program discriminator. Use `discover`.
        merchant_id:
          type: string
          nullable: true
          description: >-
            Existing merchant (retailer) id to enroll. Omit to create a
            brand-new merchant. The resolved id is returned as `merchantId`.
        ruleset:
          type: string
          nullable: true
          description: >-
            Optional refund / RDR threshold for the merchant (e.g. `<300`). When
            supplied and changed, a ruleset snapshot is recorded.
        legalName:
          type: string
          description: Merchant legal name.
        dbaName:
          type: string
          description: Doing-business-as name.
        discoverSe:
          type: string
          description: Discover Service Establishment (SE) number.
        streetAddress:
          type: string
          description: Street address.
        city:
          type: string
          description: City.
        state:
          type: string
          description: State or province.
        country:
          type: string
          description: Country.
        zip:
          type: string
          description: Postal code.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.