# RDR 报备状态通知

> RDR 报备状态变更通知的字段、验签和应答要求。

```yaml
openapi: 3.1.0
info:
  title: RDR 报备状态通知
  version: 1.0.0
  description: RDR 报备状态变更通知的字段、验签和应答要求。
webhooks:
  rdr.enrollment.changed:
    post:
      summary: RDR 报备状态通知
      description: RDR 报备状态变更通知的字段、验签和应答要求。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: number
                  description: 申请单号。
                  x-onerway-constraints:
                    - kind: rule
                      text: 该 JSON 数字可能超出 JavaScript 安全整数范围。解析 JSON 时须无损保留完整十进制值，用于验签和应答。
                    - kind: rule
                      text: 同一申请的不同状态变化可携带相同 `id`，不要仅凭该字段对通知去重。
                  x-onerway-signature-participation: included
                merchantNo:
                  type: number
                  description: Onerway 分配的商户号，标识商户账户。
                  x-onerway-signature-participation: included
                preDisputeService:
                  type: string
                  description: 申请对应的服务类型，固定为 `RDR`。
                  enum:
                    - RDR
                  x-enum-descriptions:
                    RDR: RDR（快速争议解决）。
                  x-onerway-signature-participation: included
                bin:
                  type: string
                  description: 收单机构 BIN（Bank Identification Number），用于标识为商户提供收单服务的机构。
                  x-onerway-signature-participation: included
                caid:
                  type: string
                  description: 报备申请中提供的商户受理标识（CAID，Card Acceptor ID）。
                  x-onerway-signature-participation: included
                mcc:
                  type: string
                  description: 报备申请中提供的商户类别代码（MCC，Merchant Category Code）。
                  x-onerway-signature-participation: included
                dba:
                  type: string
                  description: 报备申请中提供的商户对外经营名称（DBA，Doing Business As）。
                  x-onerway-signature-participation: included
                resellerSubMerchantId:
                  type: string
                  description: 代理运营商的子商户标识。
                  x-onerway-signature-participation: included
                arn:
                  type: string
                  description: 报备申请中提供的收单参考号（ARN，Acquirer Reference Number）。
                  x-onerway-signature-participation: included
                fromEnrollmentStatus:
                  type: string
                  description: 本次变更前的申请状态。
                  enum:
                    - PENDING_SUBMISSION
                    - SUBMITTED_AND_PENDING_ENROLLMENT
                    - ENROLLING
                    - ENROLLED
                    - ENROLLMENT_FAILED
                    - SUBMITTED_AND_PENDING_DISENROLLMENT
                    - DISENROLLING
                    - DISENROLLED
                  x-enum-descriptions:
                    PENDING_SUBMISSION: 待提交。
                    SUBMITTED_AND_PENDING_ENROLLMENT: 已提交，等待开通。
                    ENROLLING: 开通中。
                    ENROLLED: 已开通，服务已生效。
                    ENROLLMENT_FAILED: 开通失败。
                    SUBMITTED_AND_PENDING_DISENROLLMENT: 已提交，等待关闭服务。
                    DISENROLLING: 关闭中。
                    DISENROLLED: 已关闭，服务已停用。
                  x-onerway-signature-participation: included
                enrollmentStatus:
                  type: string
                  description: 本次变更后的申请状态。
                  enum:
                    - PENDING_SUBMISSION
                    - SUBMITTED_AND_PENDING_ENROLLMENT
                    - ENROLLING
                    - ENROLLED
                    - ENROLLMENT_FAILED
                    - SUBMITTED_AND_PENDING_DISENROLLMENT
                    - DISENROLLING
                    - DISENROLLED
                  x-enum-descriptions:
                    PENDING_SUBMISSION: 待提交。
                    SUBMITTED_AND_PENDING_ENROLLMENT: 已提交，等待开通。
                    ENROLLING: 开通中。
                    ENROLLED: 已开通，服务已生效。
                    ENROLLMENT_FAILED: 开通失败。
                    SUBMITTED_AND_PENDING_DISENROLLMENT: 已提交，等待关闭服务。
                    DISENROLLING: 关闭中。
                    DISENROLLED: 已关闭，服务已停用。
                  x-onerway-constraints:
                    - kind: rule
                      text: 不要假定每种申请状态变化都会触发通知。
                  x-onerway-signature-participation: included
                notes:
                  type:
                    - string
                    - "null"
                  description: 申请或状态变更备注。
                  x-onerway-value:
                    nullable: true
                  x-onerway-signature-participation: included
                comments:
                  type: string
                  description: 申请的审核意见。
                  x-onerway-signature-participation: included
                createOpr:
                  type: string
                  description: 创建申请记录的操作人。
                  x-onerway-signature-participation: included
                createTime:
                  type: string
                  description: 申请记录创建时间。
                  x-onerway-constraints:
                    - kind: rule
                      text: 格式为 `yyyy-MM-dd HH:mm:ss`。
                  x-onerway-signature-participation: included
                updateOpr:
                  type: string
                  description: 最近一次更新申请记录的操作人。
                  x-onerway-signature-participation: included
                updateTime:
                  type: string
                  description: 申请记录更新时间。
                  x-onerway-constraints:
                    - kind: rule
                      text: 格式为 `yyyy-MM-dd HH:mm:ss`。
                  x-onerway-signature-participation: included
                sign:
                  type: string
                  description: 通知签名。使用当前环境的 `SECRET`，按 [Payments
                    签名算法](/zh/payments/get-started/request-signing)验签。
                  x-onerway-constraints:
                    - kind: rule
                      text: 计算签名时排除 `sign` 字段自身。
                  x-onerway-signature-participation: signature-field
            examples:
              rdr_enrollment_in_progress:
                summary: RDR 开通中
                value:
                  id: 100002
                  merchantNo: 100000
                  preDisputeService: RDR
                  bin: replace_with_bin
                  caid: demo_card_acceptor_id
                  mcc: "5999"
                  dba: EXAMPLE STORE
                  resellerSubMerchantId: demo_sub_merchant_001
                  arn: demo_acquirer_reference_number
                  fromEnrollmentStatus: SUBMITTED_AND_PENDING_ENROLLMENT
                  enrollmentStatus: ENROLLING
                  notes: null
                  comments: Example review approved
                  createOpr: demo_creator
                  createTime: 2026-09-01 10:00:00
                  updateOpr: demo_reviewer
                  updateTime: 2026-09-01 10:10:00
                  sign: replace_with_sha256_signature
              rdr_enrollment_completed:
                summary: RDR 已开通
                value:
                  id: 100002
                  merchantNo: 100000
                  preDisputeService: RDR
                  bin: replace_with_bin
                  caid: demo_card_acceptor_id
                  mcc: "5999"
                  dba: EXAMPLE STORE
                  resellerSubMerchantId: demo_sub_merchant_001
                  arn: demo_acquirer_reference_number
                  fromEnrollmentStatus: ENROLLING
                  enrollmentStatus: ENROLLED
                  notes: null
                  comments: Example RDR enrollment completed
                  createOpr: demo_creator
                  createTime: 2026-09-01 10:00:00
                  updateOpr: demo_reviewer
                  updateTime: 2026-09-01 10:20:00
                  sign: replace_with_sha256_signature
      responses:
        "200":
          description: 验签通过并受理通知后，返回 HTTP 200，Content-Type 为 text/plain。响应体须原样返回收到的 id
            值，不得丢失精度。未收到成功响应时，Onerway 以 30 分钟间隔重试，最多 3 次。
          content:
            text/plain:
              schema:
                type: string
              examples:
                return_enrollment_id:
                  summary: 返回收到的申请单号
                  value: "100002"
```
