고객 인보이스 조회 링크 발급
curl --request POST \
--url https://meterengine.com/v1/invoices/{id}/view-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allow_payment_retry": false,
"expires_in_days": 45
}
'const url = 'https://meterengine.com/v1/invoices/{id}/view-links';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allow_payment_retry: false, expires_in_days: 45})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"allow_payment_retry": true,
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"token": "<string>"
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}인보이스 조회 링크
고객 인보이스 조회 링크 발급
로그인 없이 인보이스 하나를 조회하는 링크를 만든다. token은 발급 응답에만 제공하고 해시만 저장한다. 기본 30일, 최대 90일이며 폐기할 수 있다. 결제 상태는 발급 당시 test/live 모드로 조회한다. 링크를 가진 사람이 조회할 수 있으므로 고객에게만 전달한다. 재시도를 허용하는 링크를 API 키로 만들면 키의 모드가 지금 결제 모드와 같아야 하고, 다르면 409 payment_mode_mismatch다.
POST
/
v1
/
invoices
/
{id}
/
view-links
고객 인보이스 조회 링크 발급
curl --request POST \
--url https://meterengine.com/v1/invoices/{id}/view-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allow_payment_retry": false,
"expires_in_days": 45
}
'const url = 'https://meterengine.com/v1/invoices/{id}/view-links';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allow_payment_retry: false, expires_in_days: 45})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"allow_payment_retry": true,
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "<string>",
"revoked_at": "2023-11-07T05:31:56Z",
"token": "<string>"
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}{
"code": "validation_error",
"message": "서버 내부 오류입니다",
"errors": [
{
"field": "event_type",
"message": "공백일 수 없습니다"
}
]
}인증
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
경로 매개변수
본문
application/json