跳到主要内容

执行 Peer To Peer 交易

注意

此方法只能用于同一集成合作方下 QI 账户之间的交易。

Request

ENDPOINT
/account/SOURCE_ACCOUNT_KEY/transaction/peer_to_peer
MÉTODO
POST

Path params

字段类型描述字符数
source_account_key *uuidv4标识转账来源账户的唯一密钥。36
Request Body
{
"transaction_amount": 15,
"request_control_key": "540ca9f6-7ccf-42a8-92d2-eafa6c8ac152",
"target_account_key": "f8b5d8cf-23d3-47eb-8f2d-c97278372ecf",
"description": "Compra com autorização externa"
}

Body Atributes

字段类型描述字符数
transaction_amount *float从来源账户转至目标账户的金额。小数点后2位的浮点数
request_control_key *uuidv4用于维护交易幂等性的唯一标识密钥。36
target_account_key *uuidv4标识转账目标账户的唯一密钥。36
description *string用于在账户流水中识别的交易描述。36

Response

STATUS
201
Response Body
{
"peer_to_peer_transaction_key": "c102f984-d93c-4d74-aca1-bbf83310c835",
"request_control_key": "540ca9f6-7ccf-42a8-92d2-eafa6c8ac152",
"transactions": [
{
"account_balance": 15.0,
"account_branch": "0001",
"account_number": "7107708",
"description": "Compra com autorização externa",
"document_number": "30461737337",
"source_account_key": "cf069da7-5f3e-4808-9cfa-ac49a3928b70",
"target_account_key": "f8b5d8cf-23d3-47eb-8f2d-c97278372ecf",
"transacted_at": "2020-08-06 19:22:06",
"transaction_amount": 15,
"transaction_key": "848d3ff7-4e98-4911-8773-f1d1b48c3068"
},
{
"account_balance": 35.0,
"account_branch": "0001",
"account_number": "9629460",
"description": "Compra com autorização externa",
"document_number": "74106519461",
"source_account_key": "f8b5d8cf-23d3-47eb-8f2d-c97278372ecf",
"target_account_key": "cf069da7-5f3e-4808-9cfa-ac49a3928b70",
"transacted_at": "2020-08-06 19:22:06",
"transaction_amount": -15,
"transaction_key": "848d3ff7-4e98-4911-8773-f1d1b48c3068"
}
]
}

STATUS
4XX
Response Body
{
"title": "titulo",
"description": "description in English",
"translation": "descrição em portugues",
"code": "codigo"
}
HTTP 状态码QI 代码
code
标题
title
英文描述
Description
葡语描述
translation
404ACC000208Account not foundAccount not found.Conta não encontrada.
405ACC000209Method not alloweyou are not allowed to call this method.Você não tem permissão para este método.
403ACC000210ForbiddenEscrow account are not allowed to call this method.Método não permitido para contas escrow.
409ACC000211ConflictDuplicated request control key request_control_key.Entrada duplicada para request control key request_control_key.
402ACC000027Account Balance ErrorAccount balance must not be negative after the transaction.Saldo da conta não pode ser negativo após a transação.