使用Wise API创建转账时遭遇Not Found错误的原因排查
Wise沙箱环境创建转账时出现"Not Found"错误的可能原因
问题背景
创建收款人和报价(Quote)均成功,但向沙箱环境接口https://api.sandbox.transferwise.tech/v1/transfers发送POST请求创建转账时,收到如下错误响应:
{ "errors": [ { "code": "not.found", "message": "Not Found", "arguments": [] } ] }
请求内容示例:
{ "sourceAccount": ..., "targetAccount": ..., "quoteUuid": "...-...-...-...-...", "customerTransactionId": "...-...-...-...-...", "details": { "reference": "to my friend", "transferPurpose": "verification.transfers.purpose.pay.bills", "transferPurposeSubTransferPurpose": "verification.sub.transfers.purpose.pay.interpretation.service", "sourceOfFunds": "verification.source.of.funds.other" } }
已确认所有ID正确,customerTransactionId为随机生成。
可能的原因
- 请求体字段名错误:Wise转账API要求的账户字段名是
sourceAccountId和targetAccountId,而非请求体中的sourceAccount和targetAccount。字段名不匹配会导致服务器无法定位关联资源,返回"Not Found"。 - 接口版本路径过时:当前Wise API的转账接口主流版本为
v3,v1版本可能已被废弃或沙箱环境不再支持,使用过时的接口路径会触发404错误。 - Quote已过期:Quote存在有效期(通常约2分钟),若创建Quote后间隔过久才发起转账请求,Quote会失效,服务器无法找到有效报价资源,从而返回该错误。
- 认证/权限问题:尽管创建收款人和Quote成功,但转账接口可能需要额外的权限(比如API密钥的转账权限未开启),或请求头中的认证信息有误(如沙箱与生产环境的密钥混淆),导致服务器拒绝定位资源。
- 目标账户状态异常:沙箱环境中的收款人账户可能因未完成验证、数据重置等原因变为无效状态,关联转账时服务器无法找到有效目标账户,返回"Not Found"。
内容的提问来源于stack exchange,提问作者Kostya Tereshchuk Cliverse Dev
相关产品推荐
相关产品推荐

