- goal: ์ถ๊ธ ๊ณ์ข์์ ๋ค๋ฅธ ๊ณ์ข๋ก ์ด์ฒดํ๋ค.
- endpoint:
POST /transfers/{idempotencyKey} - Content-Type:
application/json - Authorization:
Bearer {accessToken} - ์์๋ฃ: ์ด์ฒด ๊ธ์ก์ 1%๋ฅผ ์ถ๊ธ ๊ณ์ข์์ ์ถ๊ฐ ์ฐจ๊ฐํ๋ค.
- path
idempotencyKey: ๋ฉฑ๋ฑํค
- body
fromAccountId: ์ถ๊ธ ๊ณ์ข IDtoAccountId: ์ ๊ธ ๊ณ์ข IDamount: ์ด์ฒด ๊ธ์ก
POST /transfers/{idempotencyKey}
Content-Type: application/json
Authorization: Bearer {accessToken}
{
"fromAccountId": 1,
"toAccountId": 2,
"amount": 10000
}- status:
200 OK - body
status:SUCCEEDED | FAILED | IN_PROGRESStransferId: ๊ฑฐ๋ IDerrorCode: ์คํจ ์ฝ๋
FAILED๋ HTTP ์๋ฌ ๋์ ์๋ต body๋ก ๋ฐํ๋๋ค.
ํ์ฌ ๊ตฌํ์์ ์์ฃผ ๋์ค๋ errorCode๋ ์๋์ ๊ฐ๋ค.
INVALID_REQUESTACCOUNT_NOT_FOUNDOWNER_NOT_FOUNDMEMBER_NOT_FOUNDINSUFFICIENT_BALANCEDAILY_LIMIT_EXCEEDED
{
"status": "SUCCEEDED",
"transferId": 456,
"errorCode": null
}-
status:
400 Bad Request -
context
- request body validation failure
- idempotency key expired
- same idempotency key with different request body
-
status:
401 Unauthorized -
context
- authentication required
-
status:
404 Not Found -
context
- idempotency key not found
-
status:
500 Internal Server Error -
context
- unexpected persistence failure