---
title: 代替支払い
slug: SBbN0gtH4AL4AKDmV7hCn
createdAt: 2025-07-30T21:22:24.109Z
---

# 代替（非クレジットカード）支払い方法

## 非クレジットカード注文

非クレジットカード注文には、部分的または完全に注文の支払いに使用できる代替支払い方法が含まれます。具体的には:

- ギフトカード
- ストアクレジット
- ロイヤルティポイント
- ApplePay
- AmazonPay
- AfterPay
- Affirm
- ShopRunner

以下は、各支払い方法の推奨マッピングの概要です。

これらの代替支払いがある場合は、各支払い方法を特定するためのロジックを支払いレベルに追加する必要があります。各支払い方法が特定された後、正しい支払い方法オブジェクトにマッピングするために必要なデータを生成する関連関数を参照できます。

## ギフトカード注文のマッピング

サーバーがギフトカード注文を正しく識別できるように、リクエストにギフトカードを支払い手段の詳細として送信してください。リクエストには、[注文API](https://docs.forter.com/reference/order-v3)の中に専用のgiftCardオブジェクトの支払い配列が必要です。リクエストは次のようになります:

```javascript
function ForterGiftCard(auth, giftCard) { // optional object for gift card purchases
	this.merchantPaymentId = giftCard.paymentTransaction.transactionID;
	this.value = {};
	this.value.currency = auth.currency_code;
	this.value.amountUSD = auth.amount.toString();
	this.value.amountLocalCurrency = auth.amount.toString();
}
```

## ストアクレジットのマッピング

ストアクレジット注文は、ギフトカードオブジェクトのフォーマットと同一のオブジェクトを使用します。リクエストにストアクレジットを支払い手段の詳細として送信してください。注文APIドキュメントには、専用のgiftCardオブジェクトの支払い配列が必要です。リクエストは次のようになります:

```javascript
function ForterStoreCredit(auth, sc) { // optional object for purchases made with store credit 
	this.merchantPaymentId = sc.paymentTransaction.transactionID; // customized based on gateway
	this.value = {};
	this.value.currency = auth.currency_code; // customized based on gateway
	this.value.amountUSD = auth.amount.toString(); // customized based on gateway
	this.value.amountLocalCurrency = auth.amount.toString(); // customized based on gateway
}
```

## ロイヤリティポイントのマッピング

ストアクレジットの注文は、ギフトカードオブジェクトのフォーマットと同一のオブジェクトを使用します。リクエストには、支払い手段の詳細としてストアクレジットを送信してください。注文APIドキュメントには、専用のgiftCardオブジェクトの支払い配列が必要です。リクエストは次のようになります:

```javascript
function ForterLoyalty(auth, loyalty) { // optional object for purchases made with loyalty points
	this.loyaltyPointsCount = parseInt(loyalty.loyaltyValue); // customized based on gateway
	this.loyaltyPointsSource = loyalty.pointsLocation; // optional
	this.merchantPaymentId = auth.loyaltyCode; // optional
}
```

## ApplePayのマッピング

ApplePayの注文は、ForterOrder.dsファイルから構築された専用の `applePay` オブジェクトにマッピングされる必要があります。ApplePayオブジェクトは、 `payment` 配列内にネストされ、支払い手段で受け取る利用可能な認証応答データを含む必要があります。以下の例を参照してください:

```javascript
      "applePay": {
        "nameOnCard": "Matthew Botbyl",
        "cardBrand": "Visa",
        "token": "46C5176ABX",
        "lastFourDigits": "7125",
        "expirationMonth": "12",
        "expirationYear": "2025",
        "cardType": "CREDIT",
        "countryOfIssuance": "US",
        "cardBank": "Chase Bank",
        "fingerprint": "rvH8RyvbatRRTi1w",
        "verificationResults": {
          "cvvResultCode": "pass",   
          "avsStreetResult": "M",
          "authorizationCode": "38671PN7x",
          "processorResponseCode": "100",
          "processorResponseText": "Payment complete."
        },
        "paymentGatewayData": {
          "gatewayName": "Stripe",
          "gatewayTransactionId": "ch_Gcue5iOK5JbMtG" 
        }
      }
```

### Order.ds ApplePay マッピング

ApplePay 注文はトークン化されたカードオブジェクトを利用します。ApplePay 注文をリクエストの支払い手段の詳細として送信してください。検証 API ドキュメント内の支払い配列には専用の applePay オブジェクトが含まれている必要があります。リクエスト内の applePay 情報のマッピングは、支払いゲートウェイから受け取るレスポンスデータに基づいてカスタマイズされたロジックに従って、以下のように構造化される場合があります。

**例：**

```javascript
function ForterApplePay(auth, apple) {
// where var ap is the raw applepay response data from your payment gateway 

    // format the expiration month. from 1 to 01, etc.
    if (apple.expirationMonth.toString().length == 1) {
        var appleExpMonth = "0" + apple.payment.expirationMonth.toString();
    } else {
        var appleExpMonth = apple.payment.expirationMonth.toString(); // TO DO: adjust to data available
    }

    this.nameOnCard = apple.creditCardHolder; //name on card if available in auth
    this.cardBrand = apple.creditCardType; // TODO: adjust to your payment gateway
    this.token = apple.token;
    this.lastFourDigits = apple.creditCardNumberLastDigits; //optional
    this.expirationMonth = appleExpMonth; // TODO: adjust to your payment gateway
    this.expirationYear = apple.payment.ExpirationYear.toString(); // TODO: adjust to your payment gateway

    this.verificationResults = {};
    this.verificationResults.avsFullResult = auth.avs.toString(); // optional
    this.verificationResults.cvvResult = auth.cvd_code.toString(); // optional
    this.verificationResults.authorizationCode = auth.authorization_num.toString(); 
    
	processorResponseCode = auth.exact_resp_code.toString(); // TODO: adjust to your payment gateway
	processorResponseText = auth.exact_message.toString(); // TODO: adjust to your payment gateway

    this.verificationResults.processorResponseCode = processorResponseCode; // TODO: adjust to your payment gateway
    this.verificationResults.processorResponseText = processorResponseText; // TODO: adjust to your payment gateway
}
```

## デジタルウォレット（例：AmazonPay、MetaPay）

デジタルウォレット (AmazonPay, MetaPay)

デジタルウォレットオブジェクトには、以下のいずれかの支払い方法が含まれます: - AmazonPay - AliPay - FacebookPay - MetaPay - Zelle - WeChat Pay - Mercado Pago - UnionPay - Payco - Ame Digital - KakaoPay - Line Pay - NaverPay - MB Way

これらの注文はデジタルウォレットメソッドオブジェクトを使用します。上記のいずれかの支払い方法をデジタルウォレットオブジェクトに送信し、私たちの[注文APIドキュメント](https://docs.forter.com/reference/order-v3)のリストにある専用の列挙型のいずれかを使用してください。

**サンプルデジタルウォレットマッピング**

```javascript
   function ForterDigitalWallet(auth) { 
       this.digitalWalletName = "AMAZONPAY"; // select "AMAZONPAY" enum
       this.underlyingPaymentMethod.underlyingPaymentMethodName = "CREDITCARD"; // select from relevant enum UNKNOWN, CREDITCARD, BANKTRANSFER, CASH, BITCOIN
       this.paymentSuccessStatus = "Completed"; // gateway auth response
       this.digitalWalletPayerEmail = "john_s@test.com"; // email associated with digital wallet
       this.fullDigitalWalletResponsePayload = {}; // full response payload from digital wallet gateway
   }
```

## アフターペイ

**アフターペイマッピング**

アフターペイの注文は、顧客の名前、Affirmゲートウェイのトランザクション識別子、生の応答ペイロード、およびゲートウェイから受け取る可能性のある認証応答データのフィールドを含む\`installmentService\`支払いメソッドオブジェクトを使用できます。

```javascript
      "installmentService": {
        "serviceName": "Afterpay Payment",
        "firstName": "Nerri",
        "lastName": "Shelan",
        "serviceResponseCode": "200",
        "paymentId": "AFTasasdVVG",
        "fullResponsePayload": {}
      },
```

**サンプル関数**

```javascript
    function ForterAfterPay(auth) { // optional object for purchases made with Affirm
        this.serviceName = "AfterPay Payment"; // can be hardcoded
        this.firstName = ""; //optional
        this.lastName = ""; // optional
        this.paymentId = auth.transaction.data.code; // unique identifier from AfterPay
        this.serviceResponseCode = auth.processorResponse.toString();
        this.fullResponsePayload = auth; // any additional raw response data as an object 
    }
```

デフォルトでは、Forterはアフターペイ、Affirm、および任意のインストールサービスの支払いを決定しません（つまり、`未審査`の決定を返します）。この支払い方法または任意のインストールサービスの支払いタイプに対して決定を希望する場合は、この支払い方法の決定を有効にするためにオンボーディングチームに連絡してください。

## アファーム

**アファームマッピング**

アファームの注文は、`installmentService`支払い方法オブジェクトを使用し、顧客の名前、アファームゲートウェイのトランザクション識別子、生のレスポンスペイロード、およびゲートウェイから受け取る可能性のある認証レスポンスデータのフィールドを含みます。

```javascript
    function ForterAffirm(auth, order) { // optional object for purchases made with Affirm
        this.serviceName = "Affirm"; // can be hardcoded for all Affirm payments
        this.firstName = order.customer.profile.firstName;
        this.lastName = order.customer.profile.lastName;
        this.serviceResponseCode = auth.ResponseMessage;
        this.paymentId = auth.gatewayTransactionID;
        this.payload = {}; // any additional raw response data 
    }
```

**サンプルアファームオブジェクト（installmentService）**

アファームの支払いは、\`payment\`配列内の\`installmentService\`オブジェクトにマッピングされるべきです。アファームで支払われた各注文に利用可能なデータに応じて、\`firstName\`、\`lastName\`、および\`serviceResponseCode\`などのフィールドはオプションにすることができます。

```javascript
      "installmentService": {
        "serviceName": "Affirm",
        "firstName": "Guy",
        "lastName": "Zucker",
        "serviceResponseCode": "200",
        "paymentId": "YTZ8JAMENAWRRVVG",
        "fullResponsePayload": {}
      },
```

Forterポータルでは、Affirmの支払いは **InstallmentService** として詳細な取引ビューに表示され、デフォルトではForterはこれらの取引を判断しません（つまり、 `not reviewed` の決定を返します）。この支払い方法に対する判断が必要な場合は、オンボーディングチームに連絡してこの支払い方法を有効にしてください。

## ShopRunner

ShopRunnerの注文は、既存の `creditCard` オブジェクトまたは `tokenizedCard` オブジェクトを利用できます。利用可能な認証データに応じて、これらはリクエスト内のtokenizedCardまたはcreditCardの支払い手段の詳細にマッピングする必要があります。以下の例リクエストは `tokenizedCard` マッピングを使用しています:

```javascript
function ShopRunner(auth, cc) {
// where var ap is the raw applepay response data from your payment gateway 
    var processorResponseCode = "",
        processorResponseText = "";

    // format the expiration month. from 1 to 01, etc.
    if (ap.creditCardExpirationMonth.toString().length == 1) {
        var creditCardExpMonth = "0" + cc.creditCardExpirationMonth.toString();
    } else {
        var creditCardExpMonth = cc.creditCardExpirationMonth.toString();
    }

    this.nameOnCard = cc.creditCardHolder;
    this.cardBrand = cc.creditCardType;
    this.token = cc.token;
    this.lastFourDigits = cc.creditCardNumberLastDigits; 
    this.expirationMonth = cc.creditCardExpMonth;
    this.expirationYear = cc.creditCardExpirationYear.toString();

    this.verificationResults = {};
    this.verificationResults.avsFullResult = auth.avs.toString(); // optional
    this.verificationResults.cvvResult = auth.cvd_code.toString(); // optional
    this.verificationResults.authorizationCode = auth.authorization_num.toString();
    
	processorResponseCode = auth.exact_resp_code.toString();
    processorResponseText = auth.exact_message.toString();
    
    this.verificationResults.processorResponseCode = processorResponseCode;
    this.verificationResults.processorResponseText = processorResponseText; 

    this.paymentGatewayData = {};
    this.paymentGatewayData.gatewayName = "FIRSTDATA_CREDIT"; // adjust based on your processor
    this.paymentGatewayData.gatewayTransactionId = auth.retrieval_ref_no.toString();
}
```
