APIエンドポイント
- サーバー間通信
- トークン化
- サブスクリプション
- ウォレット
- ホスト決済ページ
エラーとレスポンス
ウェブフック
ホスト決済ページ
トークン化
取引をキャプチャするためのホスト型決済ページ(HPP)を開くリンクを生成します。
POST
/
api
/
v1
/
server-to-server-interface
/
hpp
/
generate
/
link
Copy
Ask AI
curl --request POST \
--url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/hpp/generate/link \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"return_url": {
"webhook_url": "< Webhook url >",
"success_url": "http://www.successurl.com/",
"decline_url": "http://www.declineurl.com/",
"cancel_url": "http://cancelurl.com/"
},
"amount": 1000,
"currency": "JPY",
"merchant_id": "< Merchant ID >",
"merchant_email": "merchant@testemail.com",
"merchant_txn_ref": "2003089893366DTEST",
"payment_method": {
"type": "scheme",
"store_payment_method": true
},
"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"
}
}'
Copy
Ask AI
{
"id": "f49173ce-4916-445c-a831-3c1468acf14e",
"url": "https://checkout-dev.paymentoptions.com/jp/HostedPaymentPage/hKJsdByR",
"amount": 1000,
"currency": "JPY",
"merchant_txn_ref": "2003089893366DTEST",
"merchant_id": "< Merchant ID >",
"merchant_email": "merchant@testemail.com",
"return_url": {
"webhook_url": "< Webhook url >",
"success_url": "http://www.successurl.com/",
"decline_url": "http://www.declineurl.com/",
"cancel_url": "http://cancelurl.com/"
},
"billing_address": {
"city": "Shinjuku-ku",
"email": "billing@testemail.com",
"phone_number": "8112345678",
"state": "Tokyo",
"country": "JP",
"address1": "1-2-3 Shinjuku",
"postal_code": "1600022"
},
"shipping_address": {
"city": "Shinjuku-ku",
"email": "shipping@testemail.com",
"phone_number": "8112345678",
"state": "Tokyo",
"country": "JP",
"address1": "1-2-3 Shinjuku",
"postal_code": "1600022"
}
}
重要なポイント
-
ペイロードにデータ(例:金額、通貨、顧客詳細、return_url、決済方法)が事前入力されている場合、これらの詳細はHPPに反映され、スムーズなユーザー体験を提供します。
-
ペイロードに必要なデータが欠けている場合、顧客はHPPで不足している情報を手動で入力する必要があります。
-
必要なヘッダーと認証詳細が含まれていることを確認し、HPPリンクを正常に生成します。
フローダイアグラム
ノート
store_payment_method
: 将来の使用のためにカードトークンを保存するには、ペイロードでtrue
に設定する必要があります。
リクエスト例
Copy
Ask AI
{
"payment_method": {
"type": "scheme",
"store_payment_method": true
}
store_payment_method
を true
に設定すると、カードトークンが保存され、今後の取引でカード詳細を再入力する必要がなくなります。
レスポンス例
Copy
Ask AI
{
"transaction_details": {
"id": "<transaction_id>",
"ref": <ref>,
"timestamp": "yyyy-mm-ddThh:mm:ss.000Z",
"merchant_txn_ref": "<string>",
"stored_payment_method_id": "094db781-fabc-4c6d-8fcd-18bee06a527a"
}
}
stored_payment_method_id
は、カード詳細を再入力することなく、今後の取引でカードトークンAPIを使用するために利用できます。
APIパラメータ
Authorizations
認証のためのAPIキー。フォーマット: 'Basic YOUR_API_KEY_HERE'
x-api-key専用のAPIキー。
Body
application/json
HPPリンクを生成するためのリクエストペイロード。
The body is of type object
.
Response
200 - application/json
HPPリンクが正常に生成されました
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/hpp/generate/link \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"return_url": {
"webhook_url": "< Webhook url >",
"success_url": "http://www.successurl.com/",
"decline_url": "http://www.declineurl.com/",
"cancel_url": "http://cancelurl.com/"
},
"amount": 1000,
"currency": "JPY",
"merchant_id": "< Merchant ID >",
"merchant_email": "merchant@testemail.com",
"merchant_txn_ref": "2003089893366DTEST",
"payment_method": {
"type": "scheme",
"store_payment_method": true
},
"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"
}
}'
Copy
Ask AI
{
"id": "f49173ce-4916-445c-a831-3c1468acf14e",
"url": "https://checkout-dev.paymentoptions.com/jp/HostedPaymentPage/hKJsdByR",
"amount": 1000,
"currency": "JPY",
"merchant_txn_ref": "2003089893366DTEST",
"merchant_id": "< Merchant ID >",
"merchant_email": "merchant@testemail.com",
"return_url": {
"webhook_url": "< Webhook url >",
"success_url": "http://www.successurl.com/",
"decline_url": "http://www.declineurl.com/",
"cancel_url": "http://cancelurl.com/"
},
"billing_address": {
"city": "Shinjuku-ku",
"email": "billing@testemail.com",
"phone_number": "8112345678",
"state": "Tokyo",
"country": "JP",
"address1": "1-2-3 Shinjuku",
"postal_code": "1600022"
},
"shipping_address": {
"city": "Shinjuku-ku",
"email": "shipping@testemail.com",
"phone_number": "8112345678",
"state": "Tokyo",
"country": "JP",
"address1": "1-2-3 Shinjuku",
"postal_code": "1600022"
}
}
アシスタント
Responses are generated using AI and may contain mistakes.