{"openapi":"3.1.0","info":{"title":"Ledger Account API","description":"Interact with Ledger Accounts","termsOfService":"","contact":{"name":"API Owner","email":"api@cfxlabs.com"},"license":{"name":"","url":""},"version":"@VERSION@","summary":"CFX Ledger Account API"},"components":{"securitySchemes":{"ApiKeyAuth":{"name":"x-api-key","type":"apiKey","in":"header"},"ApiSecretAuth":{"name":"x-api-secret","type":"apiKey","in":"header"}},"schemas":{}},"paths":{"/v1/redemption/transfer":{"post":{"summary":"Transfer between ledger accounts","tags":["Ledger Account"],"description":"You can supply either Ledger Account IDs or Payment Instrument IDs (`pi_xxxxxx`) when specifying `source` and `target` values.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["source","target","sourceAmount"],"properties":{"source":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"examples":["redtfr_xxxxxxxx"]}}},"target":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"examples":["redtfr_xxxxxxxx"]}}},"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be debited from the source wallet"},"senderMessage":{"type":"string","description":"The message from the sender that will be visible to the receiver."}}},{"anyOf":[{"type":"object","required":["identityId"],"properties":{"identityId":{"type":"string","examples":["id_xxxxxx"]}},"title":"Identity"},{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string","examples":["org_xxxxxx"]}},"title":"Organization"}]}]}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"Idempotency-Key","required":false}],"deprecated":true,"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["id","status","source","target","sourceAmount","targetAmount","fees","totalFees","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED","CANCELLED"]},"source":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"example":"redtfr_xxxxxxxx"}}},"target":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"example":"redtfr_xxxxxxxx"}}},"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be debited from the source wallet"},"targetAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be credited to the target wallet"},"fees":{"type":"array","items":{"type":"object","required":["receiver","type","amount"],"properties":{"receiver":{"type":"string","enum":["PROVIDER","CFX","CUSTOMER"]},"type":{"type":"string","enum":["FIXED","VARIABLE"]},"amount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}}}}}},"totalFees":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The sum of all the fees that will be charged"},"receipt":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["SOLANA_TRANSACTION_SIGNATURE"]},"id":{"type":"string","description":"Solana blockchain transaction signature"}},"description":"On-chain receipt for this transfer"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was last updated"},"senderMessage":{"type":"string","description":"The message from the sender that will be visible to the receiver."}}}}}},"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":[{"allOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_PAYMENT_INSTRUMENT"]},"message":{"type":"string"}},"title":"INVALID_PAYMENT_INSTRUMENT","description":"The provided payment instrument is not found or is not active"},{"type":"object","required":["id"],"properties":{"id":{"type":"string"}}}]},{"allOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_LEDGER_ACCOUNT"]},"message":{"type":"string"}},"title":"INVALID_LEDGER_ACCOUNT","description":"The provided ledger account is not found"},{"type":"object","required":["id"],"properties":{"id":{"type":"string"}}}]},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_IDENTITY_OR_ORGANIZATION"]},"message":{"type":"string"}},"title":"INVALID_IDENTITY_OR_ORGANIZATION","description":"The identity or organization is not found or is not active"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_TRANSFER"]},"message":{"type":"string"}},"title":"INVALID_TRANSFER","description":"The transfer is not valid, e.g. transferring to the same wallet"},{"allOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INSUFFICIENT_FUNDS"]},"message":{"type":"string"}},"title":"INSUFFICIENT_FUNDS","description":"Not enough funds are available in the source wallet to perform this transfer"},{"type":"object","required":["sourceAmount","sourceBalance"],"properties":{"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that needs to be debited"},"sourceBalance":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount available in the source wallet"}}}]}]}]}}}},"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"}}}},"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"}}}},"429":{"description":"This identity or organization has reached the limit on using this product","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["LIMIT_EXCEEDED"]},"message":{"type":"string"}},"title":"LIMIT_EXCEEDED","description":"This identity or organization has reached the limit on using this product"}}}},"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"}}}}}},"get":{"summary":"Search existing transfers","tags":["Ledger Account"],"description":"Results is ordered by `createdAt` in descending order, if no `orderBy` is specified.","parameters":[{"schema":{"type":"string","title":"Identity"},"in":"query","name":"identityIds","required":false,"description":"Comma-separated list of matching identity IDs"},{"schema":{"type":"string","title":"Organization"},"in":"query","name":"organizationIds","required":false,"description":"Comma-separated list of matching organization IDs"},{"schema":{"type":"string"},"in":"query","name":"statuses","required":false,"description":"Comma-separated list of matching transfer statuses"},{"schema":{"type":"string"},"in":"query","name":"sourceLedgerAccountIds","required":false,"description":"Comma-separated list of matching source wallet IDs"},{"schema":{"type":"string"},"in":"query","name":"targetLedgerAccountIds","required":false,"description":"Comma-separated list of matching target wallet IDs"},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"createdBefore","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"createdAfter","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"updatedBefore","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"updatedAfter","required":false},{"schema":{"type":"string"},"in":"query","name":"orderBy","required":false,"description":"Comma-separated list of fields and directions to order the results by.\n\nFormat: `<field name>:<direction>,...`\n\n* `<field name>`: `createdAt`, `updatedAt`\n* `<direction>`: `ASC`, `DESC`"},{"schema":{"type":"integer","default":1},"in":"query","name":"page","required":false,"description":"Result page number to return, starting from 1"},{"schema":{"type":"integer","default":10,"maximum":100},"in":"query","name":"pageSize","required":false,"description":"Items per page to return"}],"deprecated":true,"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"allOf":[{"type":"object","required":["id","status","source","target","sourceAmount","targetAmount","fees","totalFees","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED","CANCELLED"]},"source":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"examples":["redtfr_xxxxxxxx"]}}},"target":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"examples":["redtfr_xxxxxxxx"]}}},"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be debited from the source wallet"},"targetAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be credited to the target wallet"},"fees":{"type":"array","items":{"type":"object","required":["receiver","type","amount"],"properties":{"receiver":{"type":"string","enum":["PROVIDER","CFX","CUSTOMER"]},"type":{"type":"string","enum":["FIXED","VARIABLE"]},"amount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}}}}}},"totalFees":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The sum of all the fees that will be charged"},"receipt":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["SOLANA_TRANSACTION_SIGNATURE"]},"id":{"type":"string","description":"Solana blockchain transaction signature"}},"description":"On-chain receipt for this transfer"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was last updated"},"senderMessage":{"type":"string","description":"The message from the sender that will be visible to the receiver."}}},{"anyOf":[{"type":"object","required":["identityId"],"properties":{"identityId":{"type":"string"}},"title":"Identity"},{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"}},"title":"Organization"}]}]}}}}}}},"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"}}}},"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/redemption/transfer/{id}":{"get":{"summary":"Get an existing transfer by ID","tags":["Ledger Account"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"deprecated":true,"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["id","status","source","target","sourceAmount","targetAmount","fees","totalFees","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED","CANCELLED"]},"source":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"example":"redtfr_xxxxxxxx"}}},"target":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"example":"redtfr_xxxxxxxx"}}},"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be debited from the source wallet"},"targetAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be credited to the target wallet"},"fees":{"type":"array","items":{"type":"object","required":["receiver","type","amount"],"properties":{"receiver":{"type":"string","enum":["PROVIDER","CFX","CUSTOMER"]},"type":{"type":"string","enum":["FIXED","VARIABLE"]},"amount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}}}}}},"totalFees":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The sum of all the fees that will be charged"},"receipt":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["SOLANA_TRANSACTION_SIGNATURE"]},"id":{"type":"string","description":"Solana blockchain transaction signature"}},"description":"On-chain receipt for this transfer"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was last updated"},"senderMessage":{"type":"string","description":"The message from the sender that will be visible to the receiver."}}}}}},"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"}}}},"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/ledger-accounts/transfer":{"post":{"summary":"Transfer between ledger accounts","tags":["Ledger Account"],"description":"You can supply either Ledger Account IDs or Payment Instrument IDs (`pi_xxxxxx`) when specifying `source` and `target` values.","requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["source","target","sourceAmount"],"properties":{"source":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"examples":["redtfr_xxxxxxxx"]}}},"target":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"examples":["redtfr_xxxxxxxx"]}}},"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be debited from the source wallet"},"senderMessage":{"type":"string","description":"The message from the sender that will be visible to the receiver."}}},{"anyOf":[{"type":"object","required":["identityId"],"properties":{"identityId":{"type":"string","examples":["id_xxxxxx"]}},"title":"Identity"},{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string","examples":["org_xxxxxx"]}},"title":"Organization"}]}]}}}},"parameters":[{"schema":{"type":"string"},"in":"header","name":"Idempotency-Key","required":false}],"responses":{"202":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["id","status","source","target","sourceAmount","targetAmount","fees","totalFees","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED","CANCELLED"]},"source":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"example":"redtfr_xxxxxxxx"}}},"target":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"example":"redtfr_xxxxxxxx"}}},"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be debited from the source wallet"},"targetAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be credited to the target wallet"},"fees":{"type":"array","items":{"type":"object","required":["receiver","type","amount"],"properties":{"receiver":{"type":"string","enum":["PROVIDER","CFX","CUSTOMER"]},"type":{"type":"string","enum":["FIXED","VARIABLE"]},"amount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}}}}}},"totalFees":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The sum of all the fees that will be charged"},"receipt":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["SOLANA_TRANSACTION_SIGNATURE"]},"id":{"type":"string","description":"Solana blockchain transaction signature"}},"description":"On-chain receipt for this transfer"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was last updated"},"senderMessage":{"type":"string","description":"The message from the sender that will be visible to the receiver."}}}}}},"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":[{"allOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_PAYMENT_INSTRUMENT"]},"message":{"type":"string"}},"title":"INVALID_PAYMENT_INSTRUMENT","description":"The provided payment instrument is not found or is not active"},{"type":"object","required":["id"],"properties":{"id":{"type":"string"}}}]},{"allOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_LEDGER_ACCOUNT"]},"message":{"type":"string"}},"title":"INVALID_LEDGER_ACCOUNT","description":"The provided ledger account is not found"},{"type":"object","required":["id"],"properties":{"id":{"type":"string"}}}]},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_IDENTITY_OR_ORGANIZATION"]},"message":{"type":"string"}},"title":"INVALID_IDENTITY_OR_ORGANIZATION","description":"The identity or organization is not found or is not active"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_TRANSFER"]},"message":{"type":"string"}},"title":"INVALID_TRANSFER","description":"The transfer is not valid, e.g. transferring to the same wallet"},{"allOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INSUFFICIENT_FUNDS"]},"message":{"type":"string"}},"title":"INSUFFICIENT_FUNDS","description":"Not enough funds are available in the source wallet to perform this transfer"},{"type":"object","required":["sourceAmount","sourceBalance"],"properties":{"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that needs to be debited"},"sourceBalance":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount available in the source wallet"}}}]}]}]}}}},"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"}}}},"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"}}}},"429":{"description":"This identity or organization has reached the limit on using this product","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["LIMIT_EXCEEDED"]},"message":{"type":"string"}},"title":"LIMIT_EXCEEDED","description":"This identity or organization has reached the limit on using this product"}}}},"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"}}}}}},"get":{"summary":"Search existing transfers","tags":["Ledger Account"],"description":"Results is ordered by `createdAt` in descending order, if no `orderBy` is specified.","parameters":[{"schema":{"type":"string","title":"Identity"},"in":"query","name":"identityIds","required":false,"description":"Comma-separated list of matching identity IDs"},{"schema":{"type":"string","title":"Organization"},"in":"query","name":"organizationIds","required":false,"description":"Comma-separated list of matching organization IDs"},{"schema":{"type":"string"},"in":"query","name":"statuses","required":false,"description":"Comma-separated list of matching transfer statuses"},{"schema":{"type":"string"},"in":"query","name":"sourceLedgerAccountIds","required":false,"description":"Comma-separated list of matching source wallet IDs"},{"schema":{"type":"string"},"in":"query","name":"targetLedgerAccountIds","required":false,"description":"Comma-separated list of matching target wallet IDs"},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"createdBefore","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"createdAfter","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"updatedBefore","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"updatedAfter","required":false},{"schema":{"type":"string"},"in":"query","name":"orderBy","required":false,"description":"Comma-separated list of fields and directions to order the results by.\n\nFormat: `<field name>:<direction>,...`\n\n* `<field name>`: `createdAt`, `updatedAt`\n* `<direction>`: `ASC`, `DESC`"},{"schema":{"type":"integer","default":1},"in":"query","name":"page","required":false,"description":"Result page number to return, starting from 1"},{"schema":{"type":"integer","default":10,"maximum":100},"in":"query","name":"pageSize","required":false,"description":"Items per page to return"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","items":{"allOf":[{"type":"object","required":["id","status","source","target","sourceAmount","targetAmount","fees","totalFees","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED","CANCELLED"]},"source":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"examples":["redtfr_xxxxxxxx"]}}},"target":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"examples":["redtfr_xxxxxxxx"]}}},"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be debited from the source wallet"},"targetAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be credited to the target wallet"},"fees":{"type":"array","items":{"type":"object","required":["receiver","type","amount"],"properties":{"receiver":{"type":"string","enum":["PROVIDER","CFX","CUSTOMER"]},"type":{"type":"string","enum":["FIXED","VARIABLE"]},"amount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}}}}}},"totalFees":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The sum of all the fees that will be charged"},"receipt":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["SOLANA_TRANSACTION_SIGNATURE"]},"id":{"type":"string","description":"Solana blockchain transaction signature"}},"description":"On-chain receipt for this transfer"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was last updated"},"senderMessage":{"type":"string","description":"The message from the sender that will be visible to the receiver."}}},{"anyOf":[{"type":"object","required":["identityId"],"properties":{"identityId":{"type":"string"}},"title":"Identity"},{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string"}},"title":"Organization"}]}]}}}}}}},"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"}}}},"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/ledger-accounts/transfer/{id}":{"get":{"summary":"Get an existing transfer by ID","tags":["Ledger Account"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["id","status","source","target","sourceAmount","targetAmount","fees","totalFees","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED","CANCELLED"]},"source":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"example":"redtfr_xxxxxxxx"}}},"target":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["REDEMPTION","PAYMENT_INSTRUMENT"]},"id":{"type":"string","minLength":1,"example":"redtfr_xxxxxxxx"}}},"sourceAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be debited from the source wallet"},"targetAmount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The amount that will be credited to the target wallet"},"fees":{"type":"array","items":{"type":"object","required":["receiver","type","amount"],"properties":{"receiver":{"type":"string","enum":["PROVIDER","CFX","CUSTOMER"]},"type":{"type":"string","enum":["FIXED","VARIABLE"]},"amount":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}}}}}},"totalFees":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string","enum":["MOVEUSD"]},"amount":{"type":"string","description":"Stringified number"}},"description":"The sum of all the fees that will be charged"},"receipt":{"type":"object","required":["type","id"],"properties":{"type":{"type":"string","enum":["SOLANA_TRANSACTION_SIGNATURE"]},"id":{"type":"string","description":"Solana blockchain transaction signature"}},"description":"On-chain receipt for this transfer"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp of when this transfer was last updated"},"senderMessage":{"type":"string","description":"The message from the sender that will be visible to the receiver."}}}}}},"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"}}}},"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"},{"url":"https://api.cfx.to","description":"Production"}],"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}],"tags":[{"name":"Ledger Account"}],"externalDocs":{"description":"Find out more about CFX","url":"https://www.cfxlabs.com/"}}