Skip to main content

Capture

Captures the payment. If payment confirmation and capture are separated, and a payment request has been made, the merchant must call this API to execute the capture and complete the payment.

POST /v2/payments/orders/{orderId}/capture

The captured amount may differ from the payment amount entered when you requested payment.

Set the read timeout to at least 20 seconds.

Path

Name
LengthDescription
Required
orderId100

Order ID. Enter the ID generated by the merchant to manage orders. Apply URL encoding when entering the ID.

Query

None

Body

Name
TypeLengthDescription
Required
amountnumber

Payment amount

currencystring3

Payment currency code (ISO 4217). Supported currency codes are as follows.

  • "USD"
  • "TWD"
  • "THB"
promotionRestrictionobject

Promotion restriction information. Enter the price for products where promotions cannot be applied due to laws or regulations.

Headers
  • Content-Type
  • X-LINE-ChannelId
  • X-LINE-ChannelSecret
  • X-LINE-MerchantDeviceProfileId
  • X-LINE-MerchantDeviceType

For more information, see Request header.

Request examples

curl -X POST \
-H "Content-Type: application/json" \
-H "X-LINE-ChannelId: YOUR_CHANNEL_ID" \
-H "X-LINE-ChannelSecret: YOUR_CHANNEL_SECRET" \
-H "X-LINE-MerchantDeviceProfileId: YOUR_DEVICE_PROFILE_ID" \
-d '{
"amount": 100,
"currency": "THB",
"extras": {
"promotionRestriction": {
"useLimit": 20,
"rewardLimit": 20
}
}' \
https://sandbox-api-pay.line.me/v2/payments/orders/merchant_test_order_1/capture