Developers
V1
V2

Save payment amount API

Saves the payment amount before calling the payment window to block the payment process in case of forgery or falsification of the payment amount when making an authenticated payment.

POST https://api.iamport.kr/payments/prepare

Saves the payment amount before calling the payment window.

If the payment amount of the order saved on the merchant-side is different from the amount passed to IMP.requestpay() for the same merchant


uid, the PG payment window call is blocked.

Parameters

Body

merchant_uid*
String

Merchant order ID

amount*
double

Payment amount

Responses

200: OK
Success

code * integer

Response code

0: success, Not 0: check the message

message * string

Response message

A non-zero code includes a message like โ€˜Invalid payment infoโ€™.

response (PaymentPrepareAnnotation, optional)

merchant_uid * string

Merchant order ID

amount * number

Payment amount

401: Unauthorized
Missing or invalid access token
{
  // Response
}

Response Model Schema

{
  "code": 0,
  "message": "string",
  "response": {
    "merchant_uid": "string",
    "amount": 0
  }
}