# Provide details of the payment outcome

Provide payment outcome information.
**Note:** This should only be provided if using a different gateway for the payment.

Endpoint: POST /fraudsight/update/payment
Version: v1
Security: BasicAuth

## Security:

  - `BasicAuth` (unknown)
    http basic

## Header parameters:

  - `Content-Type` (string, required)

  - `Accept` (string, required)

## Request fields (application/vnd.worldpay.fraudsight-v1.hal+json):

  - `transactionReference` (string, required)
    A unique reference for authentication. For example, e-commerce order code.

  - `merchant` (object, required)
    An object that contains information about the merchant and API level configuration.

  - `merchant.entity` (string, required)
    Used to route the request in Access Worldpay, created as part of on-boarding.

  - `riskProfile` (string, required)
    Represents the outcome of the original fraud assessment. Used to link subsequent Fraud related requests.

  - `paymentOutcome` (string, required)
    Outcome of the payment authorization.
    Enum: "authorized", "refused"

  - `refusalCode` (string)
    The refusal response code from the acquirer.
    Example: 5

  - `refusalDescription` (string)
    The description of the 'refusalCode'.
    Example: REFUSED

  - `cvcResult` (string)
    Outcome of the CVC check.
    Enum: "matched", "not_matched", "not_checked", "not_supplied"

  - `avsResult` (object)
    Object containing outcome of the address verification service check.

  - `avsResult.address` (string)
    Outcome of the address check.
    Enum: "matched", "not_matched", "not_checked", "not_supplied"

  - `avsResult.postcode` (string)
    Outcome of the postcode check.
    Enum: "matched", "not_matched", "not_checked", "not_supplied"

  - `authentication` (object)
    Include this object if 3DS authentication details were part of the payment.

  - `authentication.version` (string)
    3DS version used by issuer, e.g. `1.0.2`, `2.1.0` or `2.2.0`.

  - `authentication.eci` (string)
    Electronic Commerce Indicator (ECI). Outcome of the 3DS authentication as applied in the payment.
- 02 or 05 - Fully Authenticated Transaction
- 01 or 06 - Attempted Authentication Transaction
- 00 or 07 - Non 3-D Secure Transaction
- Mastercard - 02, 01, 00
- Visa - 05, 06, 07
- Amex - 05, 06, 07
- JCB - 05, 06, 07
- Diners - 05, 06, 07
    Enum: "00", "01", "02", "05", "06", "07"

## Request examples:

  - `authorized` (unknown)
    Authorized payment outcome details are provided to the FraudSight service. This could be from any Worldpay or 3rd party payment provider.

  - `refused` (unknown)
    Refusal payment outcome details are provided to the FraudSight service. This could be from any Worldpay or 3rd party payment provider

## Response 204:

  - `204` (unknown)
    Successful update with payment information

## Response 400:

  - `400` (unknown)
    Update payment request contains invalid values

## Response 400 fields (application/vnd.worldpay.fraudsight-v1.hal+json):

  - `message` (string, required)
    The error description message.

  - `errorName` (string, required)
    The unique error name.

  - `validationErrors` (array)
    Object containing details of validation errors occurred

  - `validationErrors.errorName` (string, required)
    Unique name of the validation error.

  - `validationErrors.jsonPath` (string, required)
    Location of the field in request body for which the error occurred.

  - `validationErrors.message` (string, required)
    Error description message.

## Response 401:

  - `401` (unknown)
    Update payment request is unauthorized

## Response 401 fields (application/vnd.worldpay.fraudsight-v1.hal+json):

  - `message` (string, required)
    The error description message.

  - `errorName` (string, required)
    The unique error name.

## Response 204 examples:

  - `Payment outcome details are provided to the fraudsight service` (unknown)
    Payment outcome details are provided to the fraudsight service

## Response 400 examples:

  - `An update payment request with invalid value in request body` (unknown)
    An update payment request with empty `authentication.eci`

  - `An update payment request using invalid http method` (unknown)
    An update payment request using GET method instead of POST

  - `An update payment request with invalid JSON` (unknown)
    An update payment request with invalid JSON

## Response 401 examples:

  - `An update payment request with invalid Authorization header` (unknown)
    An update payment request using invalid Authorization header

