Pre-approved payment request
Requests a pre-approved payment from the LINE Pay server using the issued pre-approved payment key.
POST /v3/payments/preapprovedPay/{regKey}/payment
Set the read timeout to at least 20 seconds.
Request
Response
Path
Name | Description | Required |
---|---|---|
regKey | Issued pre-approved payment key |
Query
None
Body
Name | Type | Length | Description | Required |
---|---|---|---|---|
amount | number | Payment amount | ||
capture | boolean | Whether to capture automatically. Determines whether to process a capture and a pre-approved payment simultaneously or separately. The default value is
| ||
currency | string | 3 | Payment currency code (ISO 4217). Supported currency codes are as follows.
| |
orderId | string | 100 | Order ID. Enter the ID generated by the merchant to manage orders. | |
productName | string | 4000 | Product name |
Headers
- Content-Type
- X-LINE-Authorization
- X-LINE-Authorization-Nonce
- X-LINE-ChannelId
- X-LINE-MerchantDeviceProfileId
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-Authorize-Nonce: 6120489b-53f3-4c51-9d6f-b80be93e509a"\
-H "X-LINE-Authorization: PROCESSED_SIGNATURE" \
-H "X-LINE-MerchantDeviceProfileId: YOUR_DEVICE_PROFILE_ID" \
-d '{
"productName": "Brown pen",
"amount": 1000,
"currency": "TWD",
"orderId": "Ord2018123100000001"
}' \
https://sandbox-api-pay.line.me/v3/payments/preapprovedPay/RK123asd213/payment