始めましょう
Access APIの使用を開始するための最初のステップ。
前提条件:実装マネージャーからAccess Worldpayの認証情報を取得し、
ヘッダーの設定
ヘッダーの設定は、統合の重要な部分です。ヘッダーは、APIリクエストに関連付けられたメタデータを表します。
Authorization: {your_credentials}
Content-Type: {API specific Content-Type header}
Accept: {API specific Accept header}
Authorization: {your_credentials} Content-Type: {API specific Content-Type header} Accept: {API specific Accept header}
ヘッダー | 説明 |
---|---|
Authorization | Authorization ヘッダーでAccess Worldpay内でユーザーを識別および認証します。TLSを介した顧客証明書認証を使用する場合を除き、APIに送信するリクエストにはAuthorization ヘッダーを使用しなければなりません。ヘッダーを使用する必要がある場合は、 |
Content-Type | 送信するリクエストにリクエスト本文が含まれている場合、HTTP方法がPOST またはPUT の場合は、Content-Type ヘッダーが必要です。 |
Accept | Accept ヘッダーで使用するFraudsight APIのバージョンを識別します。APIに送信するリクエストにはAccept ヘッダーを使用しなければなりません。 |
ルートリソースの照会
当社のAPIは、次に利用可能なアクションへのリンクを提供することでガイドします。
APIを検出して使用を開始するには、最初にルートリソースに照会を実行しなければなりません。これにより、Access Worldpay内で利用可能なリソースが返されます。
リクエスト
テスト用(Try)
GET https://try.access.worldpay.com/
ライブ用
GET https://access.worldpay.com/
注記:このリクエストにはリクエスト本文は必要ありません。
応答
応答で利用可能なすべてのAPIリソースを受け取ります。
{
"_links": {
"payments:authorize": {
"href": "https://try.access.worldpay.com/payments/authorizations"
},
"service:payments": {
"href": "https://try.access.worldpay.com/payments"
},
"service:sessions": {
"href": "https://try.access.worldpay.com/sessions"
},
"service:tokens": {
"href": "https://try.access.worldpay.com/tokens"
},
"service:verifications/accounts": {
"href": "https://try.access.worldpay.com/verifications/accounts"
},
"service:verifications/customers/3ds": {
"href": "https://try.access.worldpay.com/verifications/customers/3ds"
},
"service:verifiedTokens": {
"href": "https://try.access.worldpay.com/verifiedTokens"
},
"service:fraudsight": {
"href": "https://try.access.worldpay.com/fraudsight"
},
"service:exemptions": {
"href": "https://try.access.worldpay.com/exemptions"
},
"service:payouts": {
"href": "https://try.access.worldpay.com/payouts"
},
"service:payment_pages": {
"href": "https://try.access.worldpay.com/payment_pages"
},
"service:payments/alternative/direct": {
"href": "https://try.access.worldpay.com/payments/alternative/direct"
},
"service:payments/alternative/action/paypal": {
"href": "https://try.access.worldpay.com/payments/alternative/action/paypal"
},
"service:payments/alternative/action/ideal": {
"href": "https://try.access.worldpay.com/payments/alternative/action/ideal"
},
"service:moneyTransfers": {
"href": "https://try.access.worldpay.com/moneyTransfers"
},
"curies": [
{
"href": "https://try.access.worldpay.com/rels/payments/{rel}",
"name": "payments",
"templated": true
}
]
}
}
{
"_links": {
"payments:authorize": {
"href": "https://access.worldpay.com/payments/authorizations"
},
"service:payments": {
"href": "https://access.worldpay.com/payments"
},
"service:sessions": {
"href": "https://access.worldpay.com/sessions"
},
"service:tokens": {
"href": "https://access.worldpay.com/tokens"
},
"service:verifications/accounts": {
"href": "https://access.worldpay.com/verifications/accounts"
},
"service:verifications/customers/3ds": {
"href": "https://access.worldpay.com/verifications/customers/3ds"
},
"service:verifiedTokens": {
"href": "https://access.worldpay.com/verifiedTokens"
},
"service:payouts": {
"href": "https://access.worldpay.com/payouts"
},
"service:payments/alternative/direct": {
"href": "https://access.worldpay.com/payments/alternative/direct"
},
"service:payments/alternative/action/paypal": {
"href": "https://access.worldpay.com/payments/alternative/action/paypal"
},
"service:payments/alternative/action/ideal": {
"href": "https://access.worldpay.com/payments/alternative/action/ideal"
},
"curies": [
{
"href": "https://access.worldpay.com/rels/payments/{rel}",
"name": "payments",
"templated": true
}
]
}
}
リソースを照会して、特定のAPIを見つけます。応答には、次に利用可能なアクションと対応するリソースへのリンクが含まれています。
注記:ルートリソースを照会すると、一部のリソースはTry
でのみ使用でき、Live
では使用できないことに気付く場合があります。これは、APIがまだ開発中であり、プレビューでのみ利用できるためです。
アクションリンクとURIリソース
Access Worldpayに統合する場合は、アクションリンクからURIリソースリンクを取得することを強くお勧めします。URIリソースリンクをハードコーディングしないでください。統合が変更されたり、壊れたりする可能性があります。
アクションリンクとは何ですか?
アクションリンクは、リソースへのURIリンクが格納されているパラメーターです。
URIリソースリンクとは何ですか?
URIリソースリンクは、リクエストの送信先のリソースへのリンクです。
例
"payments:authorize": {
"href": "https://try.access.worldpay.com/payments/authorizations"
}
上記の例では、アクションリンクは次のとおりです。
payments:authorize
URIリソースリンクは次のとおりです。
https://try.access.worldpay.com/payments/authorizations
このリソースは、
DNSホワイトリスト
次のURLをホワイトリストに登録します。
https://try.access.worldpay.com/
https://access.worldpay.com/
または、次のIPをホワイトリストに登録することもできます。
151.101.2.47
151.101.66.47
151.101.130.47
151.101.194.47
151.101.2.47 151.101.66.47 151.101.130.47 151.101.194.47
明示的なIPホワイトリストよりもDNSホワイトリストを使用することをお勧めします。
文書
次の文書では、テスト統合と最新バージョンのAPIについて説明しています。選択したAPIへの統合を完了してテストしたら、