결제 링크(Invoice)를 생성하여 고객에게 전송해요. 고객은 링크를 통해 결제 페이지에 접속해 결제를 완료할 수 있어요.
코드 없이 생성하려면
관리자 콘솔에서 UI로 링크페이를 생성할 수도 있어요. → 관리자에서 생성
API 엔드포인트
POST
https://api.bootapi.com/v1/invoicesBasic Auth활용 시나리오
| 시나리오 | 설명 |
|---|---|
| 비대면 결제 | 고객에게 결제 링크를 SMS/이메일로 발송 |
| 오프라인 연동 | 매장에서 결제 링크를 생성하여 고객에게 전송 |
| 반복 청구 | 정기적으로 청구서를 생성하여 발송 |
처리 흐름
- 결제 안내 메시지 발송 (이메일, SMS, 알림톡)
- 고객이 링크 클릭 후 결제 진행
- 결제 완료 시 Webhook으로 결과 전달
- 고객에게 완료 알림 발송
링크 생성 전 결제 대상 고객 정보(이메일, 휴대폰 번호, 이름)를 먼저 등록해두면 user 파라미터로 바로 연결할 수 있어요.
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
name |
String | 필수 | 주문명 |
price |
Integer | 필수 | 결제 금액 |
tax_free_price |
Integer | 선택 | 면세 금액 |
order_id |
String | 선택 | 가맹점 고유 주문 ID |
redirect_url |
String | 선택 | 결제 완료 후 이동할 URL |
use_notification |
Boolean | 선택 | 알림 자동 발송 여부 |
send_types |
Array | 선택 | 발송 유형 [1: SMS, 2: 카카오톡] |
expired_at |
String | 선택 | 링크 만료 시간 (ISO 8601) |
expire_in |
Integer | 선택 | 만료까지 남은 시간 (초) |
metadata |
Object | 선택 | 추가 데이터 |
user |
Object | 선택 | 고객 정보 |
user.email |
String | 선택 | 고객 이메일 |
user.phone |
String | 선택 | 고객 전화번호 |
products |
Array | 선택 | 상품 목록 |
products[].product_id |
String | 선택 | 상품 ID |
products[].quantity |
Integer | 선택 | 수량 |
products[].duration |
Integer | 선택 | 구독 기간 (-1: 무제한) |
코드 예제
const { BootpayCommerce } = require('@bootpay/backend-js')
const commerce = new BootpayCommerce({
client_key: 'your-commerce-client-key',
secret_key: 'your-commerce-secret-key',
mode: 'production'
})
const response = await commerce.invoice.create({
name: 'Professional 플랜 구독',
price: 29900,
use_notification: true,
send_types: [1, 2],
expired_at: '2025-08-01T23:59:59Z',
redirect_url: 'https://myshop.com/payment/complete',
user: {
email: 'user@example.com',
phone: '01012345678'
},
products: [
{
product_id: '67c95e64d01640bb9859c629',
quantity: 1,
duration: -1
}
]
})
console.log('payment_url:', response.payment_url)javascriptfrom bootpay_backend import BootpayCommerce
commerce = BootpayCommerce(
client_key='your-commerce-client-key',
secret_key='your-commerce-secret-key',
mode='production'
)
response = commerce.invoice.create(
name='Professional 플랜 구독',
price=29900,
use_notification=True,
send_types=[1, 2],
expired_at='2025-08-01T23:59:59Z',
redirect_url='https://myshop.com/payment/complete',
user={
'email': 'user@example.com',
'phone': '01012345678'
},
products=[
{
'product_id': '67c95e64d01640bb9859c629',
'quantity': 1,
'duration': -1
}
]
)
print('payment_url:', response['payment_url'])pythonuse Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi('your-commerce-client-key', 'your-commerce-secret-key');
$response = $commerce->invoice->create([
'name' => 'Professional 플랜 구독',
'price' => 29900,
'use_notification' => true,
'send_types' => [1, 2],
'expired_at' => '2025-08-01T23:59:59Z',
'redirect_url' => 'https://myshop.com/payment/complete',
'user' => [
'email' => 'user@example.com',
'phone' => '01012345678'
],
'products' => [
[
'product_id' => '67c95e64d01640bb9859c629',
'quantity' => 1,
'duration' => -1
]
]
]);
echo 'payment_url: ' . $response['payment_url'];phpimport kr.co.bootpay.store.BootpayStore;
import kr.co.bootpay.store.model.request.TokenPayload;
TokenPayload tp = new TokenPayload("your-commerce-client-key", "your-commerce-secret-key");
BootpayStore commerce = new BootpayStore(tp);
HashMap<String, Object> user = new HashMap<>();
user.put("email", "user@example.com");
user.put("phone", "01012345678");
HashMap<String, Object> product = new HashMap<>();
product.put("product_id", "67c95e64d01640bb9859c629");
product.put("quantity", 1);
product.put("duration", -1);
HashMap<String, Object> params = new HashMap<>();
params.put("name", "Professional 플랜 구독");
params.put("price", 29900);
params.put("use_notification", true);
params.put("send_types", Arrays.asList(1, 2));
params.put("expired_at", "2025-08-01T23:59:59Z");
params.put("redirect_url", "https://myshop.com/payment/complete");
params.put("user", user);
params.put("products", Arrays.asList(product));
HashMap<String, Object> response = commerce.invoice.create(params);
System.out.println("payment_url: " + response.get("payment_url"));javacommerce = BootpayStore::Api.new('your-commerce-client-key', 'your-commerce-secret-key')
response = commerce.invoice_create(
name: 'Professional 플랜 구독',
price: 29900,
use_notification: true,
send_types: [1, 2],
expired_at: '2025-08-01T23:59:59Z',
redirect_url: 'https://myshop.com/payment/complete',
user: {
email: 'user@example.com',
phone: '01012345678'
},
products: [
{
product_id: '67c95e64d01640bb9859c629',
quantity: 1,
duration: -1
}
]
)
puts "payment_url: #{response['payment_url']}"rubyimport "github.com/bootpay/backend-go/v2"
commerce := bootpay.NewCommerceApi("your-commerce-client-key", "your-commerce-secret-key")
response, err := commerce.Invoice.Create(bootpay.InvoiceCreateParams{
Name: "Professional 플랜 구독",
Price: 29900,
UseNotification: true,
SendTypes: []int{1, 2},
ExpiredAt: "2025-08-01T23:59:59Z",
RedirectUrl: "https://myshop.com/payment/complete",
User: bootpay.UserParams{
Email: "user@example.com",
Phone: "01012345678",
},
Products: []bootpay.ProductParams{
{
ProductId: "67c95e64d01640bb9859c629",
Quantity: 1,
Duration: -1,
},
},
})
fmt.Println("payment_url:", response["payment_url"])gousing Bootpay.Commerce;
var commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
var response = await commerce.Invoice.Create(new {
name = "Professional 플랜 구독",
price = 29900,
use_notification = true,
send_types = new[] { 1, 2 },
expired_at = "2025-08-01T23:59:59Z",
redirect_url = "https://myshop.com/payment/complete",
user = new {
email = "user@example.com",
phone = "01012345678"
},
products = new[] {
new {
product_id = "67c95e64d01640bb9859c629",
quantity = 1,
duration = -1
}
}
});
Console.WriteLine($"payment_url: {response.PaymentUrl}");csharp응답
성공 응답
{
"payment_url": "https://pay.bootpay.co.kr/invoice/abc123def456",
"invoice_id": "inv_687a1b2c3d4e5f",
"expired_at": "2025-08-01T23:59:59Z"
}json응답 필드 설명
| 필드 | 타입 | 설명 |
|---|---|---|
payment_url |
String | 고객에게 전달할 결제 페이지 URL |
invoice_id |
String | 생성된 링크페이 ID |
expired_at |
String | 링크 만료 시간 |
에러 코드
공통 에러
인증·권한 관련 에러는 에러 코드표를 참고해요.
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
INVOICE_NOT_FOUND |
링크페이 정보가 없어요 | invoice_id를 확인해요 |
INVOICE_DENIED |
링크페이 정보에 조회권한이 없는 회원세션이에요 | 올바른 API 키를 사용하고 있는지 확인해요 |
use_notification: true로 설정하면 고객에게 SMS, 카카오톡, 이메일로 결제 링크가 자동 발송돼요.
