# Capture Order # OpenAPI definition ```json { "openapi": "3.0.0", "paths": { "/v2/orders/{id}/capture": { "post": { "description": "This is an async endpoint that allows you to submit a Nota Fiscal XML file for an order. Once the xml file is submitted, a job will be triggered to perform validations and capture the order.", "operationId": "OrdersController_captureOrder", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "CrediPay's internal order ID. UUID v4 format.", "schema": { "example": "46dd63dd-1be4-4658-8deb-fa5dc578ad0b", "type": "string" } } ], "requestBody": { "required": true, "description": "Nota Fiscal XML file. Needs to have been processed and approved by SEFAZ (draft XMLs are not allowed).", "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "invoice": { "type": "string", "format": "binary" } }, "required": [ "invoice" ] } } } }, "responses": { "400": { "description": "Could not transition the order to the validating state due to an error." } }, "summary": "Capture Order", "tags": [ "Orders" ] } } }, "info": { "title": "Credipay API", "description": "", "version": "2.0", "contact": {} }, "servers": [ { "url": "https://api.pre.credix.finance", "description": "Sandbox" }, { "url": "https://api.credix.finance", "description": "Production" } ], "components": { "securitySchemes": { "api_key": { "type": "apiKey", "in": "header", "name": "X-CREDIPAY-API-KEY" } } }, "security": [ { "api_key": [] } ] } ```