APIエンドポイント
- サーバー間通信
- トークン化
- サブスクリプション
- ウォレット
- ホスト決済ページ
エラーとレスポンス
ウェブフック
購入
購入API (v1)
このAPIは認証後に即座に金額をキャプチャします。
POST
/
api
/
v1
/
server-to-server-interface
/
payment
Copy
Ask AI
curl --request POST \
--url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/payment \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"amount": "1000",
"currency": "JPY",
"card": {
"cvc": "100",
"expiry_month": "12",
"expiry_year": "24",
"name": "John Doe",
"number": "5200000000001005"
},
"merchant_txn_ref": "qwe",
"customer_ip": "127.0.0.1",
"merchant_id": "< Merchant ID >",
"return_url": {
"webhook_url": "< Webhook url >",
"success_url": "http://www.successurl.com/",
"decline_url": "http://www.declineurl.com/"
},
"billing_address": {
"country": "JP",
"email": "billing@testemail.com",
"phone_number": "8112345678",
"address1": "1-2-3 Shinjuku",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
},
"shipping_address": {
"country": "JP",
"email": "shipping@testemail.com",
"phone_number": "8112345678",
"address1": "1-2-3 Shinjuku",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
},
"browser_info": {
"acceptHeader": "text/html",
"screenColorDepth": "48",
"javaEnabled": false,
"language": "en",
"screenHeight": "1200",
"screenWidth": "1600",
"challengeWindow": "4",
"userAgent": "Mozilla/4.0 (MSIE 6.0; Windows NT 5.0)"
},
"time_zone": "Asia/Kuala_Lumpur"
}'
Copy
Ask AI
{
"success": true,
"status_code": 201,
"is_live": false,
"transaction_type": "PRE_AUTH",
"gateway_response": {
"version": "1",
"type": "INFO",
"message": "Payment Successful.",
"code": "INFO0000"
},
"merchant_details": {
"legal_name": "Tink15 Factory",
"mid": "< Merchant ID >",
"merchant_txn_ref": "qwe",
"billing_details": {
"billing_address": {
"country": "JP",
"email": "billing@testemail.com",
"phone_number": "8112345678",
"address1": "1-2-3 Shinjuku",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
}
},
"device_details": {
"visited_ip": "127.0.0.1",
"merchant_ip": "127.0.0.1",
"customer_ip": "127.0.0.1"
}
},
"payment_details": {
"amount": 1000,
"response_code": 0,
"auth_code": "917290",
"currency": "JPY",
"payment_method": "ECMC-SSL",
"scheme": "MASTERCARD",
"card": {
"name": "John Doe",
"number": "5200000000001005",
"exp_month": "12",
"exp_year": "24"
},
"additional_data": {
"payment_data_source": {
"type": "card"
}
}
},
"transaction_details": {
"id": "ab8444e7-fec0-40dd-994d-0ad813785f74",
"ref": 74797,
"timestamp": "2024-11-25T07:22:48.000Z",
"merchant_txn_ref": "qwe",
"stored_payment_method_id": null
},
"risk-details": {
"risk_score": null
}
}
注意: 購入API (v1) は非推奨予定です。将来の統合にはバージョン2をご使用ください。
重要なポイント
-
購入APIは、資金を即座にキャプチャし、認証することで、決済を同時に処理して完了させます。
-
このAPIは、金額が固定され、支払いが即座に完了する必要がある取引に最適です。例えば、オンライン小売の購入やデジタル商品販売などです。
-
購入が成功した後、必要に応じて取引を返金することができ、加盟店は顧客に資金を返金できます。
フローダイアグラム
APIパラメータ
Authorizations
認証のためのAPIキー。形式:'Basic YOUR_API_KEY_HERE'
x-api-key専用のAPIキー。
Body
application/json
決済トランザクションを処理するためのリクエストペイロード。
The body is of type object
.
Response
201 - application/json
支払いが正常に承認されました
The response is of type object
.
Copy
Ask AI
curl --request POST \
--url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/payment \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"amount": "1000",
"currency": "JPY",
"card": {
"cvc": "100",
"expiry_month": "12",
"expiry_year": "24",
"name": "John Doe",
"number": "5200000000001005"
},
"merchant_txn_ref": "qwe",
"customer_ip": "127.0.0.1",
"merchant_id": "< Merchant ID >",
"return_url": {
"webhook_url": "< Webhook url >",
"success_url": "http://www.successurl.com/",
"decline_url": "http://www.declineurl.com/"
},
"billing_address": {
"country": "JP",
"email": "billing@testemail.com",
"phone_number": "8112345678",
"address1": "1-2-3 Shinjuku",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
},
"shipping_address": {
"country": "JP",
"email": "shipping@testemail.com",
"phone_number": "8112345678",
"address1": "1-2-3 Shinjuku",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
},
"browser_info": {
"acceptHeader": "text/html",
"screenColorDepth": "48",
"javaEnabled": false,
"language": "en",
"screenHeight": "1200",
"screenWidth": "1600",
"challengeWindow": "4",
"userAgent": "Mozilla/4.0 (MSIE 6.0; Windows NT 5.0)"
},
"time_zone": "Asia/Kuala_Lumpur"
}'
Copy
Ask AI
{
"success": true,
"status_code": 201,
"is_live": false,
"transaction_type": "PRE_AUTH",
"gateway_response": {
"version": "1",
"type": "INFO",
"message": "Payment Successful.",
"code": "INFO0000"
},
"merchant_details": {
"legal_name": "Tink15 Factory",
"mid": "< Merchant ID >",
"merchant_txn_ref": "qwe",
"billing_details": {
"billing_address": {
"country": "JP",
"email": "billing@testemail.com",
"phone_number": "8112345678",
"address1": "1-2-3 Shinjuku",
"city": "Shinjuku-ku",
"state": "Tokyo",
"postal_code": "1600022"
}
},
"device_details": {
"visited_ip": "127.0.0.1",
"merchant_ip": "127.0.0.1",
"customer_ip": "127.0.0.1"
}
},
"payment_details": {
"amount": 1000,
"response_code": 0,
"auth_code": "917290",
"currency": "JPY",
"payment_method": "ECMC-SSL",
"scheme": "MASTERCARD",
"card": {
"name": "John Doe",
"number": "5200000000001005",
"exp_month": "12",
"exp_year": "24"
},
"additional_data": {
"payment_data_source": {
"type": "card"
}
}
},
"transaction_details": {
"id": "ab8444e7-fec0-40dd-994d-0ad813785f74",
"ref": 74797,
"timestamp": "2024-11-25T07:22:48.000Z",
"merchant_txn_ref": "qwe",
"stored_payment_method_id": null
},
"risk-details": {
"risk_score": null
}
}
アシスタント
Responses are generated using AI and may contain mistakes.