# Card settlement

Notification that a card settlement has been processed on a managed card.

Endpoint: POST /managed_cards/settlements/watch
Version: v2

## Header parameters:

  - `call-ref` (string)
    A call reference generated by the caller and unique to the caller to provide correlation between the caller and system with a maximum length of 255

  - `published-timestamp` (integer, required)
    The timestamp, expressed in Epoch timestamp using millisecond precision, when this event was published.

  - `signature` (string, required)
    The signature to verify the authenticity of this request.  This is the base64 hash (HmacSHA256) of the `published-timestamp` using your API key.

  - `signature-v2` (string, required)
    The signature to verify the authenticity of this request.  This is the base64 hash (HmacSHA256) of the `call-ref + payload + published-timestamp` using your API key.

## Request fields (application/json):

  - `id` (object, required)

  - `id.id` (string, required)

  - `id.type` (string, required)
    Enum: "managed_cards", "managed_accounts"

  - `transactionId` (string, required)
    The id of the transaction, for reference.

  - `settlementType` (string, required)
    Enum: "SALE_PURCHASE", "CASH_WITHDRAWAL", "CASH_DISBURSEMENT", "SALE_WITH_CASHBACK", "MAIL_OR_TELEPHONE_ORDER", "PURCHASE_REFUND_REVERSAL", "ORIGINAL_CREDIT_TRANSACTION_REVERSAL", "CASH_WITHDRAWAL_REVERSAL", "PURCHASE_REFUND", "PURCHASE_REVERSAL", "ORIGINAL_CREDIT_TRANSACTION", "ACCOUNT_FUNDING_TRANSACTION", "FIRST_CHARGEBACK", "FIRST_CHARGEBACK_REVERSAL", "FIRST_REPRESENTMENT", "FIRST_REPRESENTMENT_REVERSAL", "SECOND_CHARGEBACK", "SECOND_CHARGEBACK_REVERSAL", "SECOND_REPRESENTMENT", "ARBITRATION_CHARGEBACK", "BALANCE_INQUIRY"

  - `transactionAmount` (object, required)
    The object representing a monetary amount in a particular currency.

  - `transactionAmount.currency` (string, required)
    The currency expressed in ISO-4217 code. Example: GBP, EUR, USD.

  - `transactionAmount.amount` (string, required)
    The monetary amount, scaled to the lowest denomination of the currency.

  - `transactionTimestamp` (string, required)
    The timestamp of the transaction, using epoch timestamp with millisecond precision.

  - `merchantData` (object, required)

  - `merchantData.merchantName` (string, required)
    The name of the merchant where the authorisation has been made.

  - `merchantData.merchantCategoryCode` (string, required)
    The merchant category code.

  - `merchantData.merchantId` (string, required)
    The merchant ID.

  - `merchantData.merchantDescription` (string)
    The merchant description

  - `merchantData.merchantStreet` (string)
    The merchant street address (if available)

  - `merchantData.merchantCity` (string)
    The merchant city (if available)

  - `merchantData.merchantState` (string)
    The merchant state address (if available)

  - `merchantData.merchantPostalCode` (string)
    The merchant postal code (if available)

  - `merchantData.merchantCountry` (string)
    The merchant country address

  - `merchantData.merchantTelephone` (string)
    The merchant telephone number

  - `merchantData.merchantURL` (string)
    The merchant URL

  - `merchantData.merchantNameOther` (string)
    The alternative merchant name

  - `merchantData.merchantNetworkId` (string)
    The merchant's network id

  - `merchantData.merchantContact` (string)
    The merchant's contact (if available)

  - `merchantName` (string)
    The name of the merchant where the authorisation has been made.

  - `merchantCategoryCode` (string)
    The merchant category code.

  - `merchantId` (string)
    The merchant ID.

  - `details` (object)

  - `details.prepaidModeDetails` (object)

  - `details.debitModeDetails` (object)

  - `details.debitModeDetails.parentManagedAccountId` (string)
    Id of the managed account holding funds which the managed card can access, up to a configurable spend limit.

  - `details.debitModeDetails.availableToSpend` (array)
    The amount of funds from the parent managed account that are available to be spent through the card, in a given time interval, after this transaction was performed.

  - `details.debitModeDetails.availableToSpend.availableAmount` (string)
    The amount and currency that is available to spend, (for the given interval).

  - `details.debitModeDetails.availableToSpend.value` (object)
    The object representing a monetary amount in a particular currency.

  - `details.debitModeDetails.availableToSpend.value.amount` (integer, required)
    The monetary amount, scaled to the lowest denomination of the currency.

Example, an amount of 1000 for a EUR currency is actually 1000 Euro cents or EUR 10.00.

  - `details.debitModeDetails.availableToSpend.interval` (string)
    The time period for which the `spendLimit` is valid.
- DAILY: starting from 00:00:00 UTC of current day to 23:59:59 UTC of current day
- WEEKLY: 00:00:00 UTC Monday of current week to following Sunday 23:59:59 UTC
- MONTHLY: 1st of current calendar month to end of current calendar month
- QUARTERLY: starting from beginning of current quarter where quarters are defined as follows:
- 1 January 00:00:00 UTC to 31 March 23:59:59 UTC
- 1 April 00:00:00 UTC to 30 Jun 23:59:59 UTC
- 1 July 00:00:00 UTC to 30 September 23:59:59 UTC
- 1 October 00:00:00 UTC to 31 December 23:59:59 UTC
- YEARLY: 1 January 00:00:00 UTC of current calendar year to 31 December 23:59:59 UTC of current calendar year.
- ALWAYS: This indicates that the `spendLimit` is the total amount that can be spent through the card throughout the whole lifetime of the card.
    Enum: "DAILY", "WEEKLY", "MONTHLY", "QUARTERLY", "YEARLY", "ALWAYS"

  - `relatedAuthorisationId` (string)
    The related authorisation id which this settlement is clearing.

  - `relatedSettlementId` (string)
    The related settlement id.

  - `relatedAuthorisationIds` (array)
    The list of related authorisation ids which this Settlement is related to.

  - `relatedSettlementIds` (array)
    The list of related settlement ids which this Settlement is related to.

  - `owner` (object, required)

  - `owner.type` (string, required)

  - `owner.id` (string, required)

  - `authCode` (string)
    The authorisation code associated with this settlement.

  - `state` (string, required)
    Enum: "PENDING", "COMPLETED"

  - `merchantCountryCode` (string)
    The merchant country code.

  - `digitalWalletDetails` (object)
    Contains information about the digital wallet, if it has been used.

  - `digitalWalletDetails.digitalWalletType` (string)
    The digital wallet type.
    Enum: "GOOGLE_PAY", "APPLE_PAY", "MERCHANT_TOKEN"

  - `userCurrencyTransactionDetails` (object)
    The object representing the user transaction's currency, amount and rate.

  - `userCurrencyTransactionDetails.userExchangeRate` (string, required)

