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.
Request
Response
Path
Name | Length | Description | Required |
---|---|---|---|
orderId | 100 | Order ID. Enter the ID generated by the merchant to manage orders. Apply URL encoding when entering the ID. |
Query
None
Body
Name | Type | Length | Description | Required |
---|---|---|---|---|
amount | number | Payment amount | ||
currency | string | 3 | Payment currency code (ISO 4217). Supported currency codes are as follows.
| |
promotionRestriction | object | 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
bash
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