---
title: "Create sales receipt"
description: "Create a POS sale receipt. A non-courtesy sale requires paymentForm; credit sales require paymentForm 99 and a stored customer.customerId with credit enabled. This operation never stamps a CFDI."
language: en
canonical_url: "https://exac.mx/docs/en/mcp/tools/create_sales_receipt"
md_url: "https://exac.mx/docs/en/mcp/tools/create_sales_receipt.md"
---

# Create sales receipt

Create a POS sale receipt. A non-courtesy sale requires paymentForm; credit sales require paymentForm 99 and a stored customer.customerId with credit enabled. This operation never stamps a CFDI.

Tool: `create_sales_receipt`

## Purpose

Create a POS sales receipt without stamping a CFDI.

### Use when

A point-of-sale transaction has been completed.

### Do not use when

You need to create a fiscal CFDI directly.

| Detail | Value |
| --- | --- |
| Permissions | receipts:create |
| Side effects | Writes data |
| Idempotency | Idempotent |

## Input schema

```json
{
  "type": "object",
  "properties": {
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Unique retry key for this exact operation. Reuse it only when retrying the same request."
    },
    "input": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "items": {
              "$ref": "#/definitions/__schema0"
            },
            "currency": {
              "$ref": "#/definitions/__schema2"
            },
            "locationId": {
              "$ref": "#/definitions/__schema3"
            },
            "pricesIncludeIva": {
              "$ref": "#/definitions/__schema4"
            },
            "notes": {
              "$ref": "#/definitions/__schema5"
            },
            "customFields": {
              "$ref": "#/definitions/__schema6"
            },
            "invoiceRequested": {
              "type": "boolean"
            },
            "saleType": {
              "type": "string",
              "const": "paid"
            },
            "paymentForm": {
              "type": "string",
              "enum": [
                "12",
                "13",
                "14",
                "15",
                "17",
                "23",
                "24",
                "25",
                "26",
                "27",
                "28",
                "29",
                "30",
                "31",
                "99",
                "02",
                "06",
                "01",
                "05",
                "04",
                "03",
                "08"
              ],
              "description": "Active SAT payment-form code.",
              "x-exac-sat-catalog": "payment-forms"
            },
            "customer": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            }
          },
          "required": [
            "items",
            "saleType",
            "paymentForm"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "items": {
              "$ref": "#/definitions/__schema0"
            },
            "currency": {
              "$ref": "#/definitions/__schema2"
            },
            "locationId": {
              "$ref": "#/definitions/__schema3"
            },
            "pricesIncludeIva": {
              "$ref": "#/definitions/__schema4"
            },
            "notes": {
              "$ref": "#/definitions/__schema5"
            },
            "customFields": {
              "$ref": "#/definitions/__schema6"
            },
            "invoiceRequested": {
              "type": "boolean"
            },
            "saleType": {
              "type": "string",
              "const": "credit"
            },
            "paymentForm": {
              "type": "string",
              "const": "99"
            },
            "customer": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "stored"
                },
                "customerId": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "kind",
                "customerId"
              ],
              "additionalProperties": false
            },
            "collection": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "due_date"
                    },
                    "date": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind",
                    "date"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "const": "installments"
                    },
                    "terms": {
                      "type": "object",
                      "properties": {
                        "installmentCount": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 60
                        },
                        "firstDue": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "transaction_date"
                                }
                              },
                              "required": [
                                "kind"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "months_after_transaction"
                                },
                                "months": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 60
                                }
                              },
                              "required": [
                                "kind",
                                "months"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "fixed_date"
                                },
                                "date": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "kind",
                                "date"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "recurrence": {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "anchor_day"
                                }
                              },
                              "required": [
                                "kind"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "day_of_month"
                                },
                                "day": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 31
                                }
                              },
                              "required": [
                                "kind",
                                "day"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "last_day"
                                }
                              },
                              "required": [
                                "kind"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "installmentCount",
                        "firstDue",
                        "recurrence"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "kind",
                    "terms"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": [
            "items",
            "saleType",
            "paymentForm",
            "customer"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "items": {
              "$ref": "#/definitions/__schema0"
            },
            "currency": {
              "$ref": "#/definitions/__schema2"
            },
            "locationId": {
              "$ref": "#/definitions/__schema3"
            },
            "pricesIncludeIva": {
              "$ref": "#/definitions/__schema4"
            },
            "notes": {
              "$ref": "#/definitions/__schema5"
            },
            "customFields": {
              "$ref": "#/definitions/__schema6"
            },
            "invoiceRequested": {
              "type": "boolean",
              "const": false
            },
            "saleType": {
              "type": "string",
              "const": "courtesy"
            },
            "customer": {
              "allOf": [
                {
                  "$ref": "#/definitions/__schema7"
                }
              ]
            }
          },
          "required": [
            "items",
            "saleType"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "idempotencyKey",
    "input"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "definitions": {
    "__schema0": {
      "minItems": 1,
      "type": "array",
      "items": {
        "$ref": "#/definitions/__schema1"
      }
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "productId": {
          "type": "string"
        },
        "description": {
          "type": "string",
          "minLength": 1
        },
        "quantity": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "unitPrice": {
          "type": "number",
          "minimum": 0
        },
        "discount": {
          "type": "number"
        },
        "taxIncluded": {
          "type": "boolean"
        }
      },
      "required": [
        "description",
        "quantity",
        "unitPrice"
      ],
      "additionalProperties": false
    },
    "__schema2": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "__schema3": {
      "type": "string"
    },
    "__schema4": {
      "type": "boolean"
    },
    "__schema5": {
      "type": "string"
    },
    "__schema6": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fieldName": {
            "type": "string",
            "minLength": 1
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "fieldName",
          "value"
        ],
        "additionalProperties": false
      }
    },
    "__schema7": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "stored"
            },
            "customerId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "customerId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "walk_in"
            },
            "name": {
              "type": "string",
              "minLength": 1
            },
            "email": {
              "type": "string",
              "format": "email",
              "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
            }
          },
          "required": [
            "kind"
          ],
          "additionalProperties": false
        }
      ]
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "documentRef": {
          "type": "string",
          "pattern": "^sales_receipt:.+$"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "invoiced",
            "global_invoiced",
            "canceled"
          ]
        }
      },
      "required": [
        "documentRef",
        "status"
      ],
      "additionalProperties": false
    },
    "error": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "validation_error",
            "unauthenticated",
            "forbidden",
            "not_found",
            "method_not_allowed",
            "conflict",
            "idempotency_conflict",
            "operation_in_progress",
            "recovery_required",
            "rate_limited",
            "provider_unavailable",
            "internal"
          ]
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "object",
          "properties": {
            "issues": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    }
                  },
                  "message": {
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "path",
                  "message"
                ],
                "additionalProperties": false
              }
            },
            "retryable": {
              "type": "boolean"
            },
            "retryAfterSeconds": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            }
          },
          "additionalProperties": false
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "oneOf": [
    {
      "required": [
        "data"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
```

## Related tools

- [`get_document`](/docs/en/mcp/tools/get_document.md) — **Get document**: Retrieve one document by its public documentRef. Sales receipt details include stable lineRef values and remaining refundable amounts for sales receipt refunds.

- [`create_cfdi_draft_from_sales_receipts`](/docs/en/mcp/tools/create_cfdi_draft_from_sales_receipts.md) — **Create CFDI from sales receipts**: Create a CFDI draft from one or more compatible open sales receipts. Inspect the receipts first; they must match on customer, currency, payment form, and payment timing. This operation never stamps or sends the CFDI.

## Related workflow

[See the canonical workflows in the introduction](/docs/en.md)

## Equivalent REST operations

- [`POST /v1/sales-receipts`](/docs/en/api/documents/sales-receipts/create-sales-receipt.md)

Complete documentation: https://exac.mx/docs/en.md
Agent documentation index: https://exac.mx/docs/en/llms.txt
