{"openapi":"3.1.0","info":{"title":"Cash Deposit Simulator API","description":"Simulates cash deposit barcode operations (scan, commit, void) for non-production environments.","termsOfService":"http://cfxlabs.com/terms/","contact":{"name":"API Owner","url":"api.cfxlabs.net","email":"api@cfxlabs.com"},"license":{"name":"Licence tbd","url":"http://tbd.html"},"version":"@VERSION@","summary":"CFX Cash Deposit Simulator API"},"components":{"securitySchemes":{"ApiKeyAuth":{"name":"x-api-key","type":"apiKey","in":"header"},"ApiSecretAuth":{"name":"x-api-secret","type":"apiKey","in":"header"}},"schemas":{}},"paths":{"/v1/deposit/cash/simulate/{id}/scan":{"post":{"summary":"Simulate Cash Deposit Barcode Scan (Auth)","tags":["Cash"],"description":"Simulates the scanning of a cash deposit barcode (Auth step). Returns a confirmationId for use with commit or void. Only available in non-production environments. For floating quotes (no amount set), amount is required. For non-floating quotes, amount must not be provided.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceAmount":{"type":"number","description":"The deposit amount to simulate. Required for floating quotes (no amount set). Must not be provided for non-floating quotes."}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"Idempotency-Key","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["confirmationId","requestId"],"properties":{"confirmationId":{"type":"string","description":"Confirmation ID from the auth response"},"requestId":{"type":"string","description":"Request ID from the auth request, needed for void operations"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST"]},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"title":"INVALID_REQUEST","description":"The service cannot understand the request"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["MISSING_IDEMPOTENCY_KEY"]},"message":{"type":"string"}},"title":"MISSING_IDEMPOTENCY_KEY","description":"Missing required idempotency key header"},{"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST"]},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"title":"INVALID_REQUEST","description":"The service cannot understand the request"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_QUOTE_TYPE"]},"message":{"type":"string"}},"title":"INVALID_QUOTE_TYPE","description":"The deposit request is not a cash deposit"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_QUOTE_STATUS"]},"message":{"type":"string"}},"title":"INVALID_QUOTE_STATUS","description":"The deposit quote is in a terminal status (expired or rejected)"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BARCODE_NOT_ELIGIBLE"]},"message":{"type":"string"}},"title":"BARCODE_NOT_ELIGIBLE","description":"The barcode is in a terminal state and cannot be simulated"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["AMOUNT_NOT_ALLOWED"]},"message":{"type":"string"}},"title":"AMOUNT_NOT_ALLOWED","description":"Amount was provided but the quote already has a fixed amount"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["AMOUNT_REQUIRED"]},"message":{"type":"string"}},"title":"AMOUNT_REQUIRED","description":"Amount is required for floating quotes (no amount set on the quote)"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_BARCODE_STATUS"]},"message":{"type":"string"}},"title":"INVALID_BARCODE_STATUS","description":"The barcode is not in the expected state for this operation"}],"title":"Bad Request"}]}}}},"401":{"description":"The access to this resource has been denied","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"}},"title":"UNAUTHORIZED","description":"The access to this resource has been denied"}}}},"404":{"description":"The resource was not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"}},"title":"NOT_FOUND","description":"The resource was not found"}}}},"409":{"description":"A duplicate request with this idempotency key is already in progress","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["IDEMPOTENCY_IN_PROGRESS"]},"message":{"type":"string"}},"title":"IDEMPOTENCY_IN_PROGRESS","description":"A duplicate request with this idempotency key is already in progress"}}}},"422":{"description":"Another request with this idempotency key was made using a different body","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["IDEMPOTENCY_KEY_REUSED"]},"message":{"type":"string"}},"title":"IDEMPOTENCY_KEY_REUSED","description":"Another request with this idempotency key was made using a different body"}}}},"default":{"description":"Catch-all error response for any unexpected internal errors","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INTERNAL"]},"message":{"type":"string","enum":["An unexpected internal error has occurred"]}},"title":"INTERNAL","description":"Catch-all error response for any unexpected internal errors"}}}}}}},"/v1/deposit/cash/simulate/{id}/commit":{"post":{"summary":"Simulate Cash Deposit Barcode Commit (AuthCommit)","tags":["Cash"],"description":"Commits a previously scanned cash deposit barcode (AuthCommit step). Requires the confirmationId from the scan step. Only available in non-production environments.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["confirmationId"],"properties":{"confirmationId":{"type":"string","description":"Confirmation ID from the scan step"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"Idempotency-Key","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean","enum":[true]}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST"]},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"title":"INVALID_REQUEST","description":"The service cannot understand the request"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["MISSING_IDEMPOTENCY_KEY"]},"message":{"type":"string"}},"title":"MISSING_IDEMPOTENCY_KEY","description":"Missing required idempotency key header"},{"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST"]},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"title":"INVALID_REQUEST","description":"The service cannot understand the request"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_QUOTE_TYPE"]},"message":{"type":"string"}},"title":"INVALID_QUOTE_TYPE","description":"The deposit request is not a cash deposit"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_QUOTE_STATUS"]},"message":{"type":"string"}},"title":"INVALID_QUOTE_STATUS","description":"The deposit quote is in a terminal status (expired or rejected)"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BARCODE_NOT_ELIGIBLE"]},"message":{"type":"string"}},"title":"BARCODE_NOT_ELIGIBLE","description":"The barcode is in a terminal state and cannot be simulated"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_BARCODE_STATUS"]},"message":{"type":"string"}},"title":"INVALID_BARCODE_STATUS","description":"The barcode is not in the expected state for this operation"}],"title":"Bad Request"}]}}}},"401":{"description":"The access to this resource has been denied","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"}},"title":"UNAUTHORIZED","description":"The access to this resource has been denied"}}}},"404":{"description":"The resource was not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"}},"title":"NOT_FOUND","description":"The resource was not found"}}}},"409":{"description":"A duplicate request with this idempotency key is already in progress","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["IDEMPOTENCY_IN_PROGRESS"]},"message":{"type":"string"}},"title":"IDEMPOTENCY_IN_PROGRESS","description":"A duplicate request with this idempotency key is already in progress"}}}},"422":{"description":"Another request with this idempotency key was made using a different body","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["IDEMPOTENCY_KEY_REUSED"]},"message":{"type":"string"}},"title":"IDEMPOTENCY_KEY_REUSED","description":"Another request with this idempotency key was made using a different body"}}}},"default":{"description":"Catch-all error response for any unexpected internal errors","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INTERNAL"]},"message":{"type":"string","enum":["An unexpected internal error has occurred"]}},"title":"INTERNAL","description":"Catch-all error response for any unexpected internal errors"}}}}}}},"/v1/deposit/cash/simulate/{id}/void":{"post":{"summary":"Simulate Cash Deposit Barcode Void (AuthVoid)","tags":["Cash"],"description":"Voids a previously scanned cash deposit barcode (AuthVoid step). Requires the originalRequestId from the scan step. Only available in non-production environments.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["originalRequestId"],"properties":{"originalRequestId":{"type":"string","description":"Request ID from the scan step"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"header","name":"Idempotency-Key","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean","enum":[true]}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST"]},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"title":"INVALID_REQUEST","description":"The service cannot understand the request"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["MISSING_IDEMPOTENCY_KEY"]},"message":{"type":"string"}},"title":"MISSING_IDEMPOTENCY_KEY","description":"Missing required idempotency key header"},{"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST"]},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"title":"INVALID_REQUEST","description":"The service cannot understand the request"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_QUOTE_TYPE"]},"message":{"type":"string"}},"title":"INVALID_QUOTE_TYPE","description":"The deposit request is not a cash deposit"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_QUOTE_STATUS"]},"message":{"type":"string"}},"title":"INVALID_QUOTE_STATUS","description":"The deposit quote is in a terminal status (expired or rejected)"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BARCODE_NOT_ELIGIBLE"]},"message":{"type":"string"}},"title":"BARCODE_NOT_ELIGIBLE","description":"The barcode is in a terminal state and cannot be simulated"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_BARCODE_STATUS"]},"message":{"type":"string"}},"title":"INVALID_BARCODE_STATUS","description":"The barcode is not in the expected state for this operation"}],"title":"Bad Request"}]}}}},"401":{"description":"The access to this resource has been denied","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"}},"title":"UNAUTHORIZED","description":"The access to this resource has been denied"}}}},"404":{"description":"The resource was not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"}},"title":"NOT_FOUND","description":"The resource was not found"}}}},"409":{"description":"A duplicate request with this idempotency key is already in progress","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["IDEMPOTENCY_IN_PROGRESS"]},"message":{"type":"string"}},"title":"IDEMPOTENCY_IN_PROGRESS","description":"A duplicate request with this idempotency key is already in progress"}}}},"422":{"description":"Another request with this idempotency key was made using a different body","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["IDEMPOTENCY_KEY_REUSED"]},"message":{"type":"string"}},"title":"IDEMPOTENCY_KEY_REUSED","description":"Another request with this idempotency key was made using a different body"}}}},"default":{"description":"Catch-all error response for any unexpected internal errors","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INTERNAL"]},"message":{"type":"string","enum":["An unexpected internal error has occurred"]}},"title":"INTERNAL","description":"Catch-all error response for any unexpected internal errors"}}}}}}}},"servers":[{"url":"https://api.dev.cfx.to","description":"Customer Sandbox"}],"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}],"tags":[{"name":"Cash"}],"externalDocs":{"description":"Find out more about CFX","url":"https://www.cfxlabs.com/"}}