결제
대기 환불 처리
주문 취소와 환불을 나눠 대기로 남긴 환불(`status` `HELD`, 판매자 취소 `holdRefund`)을 PG로 환불한다(#115). 스코프 `order:rw`. - 한 번만 처리된다 — 대기가 아니면 409 `REFUND_NOT_HELD`. - 결과는 환불 이력 행 그대로다(`SUCCEEDED`·`FAILED`). 실패하면 결제 상세에 실패 사유가 남는다.
POST
주문 취소와 환불을 나눠 대기로 남긴 환불(status HELD, 판매자 취소 holdRefund)을 PG로 환불한다(#115). 스코프 order:rw.
- 한 번만 처리된다 — 대기가 아니면 409
REFUND_NOT_HELD. - 결과는 환불 이력 행 그대로다(
SUCCEEDED·FAILED). 실패하면 결제 상세에 실패 사유가 남는다.
accessTokenheader
AuthorizationBearer <token>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
refundId*stringX-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
성공
application/json- response
meta*data*error*|nullcurl -X POST 'https://api.sayren.io/v1/payments/refunds/string/process' \ -H 'X-Store-Id: string'{ "meta": { "status": 200, "code": "OK", "message": "OK", "isSuccess": true }, "data": { "refundId": "string", "amount": 0, "pointRefundAmount": 0, "reason": "string", "kind": "string", "status": "string", "failMessage": "string", "requestedAt": "string", "completedAt": "string" }, "error": null}