Indicatori aggiuntivi

Questa pagina mostra i campi aggiuntivi che puoi inviare durante la creazione delle valutazioni per migliorare la qualità dei punteggi. Per ulteriori informazioni, consulta la sezione Dati sulle transazioni.

Il seguente snippet di codice mostra il corpo di una richiesta di esempio con campi aggiuntivi relativi ai dati delle transazioni.

{
    "event": {
        "token": "YOUR_TOKEN",
        "site_key": "KEY_ID",
        "expected_action": "YOUR_CHECKOUT_ACTION_NAME",
        "transaction_data": {
            "transaction_id": "txid-1234567890",
            "payment_method": "credit-card",
            "card_bin": "411111",
            "card_last_four": "1234",
            "currency_code": "USD",
            "value": 39.98,
            "shipping_value": 7.99,
            "shipping_address": {
                "recipient": "name1 name2",
                "address": [
                    "123 Street Name",
                    "Apt 1"
                ],
                "locality": "Sunnyvale",
                "administrative_area": "CA",
                "region_code": "USA",
                "postal_code": "123456"
            },
            "billing_address": {
                "recipient": "name1 name2",
                "address": [
                    "123 Street Name",
                    "Apt 1"
                ],
                "locality": "Sunnyvale",
                "administrative_area": "CA",
                "region_code": "USA",
                "postal_code": "123456"
            },
            "user": {
                "account_id": "abcde12345",
                "creation_ms": 1650000000000,
                "email": "user@example.com",
                "email_verified": true,
                "phone_number": "+18005550175",
                "phone_verified": false
            },
            "merchant": {
                "account_id": "abcde12345",
                "creation_ms": 1650000000000,
                "email": "user@example.com",
                "email_verified": true,
                "phone_number": "+1+18005550178",
                "phone_verified": false
            },
            "items": [
                {
                    "name": "first item",
                    "value": 19.99,
                    "quantity": 1,
                    "merchant_account_id": "abcde12345"
                },
                {
                    "name": "second item",
                    "value": 19.99,
                    "quantity": 1,
                    "merchant_account_id": "abcde12345"
                }
            ],
            "gateway_info": {
                "name": "google",
                "gateway_response_code": "SUCCESS",
                "avs_response_code": "Y",
                "cvv_response_code": "Y"
            }
        }
    }
}

Per scoprire come creare i test, consulta Creare un test per il tuo sito web.

Passaggi successivi