---
title: "Simulate authorization"
method: POST
path: "/networktransactions/v1/authorizations"
tags: ["Authorizations"]
---

# Simulate authorization

`POST /networktransactions/v1/authorizations`

You can use this endpoint to simulate a real-world authorization from the network in the sandbox environment. This simulation does not go through all the card network services as it would in production, but it does check for card status and balance. The call gives you a chance to see how Pismo might respond to a network authorization. The fields returned can be used to cancel or confirm the request with this endpoint.

You can also use this endpoint to cancel (total or partial) the simulated authorization in the EXT/HOMOLOG environment. To cancel in the production environments, use the [Cancel authorization](https://developers.pismo.io/pismo-docs/reference/cancel-network-authorizations) endpoint.

This endpoint generates the simulated [Network authorization received](https://developers.pismo.io/events/docs/networktransactions-network-authorization-1) event which you can receive and view. This event occurs in production when the Pismo platform cancels or confirms an authorization.  You can also use this endpoint to test connectivity to your [anti-fraud webhook url](https://developers.pismo.io/pismo-docs/docs/anti-fraud-integration).

For more information, see the [Simulate authorizations](https://developers.pismo.io/pismo-docs/docs/simulate-authorizations) guide.

## Headers

- `x-tenant` string, required

## Request body

- union
  - CreateAuthorization — Creates an authorization
    - `card_id` number, required — Transaction card ID
    - `entry_mode` string, required — Method used for PAN entry to initiate a transaction and the PIN entry capabilities. This field is required and must have 3 or 4 digits. For example, `901` or `9010` for magnetic stripe transaction simulation.
    - `local_amount` number, required — Local transaction amount in the currency of the place where the authorization is requested.
    - `local_currency` string, required — Local ISO 4217 currency code number where transaction occurred. For example, 986 (Brazil) or 840 (US).
    - `merchant` object, required — Merchant details
      - `name` string, required — Merchant name
      - `city` string — Merchant city name
      - `country` string — Merchant country code in ISO 3166 format. For example, `BR` or `BRA` (Brazil).
      - `code` string — Merchant code
      - `id` string — Merchant ID
    - `mti` string, required — Message type ID. For example: `0100` = auth. request, `0110`` = auth. response, `0120` = auth. advice. For more information, see [MTI](https://en.wikipedia.org/wiki/ISO_8583#Message_type_indicator_(MTI)).
    - `bin` string — A bank identification number (BIN) represents the first four to eight digits on a credit card and identifies the financial institution that issued the card.
    - `processing_code` '00' | '01' | '20' | '28' — Transaction's effect on the customer account and the type of accounts affected. For purchase, use "00"; for withdraw, use "01"; for refund, use "20"; for payment, use "28". For information about processing codes, refer to [Processing codes](https://developers.pismo.io/pismo-docs/docs/processing-codes-and-transaction-types).
    - `atc` string — Application transaction counter (ATC). The chip card application maintains and increments this counter. The ATC provides a sequential reference for each transaction. For more information, refer to [Application Transaction Counter (ATC)](https://developers.pismo.io/pismo-docs/docs/application-transaction-counter-atc).
    - `settlement_amount` number — Settlement amount—**must** be the transaction amount in dollar currency.
    - `settlement_currency` string — Settlement ISO 4217 currency code
    - `cardholder_billing_amount` number — Transaction amount in cardholder currency
    - `cardholder_billing_currency` string — Cardholder ISO 4217 currency code
    - `account_type` string — Authorization mode being simulated. Use `20` for debit simulation and `30` for credit simulation.
    - `invoice_address` string — Invoice address
    - `authorization_code` string — Authorization code
    - `retrieval_reference_number` string — Merchant POS system generated number
    - `nsu` string — Authorization Network Settlement Utility (NSU) number - tracks the flow of funds between parties involved in a payment card transaction, including the bank, the merchant, and the card network. Different payment card networks may have their own NSU systems, ie, Visa - VisaNet, Mastercard - BankNet, or they may use a third party.
    - `processing_julian_date` string — Reconciliation processing date. Format = YYDDD. **REQUIRED** for clearing simulations.
    - `acquirer_reference_number` string — Acquirer generated number
    - `airport_tax` number — Boarding fee—in a purchase with installments, this value is present at first installment. In a purchase without installments, this value should not be sent since it is included in the authorization amount.
    - `message_number` string — Message number assigned to a clearing message. This **must** be a numeric and sequential number.
    - `clearing_s3_path` string — The clearing settlement file path in the AWS S3 (storage service). This field must be used when the `mti` field equals `clearing` (representing the simulation of a clearing settlement file processing). The composition of this field is: <tenant>/from<KNetwork_name>/<specific_clearing_file_name>/<year>/<julian_date>/<file_name> Where: - `<tenant>` is the tenant ID, for example, `TN-c9cccb07-41f7-493c-b796-60cc880bff4f` - `<Network_name>` is the name of the card network, for example, Visa, Mastercard, TecBan, etc. - `<specific_clearing_file_name>` is the name of the clearing file, for example, ServiceB, Base II, T112, T464, and so on. - `<year>` is the year of the clearing file, for example, 2023. - `<julian_date>` is the Julian date of the clearing file, for example, 105, where 10 is the day and 5 is the month. - `<file_name>` is the name of the clearing file, for example, 17275501C489639.txt.
    - `transaction_identifier` string — Transaction ID
    - `simule_tokenized_transaction` false | true — Does the simulation use a tokenized transaction?
    - `cash_back_amount` number — Cash back amount used to simulate purchase with cash back
    - `advice_reason_code` string — If this is an *advice*, this is the reason code. For more information about the Advice reason code (DE 60 subfield 01) and Advice detail code (DE 60 subfield 02) refer to the network manual. For example, the specification for Mastercard can be found in the section "Customer Interface Specification (2020-MasterCard-CustomerInterfaceSpecification.pdf)".
    - `advice_detail_code` string — Advice detail code
    - `wallet_identifier` string — Wallet ID
  - CreateCrediarioAuthorization
    - `installments` object — If this is a Crediario Authorization, this field is required to deal with installments.
      - `is_crediario` boolean — Is this a credit authorization?
      - `number` number — Number of installments
      - `with_interest` boolean — Does the installment have an interest rate?
  - CreateWithdrawAuthorization
    - `processing_code` string — Processing code for international withdrawal
  - CreateRefundAuthorization
    - `processing_code` string — Processing code for refund/credit authorization
  - CreateCancelAuthorization
    - `mti` string, required — Message type ID. For example: `0100` = auth. request, `0110`` = auth. response, `0120` = auth. advice. For more information, see [MTI](https://en.wikipedia.org/wiki/ISO_8583#Message_type_indicator_(MTI)).
  - InstallmentAuthorization — Create an installment authorization
    - `caller` string — Name of the network that performed this authorization request
    - `card_id` number, required — Identifier of the card used for the transaction.
    - `mti` string, required — Message type indicator that defines which flows are going to be performed, such as authorization, cancellation, or clearing
    - `local_amount` number, required — Local transaction amount—the amount in the currency of the place where the authorization is requested
    - `local_currency` '986' | '840', required — Local currency code number where transaction occurred
    - `entry_mode` string, required — Indicates the method used for PAN entry to initiate a transaction and the PIN entry capabilities
    - `processing_code` '00' | '01' | '20' | '28' — Describes the effect of a transaction on the customer account and the type of accounts affected. For purchase, use `00`; for withdraw, use `01`; for refund, use `20`; for payment, use `28`. For information about processing codes, refer to [Processing code](docs:processing-codes-and-transaction-types).
    - `installments` object — If this is a credit authorization, this field is required to deal with installments.
      - `number` number — Number of installments
      - `with_interest` string — Indicates if the installment has an interest rate.
      - `payment_number` number — Current installment number
      - `amount_of_each_installment` number — Amount of each installment
    - `merchant` object, required — Details about the merchant
      - `name` string, required — Merchant name
      - `city` string — Merchant city name
      - `country` string — Merchant country code
      - `code` string — Merchant code
      - `id` string — Merchant ID
    - `atc` string — Application transaction counter
    - `settlement_amount` number — Settlement amount—this must be the amount of the transaction in Dollar currency.
    - `settlement_currency` string — Settlement currency
    - `cardholder_billing_amount` number — Amount of the transaction in the Cardholder currency
    - `cardholder_billing_currency` string — Currency code of the cardholder
    - `account_type` string — Defines the mode of the authorization being simulated. Use `20` for debit simulation and `30` for credit simulation.
    - `invoice_address` string — Invoice address
    - `authorization_code` string — Authorization code
    - `retrieval_reference_number` string — Number generated by merchant POS systems
    - `nsu` string — Unique sequence number to identify one transaction
    - `processing_julian_date` string — Date assigned to the reconciliation processing. This is required for clearing simulations and must have the format YDDD.
    - `acquirer_reference_number` string — Number generated by Acquirer.
    - `airport_tax` number — Boarding fee. In a purchase with installment, this value will be present at first installment. In a purchase without installment, this value should not be sent since it should be summed to the authorization amount.
    - `message_number` string — Message number assigned to a clearing message. It must be a sequential number.
    - `transaction_identifier` string — Transaction identifier
    - `simule_tokenized_transaction` false | true — Indicates if the simulation will use a tokenized transaction
    - `cash_back_amount` number — Cash back amount used to simulate purchase with cash back
    - `advice_reason_code` string — Advice reason code
    - `advice_detail_code` string — Advice detail code
    - `wallet_identifier` string — Wallet identifier
    - `bin` string — BIN represents the Bank Identification Number and corresponds to the first 6 or 8 digits of a card. In general terms, the BIN explains which bank institution issued that card.
  - ReplacementAuthorization — Create a replacement authorization
    - `caller` string — Name of the network that performed this authorization request
    - `card_id` number, required — ID of the card used for the transaction
    - `mti` string, required — Message type indicator that defines with flow are going to be performed like authorization, cancellation or clearing
    - `local_amount` number, required — Local transaction amount. It is the amount in the currency of the place where the authorization is requested.
    - `local_currency` '986' | '840', required — Local currency code number where transaction occurred
    - `replacement_amount` number — Replacement transaction amount. This is the value that will be used to replace the original authorization value.
    - `authorization_code` string — Authorization code
    - `entry_mode` string, required — Indicates the method used for PAN entry to initiate a transaction and the PIN entry capabilities.
    - `processing_code` '00' | '01' | '20' | '28' — Describes the effect of a transaction on the customer account and the type of accounts affected. For purchase, use `00`; for withdraw, use `01`; for refund, use `20`; for payment, use `28`.
    - `merchant` object, required — Details about the merchant
      - `name` string, required — Merchant name
      - `city` string — Merchant city name
      - `country` string — Merchant country code
      - `code` string — Merchant code
      - `id` string — Merchant ID

## Response `200`

Resource founded

- AuthorizationResponse — Authorization response for a credit or debit purchase.
  - `mti` string — Message type ID. For example: `0100` = auth. request, `0110`` = auth. response, `0120` = auth. advice. For more information, see [MTI](https://en.wikipedia.org/wiki/ISO_8583#Message_type_indicator_(MTI)).
  - `authorization_code` string — Authorization code.
  - `response_code` string — Network two-digit response code. For example: 00 = approve, 51 = insufficient funds, 57 = card not active, 96 = system failure, etc. For more information, see [Validation codes for authorization events](https://developers.pismo.io/pismo-docs/docs/validation-codes-for-authorization-events). If `approve` = `false`, you can use this value to respond to the network.
  - `authorization_date_time` string — Authorization date and time in Coordinated Universal Time (UTC), i.e., 2020-01-01T10:10:00.000-03:00.
  - `custom_code` 'FL2' | 'FL8' | 'FLB' | 'FLE' | 'DCM' | 'VMN' | '998' | 'LUD' | 'LUE' | 'LUT' | 'LGE' | '810' | 'PFT' | 'IAT' | 'BND' | 'ANF' | 'CTE' | 'CED' | 'ZBD' | 'FRB' | 'UBT' | 'FL6' | 'BNF' | 'BNP' | 'BNR' | 'VED' | 'BNU' | 'VEV' | 'UBN' | 'CSU' | 'NPL' | 'OP1' | 'TNF' | 'Z26' | 'Z24' | 'Z29' | 'Z23' | 'Z22' — Internal custom code generated in authorization flow for declined requests, indicating the reason the request was declined. For more information, see [authorization validations](https://developers.pismo.io/pismo-docs/docs/validation-codes-for-authorization-events#authorization-validations).
  - `match_address` boolean — Is cardholder address street and number the same as that contained on the platform?
  - `match_postal_code` boolean — Is cardholder postal code the same as the one contained on the platform?
  - `postal_five_digits` boolean — Is this a valid postal code with five digits?
  - `no_address_data` boolean — Is address registered on platform?
  - `authorization_id` integer — Authorization ID
  - `account_id` integer — Account ID
  - `installment_value` string — Installment value. If there are no installments, this is the same as `contract_amount`.
  - `interest_rate` number — Monthly interest rate
  - `number_of_installments` number — Number of installments
  - `contract_amount` string — Transaction value
  - `crediario_responses` CrediarioResponse[] — If there is more than one installment, this is the data for them.
    - `installmentValue` string — Installment value
    - `monthlyInterestRate` string — Monthly interest rate
    - `totalAmount` string — Total amount
    - `numberOfInstallments` string — Number of installments
    - `feeAmount` string — Fee amount
    - `taxesAmount` string — Taxes amount
    - `taxesPercentageOfTotalAmount` string — Taxes percentage of total amount
    - `feePercentageOfTotalAmount` string — Fee percentage of total amount
    - `planType` string — Plan type - with interest (20), without interest(21) or a crediario type(25)
    - `annualInterestRate` string — Annual interest rate
    - `monthlyTotalEffectiveCost` string — Monthly total effective cost
    - `annualTotalEffectiveCost` string — Aannual total effective cost
    - `installmentDate` string — Installment date - format = yyyymmdd
    - `insurance` string — Insurance
    - `insurancePercentageOfTotalAmount` string — Insurance percentage of total amount
    - `other` string — Any other added values, if applicable, that the cardholder is paying
    - `otherPercentageOfTotalAmount` string — Other percentage of total amount
    - `totalAmountToMerchant` string — Total amount to be paid to merchant (purchase amount)
    - `merchantAmountPercentage` string — Percentage of the total amount to be paid to merchant
    - `reservedForFutureUse` string — Reserved for future use

## Other responses

- `400` — Bad request
- `404` — Not Found
- `500` — Internal server error

---

[API](https://skmtc.net/pismo/apis/platform-authentication.md) · [All operations](https://skmtc.net/pismo/apis/platform-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pismo/platform-authentication/revisions/935b62e16de4/schema)
