POST
/
api
/
v1
/
server-to-server-interface
/
hpp
/
generate
/
link
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 '{
  "amount": "1000",
  "currency": "PHP",
  "payment_method": {
    "type": "gcash"
  },
  "merchant_txn_ref": "qwe",
  "customer_ip": "127.0.0.1",
  "merchant_id": "< Webhook url >",
  "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": {
    "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"
  },
  "time_zone": "Asia/Kuala_Lumpur"
}'
{
  "id": "c0728395-6a55-4f10-819e-03bdc917c4b1",
  "url": "https://checkout-dev.paymentoptions.com/HostedPaymentPage/GGNDZOmv",
  "amount": 1000,
  "currency": "PHP",
  "merchant_txn_ref": "qwe",
  "merchant_id": "< Webhook url >",
  "merchant_email": null,
  "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",
    "state": "Tokyo",
    "country": "JP",
    "address1": "1-2-3 Shinjuku",
    "postal_code": "1600022",
    "phone_number": "8112345678"
  },
  "shipping_address": {
    "city": "Shinjuku-ku",
    "email": "shipping@testemail.com",
    "state": "Tokyo",
    "country": "JP",
    "address1": "1-2-3 Shinjuku",
    "postal_code": "1600022",
    "phone_number": "8112345678"
  }
}

重要なポイント

加盟店設定

  • GCashの加盟店ID は、ペイロードに含め、payment_method タイプを gcash に設定する必要があります。

  • 加盟店がGCashに設定されている場合、HPPはEウォレット決済リンクを生成し、顧客がGCashを通じて支払いを完了できるようにします。サポートされているEウォレットのすべてを表示…

Eウォレットリンク

  • HPPは、顧客がGCashを通じて支払うオプションを表示するか、顧客が使用できるEウォレットリンクを生成して提供します。

  • これにより、GCash Eウォレットを使用して取引を完了する顧客にとってスムーズなプロセスが確保されます。

Authorizations

Authorization
string
header
required

認証のためのAPIキー。フォーマット: 'Basic YOUR_API_KEY_HERE'

x-api-key
string
header
required

x-api-key専用のAPIキー。

Body

application/json
HPPリンクを生成するためのペイロード。
amount
string
required

取引の金額。空の文字列として渡された場合、カード所有者がHPP上で手動で金額を入力します。

Example:

"1000"

currency
string
required

取引の処理通貨の略称(例:PHP=フィリピンペソ)。

Maximum length: 3
Example:

"PHP"

merchant_id
string
required

加盟店のユニーク識別子(DASMID)。

Maximum length: 128
Example:

"< Webhook url >"

return_url
object
required

リターンURLを含むJSONオブジェクト。(このフィールドは3Dセキュア取引で必須です。)

payment_method
object

決済方法の詳細を含むJSONオブジェクト。

merchant_txn_ref
string

加盟店の取引参照ID。

Maximum length: 45
Example:

"qwe"

customer_ip
string

取引を開始する顧客のIPアドレス。

Example:

"127.0.0.1"

billing_address
object

カード所有者の請求先住所を含むJSONオブジェクト。

shipping_address
object

カード所有者の配送先住所を含むJSONオブジェクト。

time_zone
string

取引のタイムゾーン。

Example:

"Asia/Kuala_Lumpur"

Response

200 - application/json
HPPリンクが正常に生成されました。
id
string

取引参照ID。

Example:

"c0728395-6a55-4f10-819e-03bdc917c4b1"

url
string

生成されたホスト決済ページのURL。

Example:

"https://checkout-dev.paymentoptions.com/HostedPaymentPage/GGNDZOmv"

amount
integer

取引金額。

Example:

1000

currency
string

処理通貨。

Example:

"PHP"

merchant_txn_ref
string

加盟店取引参照ID。

Example:

"qwe"

merchant_id
string

取引の加盟店ID。

Example:

"< Webhook url >"

merchant_email
string

加盟店のメールアドレス(利用可能な場合)。

Example:

null

return_url
object

取引結果のリターンURL。

billing_address
object

請求先住所の詳細。

shipping_address
object

配送先住所の詳細。