---
title: "Refund a payment"
method: POST
path: "/payments/{id}/refund"
tags: ["Payments API"]
---

# Refund a payment

`POST /payments/{id}/refund`

Issue a full or partial refund for a previously settled payment. By default, the full amount will be refunded unless a specific amount is provided for a partial refund. If the payment was partially captured multiple times, you can specify which capture to refund by using the transaction event ID. Refer to the \`transactions.events\` array in the payment object to find available transaction event IDs (when the appropriate \`expand\` parameter is passed). When specifying a transaction event ID, the refund amount should not exceed the amount captured in that event. If no refund amount is provided, it defaults to the amount captured in that specific event.

## Path parameters

- `id` string, required

## Headers

- `X-Idempotency-Key` string
- `X-API-VERSION` string, required

## Request body

- PaymentRefundAPIRequest
  - `amount` integer — The amount you would like to refund the customer, in minor units. e.g. for $7, use `700`. Defaults to remaining non-refunded amount.
  - `orderId` string — Optionally you can pass a specific order ID for the refund. By default this will be set to the original `orderId` given on payment creation.
  - `reason` string — You can optionally specify a reason for the refund, for your own records. This will be returned in the refund transaction of payment responses.
  - `transactionEventId` string, uuid — Specific capture ID to target for the refund. Use this to specify which transaction event the refund should apply to.
  - `expand` string[], nullable — A list of fields to expand, such as transactions.events.

## Response `200`

Successful Response

- PaymentAPIResponse
  - `id` string, required — The unique payment ID. You can use this ID to retrieve the payment details, or perform downstream operations.
  - `date` string, date-time, required — The date and time at which the payment was created in UTC format.
  - `dateUpdated` string, date-time, required — The date and time of the last payment update in UTC format.
  - `status` 'PENDING' | 'FAILED' | 'AUTHORIZED' | 'SETTLING' | 'PARTIALLY_SETTLED' | 'SETTLED' | 'DECLINED' | 'CANCELLED', required — An enumeration.
  - `cardTokenType` 'CARD_PAN' | 'NETWORK_TOKEN' | 'PROCESSOR_TOKEN' — An enumeration.
  - `orderId` string, required — Your reference for the payment.
  - `currencyCode` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SOS' | 'SRD' | 'SSP' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XFU' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required — 3-letter currency code in <a href='https://en.wikipedia.org/wiki/ISO_4217#Active_codes'>ISO 4217</a> format, e.g. <code>USD</code> for US dollars.
  - `amount` integer, required — The amount you charged the customer, in minor units.
  - `order` OrderDetailsAPISchema
    - `lineItems` OrderLineItemsAPISchema[] — The details of the line items of the order.
      - `itemId` string — A unique identifier for the line item.
      - `name` string — A name of the item.
      - `description` string — A description of the item.
      - `amount` integer, required — The amount charged to the customer, in minor units. The minimum amount is 0. The maximum amount is the limit of `int64`.
      - `quantity` integer — The number of the particular line item that is being ordered.
      - `discountAmount` integer — Any discount applicable to this item, in minor units. This discount is applied for the entire line item, and not per `quantity`.
      - `taxAmount` integer — The tax charged on this item, in minor units. This tax amount is applied for the entire line item, and not per `quantity`.
      - `taxCode` string — The tax code associated with this item, in minor units. This is required for Primer-initiated tax calculations.
      - `productType` 'PHYSICAL' | 'DIGITAL' — An enumeration
      - `productData` OrderLineItemsProductDataAPISchema — Details related to the product
        - `sku` string — The product SKU
        - `brand` string — The product brand
        - `color` string — The product color
        - `globalTradeItemNumber` string — The product Global Trade Item Number (e.g. ISBN)
        - `manufacturerPartNumber` string — The product Manufacturer Part Number
        - `weight` number — The product weight
        - `weightUnit` string — The product weight unit (e.g. kg, g)
        - `pageUrl` string — The product page URL
    - `countryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
    - `retailerCountryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
    - `fees` OrderFeesAPISchema[] — The details of fees charged.
      - `amount` integer, required — The fee amount charged to the customer, in minor units. e.g. for $7, use `700`.
      - `type` string — The type of fee.
      - `description` string — A description of the fee, e.g. "Currency Conversion Fee".
    - `shipping` OrderShippingAPISchema
      - `amount` integer — The shipping amount charged to the customer, in minor units. e.g. for $7, use `700`.
      - `methodId` string — Your unique identifier of the shipping method selected by the customer.
      - `methodName` string — The display label for the selected shipping method (e.g. "Standard Shipping").
      - `methodDescription` string — The descriptive text that is displayed alongside the shipping method name.
  - `customerId` string — The unique identifier for your customer.
  - `customer` CustomerDetailsAPISchema
    - `emailAddress` string, email — Customer email address. Note: It is recommended to include this field if a 3DS check will be performed
    - `mobileNumber` string — The customer's mobile number
    - `firstName` string — The customer's first name
    - `lastName` string — The customer's last name
    - `billingAddress` OptionalAddressAPISchema
      - `firstName` string
      - `lastName` string
      - `addressLine1` string — Street name, Company name or PO Box
      - `addressLine2` string — Apartment, Unit or Building number
      - `city` string — Name of the city, district, town or village
      - `state` string — State, County or Province
      - `countryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
      - `postalCode` string — Postal or ZIP code
    - `shippingAddress` OptionalAddressAPISchema
      - `firstName` string
      - `lastName` string
      - `addressLine1` string — Street name, Company name or PO Box
      - `addressLine2` string — Apartment, Unit or Building number
      - `city` string — Name of the city, district, town or village
      - `state` string — State, County or Province
      - `countryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
      - `postalCode` string — Postal or ZIP code
    - `taxId` string — The customer's tax id number for tax exemptions
    - `nationalDocumentId` string — The customer's national identification number
  - `metadata` object — Additional data to be used throughout the payment lifecycle.
  - `paymentMethod` PaymentResponsePaymentMethodOptionsAPISchema, required
    - `descriptor` string — The description of the payment, as it would typically appear on a bank statement.
    - `paymentType` 'FIRST_PAYMENT' | 'ECOMMERCE' | 'SUBSCRIPTION' | 'UNSCHEDULED' — Payment types, primarily to be used for recurring payments. See the table below for all possible values. Note: if no field is set, we will return a blank value and make a best effort to calculate the downstream fields required for processing the payment. | paymentType | Use case | | --- | --- | | `FIRST_PAYMENT` | a customer-initiated payment which is the first in a series of recurring payments or subscription, or a card on file scenario. | | `ECOMMERCE` | a customer-initiated payment using stored payment details where the cardholder is present. | | `SUBSCRIPTION` | a merchant-initiated payment as part of a series of payments on a fixed schedule and a set amount. | | `UNSCHEDULED` | a merchant-initiated payment using stored payment details with no fixed schedule or amount. |
    - `paymentMethodToken` string, required — The payment method token used to authorize the transaction.
    - `isVaulted` boolean — Whether the payment method token represents a vaulted payment method and can be used for future payments.
    - `analyticsId` string, required — Unique analytics identifier corresponding to a payment method
    - `paymentMethodType` 'PAYMENT_CARD' | 'GOOGLE_PAY' | 'APPLE_PAY' | 'PAYPAL' | 'BANK_ACCOUNT' | 'KLARNA' | 'APAYA' | 'OPENNODE' | 'HOOLAH' | 'ATOME' | 'COINBASE' | 'NETS' | 'TWOC2P' | 'CLEARPAY' | 'SHOPEEPAY' | 'TRIPLE_A' | 'AFTERPAY' | 'NOL_PAY' | 'PAY_NL_IDEAL' | 'PAY_NL_BANCONTACT' | 'PAY_NL_DIRECT_DEBIT' | 'PAY_NL_SOFORT_BANKING' | 'PAY_NL_PAYPAL' | 'PAY_NL_PAYCONIQ' | 'PAY_NL_GIROPAY' | 'PAY_NL_P24' | 'PAY_NL_EPS' | 'PAY_NL_KAARTDIRECT' | 'ADYEN_SOFORT' | 'ADYEN_TWINT' | 'ADYEN_GIROPAY' | 'ADYEN_TRUSTLY' | 'ADYEN_ALIPAY' | 'ADYEN_MOBILEPAY' | 'ADYEN_MULTIBANCO' | 'ADYEN_VIPPS' | 'ADYEN_DOTPAY' | 'ADYEN_IDEAL' | 'ADYEN_BLIK' | 'ADYEN_PAYTRAIL' | 'ADYEN_INTERAC' | 'ADYEN_PAYSHOP' | 'ADYEN_MBWAY' | 'ADYEN_AFFIRM' | 'ADYEN_KLARNA' | 'ADYEN_BANCONTACT_PAYCONIQ' | 'ADYEN_EPS' | 'ADYEN_BANCONTACT_CARD' | 'ADYEN_SWISH' | 'MOLLIE_IDEAL' | 'MOLLIE_BANCONTACT' | 'MOLLIE_P24' | 'MOLLIE_GIROPAY' | 'MOLLIE_EPS' | 'MOLLIE_GIFTCARD' | 'MOLLIE_SOFORT' | 'NETAXEPT_PAYTRAIL' | 'BUCKAROO_IDEAL' | 'BUCKAROO_BANCONTACT' | 'BUCKAROO_SOFORT' | 'BUCKAROO_GIROPAY' | 'BUCKAROO_EPS' | 'RAPYD_GCASH' | 'RAPYD_PROMPTPAY' | 'RAPYD_GRABPAY' | 'RAPYD_POLI' | 'RAPYD_FAST' | 'XFERS_PAYNOW' | 'STRIPE_GIROPAY' | 'STRIPE_IDEAL' | 'ALIPAY_CN' | 'CHAI_KAKAOPAY' | 'CHAI_NAVER' | 'CHAI_TOSS' | 'XENDIT_DANA' | 'XENDIT_OVO' | 'XENDIT_SHOPEEPAY' | 'XENDIT_RETAIL_OUTLETS' | 'OMISE_PROMPTPAY' | 'OMISE_TRUEMONEY' | 'EBANX_PAGOFACIL' | 'PACYPAY_WECHAT' | 'PACYPAY_ALIPAY' | 'PACYPAY_ALIPAY_PLUS' | 'WORLDPAY_IDEAL' | 'IPAY88_CARD' | 'INGENICO_PAYPAL' | 'VOLT_PIX' | 'VOLT_BANK_TRANSFER' | 'BRAINTREE_VENMO' | 'THUNES_SPIRIT_OF_CADEAU' | 'THUNES_ILLICADO' | 'THUNES_CARTE_CADEAU_CONFORAMA' | 'THUNES_CHEQUE_FIDELITE_CONFORAMA' | 'SIPS_CPAY' | 'SIPS_CPAYCONFORAMA' | 'MONEXT_CETELEM' | 'MONEXT_CPAY', required — Payment method type, where `OFF_SESSION_PAYMENT` is used for APM (Alternative Payment Method) payments and `PAYMENT_CARD` for traditional debit or credit cards. Please note that this list is different from one indicated on [available payment methods](https://primer.io/docs/connections/payment-methods/available-payment-methods) page and values of this field will be changed in the future versions of the API.
    - `paymentMethodData` union, required — Payment method data
      - PaymentCardTokenAPISchema
        - `first6Digits` string
        - `last4Digits` string, required
        - `expirationMonth` string, required
        - `expirationYear` string, required
        - `cardholderName` string
        - `network` string
        - `isNetworkTokenized` boolean
        - `binData` BinDataAPISchema
          - `network` 'AMEX' | 'DANKORT' | 'DINERS_CLUB' | 'DISCOVER' | 'ENROUTE' | 'ELO' | 'HIPER' | 'INTERAC' | 'JCB' | 'MAESTRO' | 'MASTERCARD' | 'MIR' | 'PRIVATE_LABEL' | 'UNIONPAY' | 'VISA' | 'CARTES_BANCAIRES' | 'OTHER', required — The list of available card networks.
          - `issuerCountryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
          - `issuerName` string
          - `issuerCurrencyCode` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SOS' | 'SRD' | 'SSP' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XFU' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' — 3-letter currency code in <a href='https://en.wikipedia.org/wiki/ISO_4217#Active_codes'>ISO 4217</a> format, e.g. <code>USD</code> for US dollars.
          - `regionalRestriction` 'DOMESTIC_USE_ONLY' | 'NONE' | 'UNKNOWN', required — An enumeration.
          - `accountNumberType` 'PRIMARY_ACCOUNT_NUMBER' | 'NETWORK_TOKEN' | 'DIGITAL_PAN' | 'UNKNOWN', required — An enumeration.
          - `accountFundingType` 'CREDIT' | 'DEBIT' | 'PREPAID' | 'CHARGE' | 'DEFERRED_DEBIT' | 'UNKNOWN', required — An enumeration.
          - `prepaidReloadableIndicator` 'RELOADABLE' | 'NON_RELOADABLE' | 'NOT_APPLICABLE' | 'UNKNOWN', required — An enumeration.
          - `productUsageType` 'CONSUMER' | 'BUSINESS' | 'GOVERNMENT' | 'UNKNOWN', required — An enumeration.
          - `productCode` string, required
          - `productName` string, required
      - PayPalOrderTokenAPISchema
        - `paypalOrderId` string, required
        - `externalPayerInfo` PayPalExternalPayerInfoAPISchema
          - `externalPayerId` string
          - `email` string
          - `firstName` string
          - `lastName` string
        - `paypalStatus` string
      - PayPalBillingAgreementAPISchema
        - `paypalBillingAgreementId` string, required
        - `externalPayerInfo` PayPalExternalPayerInfoAPISchema
          - `externalPayerId` string
          - `email` string
          - `firstName` string
          - `lastName` string
        - `shippingAddress` AddressAPISchema
          - `firstName` string
          - `lastName` string
          - `addressLine1` string, required — Street name, Company name or PO Box
          - `addressLine2` string — Apartment, Unit or Building number
          - `city` string, required — Name of the city, district, town or village
          - `state` string — State, County or Province
          - `countryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW', required — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
          - `postalCode` string — Postal or ZIP code
        - `paypalStatus` string
      - GoCardlessMandateAPISchema
        - `gocardlessMandateId` string, required — Unique identifier of a GoCardless mandate agreement
      - KlarnaPaymentSessionAPISchema
        - `klarnaAuthorizationToken` string, required
        - `sessionData` KlarnaSessionDetailsAPISchema, required
          - `recurringDescription` string
          - `billingAddress` KlarnaAddressAPISchema, required
            - `title` string
            - `firstName` string
            - `lastName` string
            - `email` string
            - `phoneNumber` string
            - `addressLine1` string
            - `addressLine2` string
            - `addressLine3` string
            - `city` string
            - `state` string
            - `countryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
            - `postalCode` string
          - `shippingAddress` KlarnaAddressAPISchema
            - `title` string
            - `firstName` string
            - `lastName` string
            - `email` string
            - `phoneNumber` string
            - `addressLine1` string
            - `addressLine2` string
            - `addressLine3` string
            - `city` string
            - `state` string
            - `countryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
            - `postalCode` string
          - `purchaseCountry` string, required
          - `purchaseCurrency` string, required
          - `locale` string, required
          - `orderLines` unknown[], required
            - unknown
          - `tokenDetails` KlarnaTokenDetails
            - `type` string, required
            - `brand` string
            - `masked_number` string
            - `expiry_date` string
      - KlarnaCustomerTokenAPISchema
        - `klarnaCustomerToken` string, required
        - `sessionData` KlarnaSessionDetailsAPISchema, required
          - `recurringDescription` string
          - `billingAddress` KlarnaAddressAPISchema, required
            - `title` string
            - `firstName` string
            - `lastName` string
            - `email` string
            - `phoneNumber` string
            - `addressLine1` string
            - `addressLine2` string
            - `addressLine3` string
            - `city` string
            - `state` string
            - `countryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
            - `postalCode` string
          - `shippingAddress` KlarnaAddressAPISchema
            - `title` string
            - `firstName` string
            - `lastName` string
            - `email` string
            - `phoneNumber` string
            - `addressLine1` string
            - `addressLine2` string
            - `addressLine3` string
            - `city` string
            - `state` string
            - `countryCode` 'AW' | 'AF' | 'AO' | 'AI' | 'AX' | 'AL' | 'AD' | 'AE' | 'AR' | 'AM' | 'AS' | 'AQ' | 'TF' | 'AG' | 'AU' | 'AT' | 'AZ' | 'BI' | 'BE' | 'BJ' | 'BQ' | 'BF' | 'BD' | 'BG' | 'BH' | 'BS' | 'BA' | 'BL' | 'BY' | 'BZ' | 'BM' | 'BO' | 'BR' | 'BB' | 'BN' | 'BT' | 'BV' | 'BW' | 'CF' | 'CA' | 'CC' | 'CH' | 'CL' | 'CN' | 'CI' | 'CM' | 'CD' | 'CG' | 'CK' | 'CO' | 'KM' | 'CV' | 'CR' | 'CU' | 'CW' | 'CX' | 'KY' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DM' | 'DK' | 'DO' | 'DZ' | 'EC' | 'EG' | 'ER' | 'EH' | 'ES' | 'EE' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FR' | 'FO' | 'FM' | 'GA' | 'GB' | 'GE' | 'GG' | 'GH' | 'GI' | 'GN' | 'GP' | 'GM' | 'GW' | 'GQ' | 'GR' | 'GD' | 'GL' | 'GT' | 'GF' | 'GU' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IM' | 'IN' | 'IO' | 'IE' | 'IR' | 'IQ' | 'IS' | 'IL' | 'IT' | 'JM' | 'JE' | 'JO' | 'JP' | 'KZ' | 'KE' | 'KG' | 'KH' | 'KI' | 'KN' | 'KR' | 'KW' | 'LA' | 'LB' | 'LR' | 'LY' | 'LC' | 'LI' | 'LK' | 'LS' | 'LT' | 'LU' | 'LV' | 'MO' | 'MF' | 'MA' | 'MC' | 'MD' | 'MG' | 'MV' | 'MX' | 'MH' | 'MK' | 'ML' | 'MT' | 'MM' | 'ME' | 'MN' | 'MP' | 'MZ' | 'MR' | 'MS' | 'MQ' | 'MU' | 'MW' | 'MY' | 'YT' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NU' | 'NL' | 'NO' | 'NP' | 'NR' | 'NZ' | 'OM' | 'PK' | 'PA' | 'PN' | 'PE' | 'PH' | 'PW' | 'PG' | 'PL' | 'PR' | 'KP' | 'PT' | 'PY' | 'PS' | 'PF' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'SA' | 'SD' | 'SN' | 'SG' | 'GS' | 'SH' | 'SJ' | 'SB' | 'SL' | 'SV' | 'SM' | 'SO' | 'PM' | 'RS' | 'SS' | 'ST' | 'SR' | 'SK' | 'SI' | 'SE' | 'SZ' | 'SX' | 'SC' | 'SY' | 'TC' | 'TD' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TM' | 'TL' | 'TO' | 'TT' | 'TN' | 'TR' | 'TV' | 'TW' | 'TZ' | 'UG' | 'UA' | 'UM' | 'UY' | 'US' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VI' | 'VN' | 'VU' | 'WF' | 'WS' | 'YE' | 'ZA' | 'ZM' | 'ZW' — 2-letter country code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements'>ISO 3166-1 alpha</a> format, e.g. <code>FR</code> for France and <code>GB</code> for the United Kingdom.
            - `postalCode` string
          - `purchaseCountry` string, required
          - `purchaseCurrency` string, required
          - `locale` string, required
          - `orderLines` unknown[], required
            - unknown
          - `tokenDetails` KlarnaTokenDetails
            - `type` string, required
            - `brand` string
            - `masked_number` string
            - `expiry_date` string
      - IdealPayNLTokenAPISchema
        - `paymentMethodConfigId` string, uuid, required
      - ApayaCustomerTokenAPISchema
        - `mx` string, required
        - `mnc` integer
        - `mcc` integer
    - `threeDSecureAuthentication` ThreeDSecureAuthenticationAPISchema
      - `responseCode` 'NOT_PERFORMED' | 'SKIPPED' | 'AUTH_SUCCESS' | 'AUTH_FAILED' | 'CHALLENGE' | 'METHOD', required — An enumeration.
      - `reasonCode` union
        - 'GATEWAY_UNAVAILABLE' | 'DISABLED_BY_MERCHANT' | 'NOT_SUPPORTED_BY_ISSUER' | 'FAILED_TO_NEGOTIATE' | 'UNKNOWN_ACS_RESPONSE' | '3DS_SERVER_ERROR' | 'ACQUIRER_NOT_CONFIGURED' | 'ACQUIRER_NOT_PARTICIPATING' | 'EXEMPTION_ACCEPTED' — An enumeration.
        - 'UNKNOWN' | 'REJECTED_BY_ISSUER' | 'CARD_AUTHENTICATION_FAILED' | 'UNKNOWN_DEVICE' | 'UNSUPPORTED_DEVICE' | 'EXCEEDS_AUTHENTICATION_FREQUENCY_LIMIT' | 'EXPIRED_CARD' | 'INVALID_CARD_NUMBER' | 'INVALID_TRANSACTION' | 'NO_CARD_RECORD' | 'SECURITY_FAILURE' | 'STOLEN_CARD' | 'SUSPECTED_FRAUD' | 'TRANSACTION_NOT_PERMITTED_TO_CARDHOLDER' | 'CARDHOLDER_NOT_ENROLLED_IN_SERVICE' | 'TRANSACTION_TIMED_OUT_AT_THE_ACS' | 'LOW_CONFIDENCE' | 'MEDIUM_CONFIDENCE' | 'HIGH_CONFIDENCE' | 'VERY_HIGH_CONFIDENCE' | 'EXCEEDS_ACS_MAXIMUM_CHALLENGES' | 'NON_PAYMENT_NOT_SUPPORTED' | 'THREE_RI_NOT_SUPPORTED' | 'ACS_TECHNICAL_ISSUE' | 'DECOUPLED_REQUIRED_BY_ACS' | 'DECOUPLED_MAX_EXPIRY_EXCEEDED' | 'DECOUPLED_AUTHENTICATION_INSUFFICIENT_TIME' | 'AUTHENTICATION_ATTEMPTED_BUT_NOT_PERFORMED_BY_CARDHOLDER' | 'ACS_TIMED_OUT' | 'INVALID_ACS_RESPONSE' | 'ACS_SYSTEM_ERROR_RESPONSE' | 'ERROR_GENERATING_CAVV' | 'PROTOCOL_VERSION_NOT_SUPPORTED' | 'TRANSACTION_EXCLUDED_FROM_ATTEMPTS_PROCESSING' | 'REQUESTED_PROGRAM_NOT_SUPPORTED' — This enum is derived from the `transStatusReason` on page 218 of the [EMV Co 3DS protocol specification](https://www.emvco.com/terms-of-use/?u=/wp-content/uploads/documents/EMVCo_3DS_Spec_v220_122018.pdf) | Code | Description | |------|-----------------------------------------| | 01 | Card authentication failed | | 02 | Unknown Device | | 03 | Unsupported Device | | 04 | Exceeds authentication frequency limit | | 05 | Expired card | | 06 | Invalid card number | | 07 | Invalid transaction | | 08 | No Card record | | 09 | Security failure | | 10 | Stolen card | | 11 | Suspected fraud | | 12 | Transaction not permitted to cardholder | | 13 | Cardholder not enrolled in service | | 14 | Transaction timed out at the ACS | | 15 | Low confidence | | 16 | Medium confidence |
      - `reasonText` string
      - `protocolVersion` string
      - `challengeIssued` boolean
    - `authorizationType` 'ESTIMATED' | 'FINAL' — Type of authorization for the payment.
  - `processor` PaymentResponseProcessorAPISchema
    - `name` string — The payment processor used for this payment.
    - `processorMerchantId` string — The merchant ID registered at the payment processor used for this payment.
    - `amountCaptured` integer, required — If no capture was performed, this value will be set to `0`. If one or more partial captures were performed, this value will be a sum of all partial capture amounts.
    - `amountRefunded` integer, required — If no refund was performed, this value will be set to `0`. If one or more partial refunds were performed, this value will be a sum of all partial refund amounts.
  - `requiredAction` PaymentRequiredActionAPISchema
    - `name` '3DS_AUTHENTICATION' | 'USE_PRIMER_SDK' | 'PAYMENT_METHOD_VOUCHER' | 'PROCESSOR_3DS', required — An enumeration.
    - `description` string, required — Human description of the required action to perform.
    - `clientToken` string — The client token to be returned to the SDK if a required action is returned.
  - `statusReason` StatusReasonAPISchema
    - `type` 'APPLICATION_ERROR' | 'GATEWAY_REJECTED' | 'GATEWAY_TIMEOUT' | 'ISSUER_DECLINED', required — The status reason type for the payment, providing more information on the error. `APPLICATION_ERROR` indicates something went wrong internally within primer's system. `GATEWAY_REJECTED` indicates that request was rejected on the third-party. `GATEWAY_TIMEOUT` indicates the timeout limit on the third party request was exceeded. `ISSUER_DECLINED` indicates a legitimate decline that is not due to a timeout.
    - `declineType` 'SOFT_DECLINE' | 'HARD_DECLINE' — An enumeration.
    - `code` 'ERROR' | 'INVALID_CARD_NUMBER' | 'EXPIRED_CARD' | 'LOST_OR_STOLEN_CARD' | 'SUSPECTED_FRAUD' | 'UNKNOWN' | 'DECLINED' | 'REFER_TO_CARD_ISSUER' | 'DO_NOT_HONOR' | 'INSUFFICIENT_FUNDS' | 'WITHDRAWAL_LIMIT_EXCEEDED' | 'ISSUER_TEMPORARILY_UNAVAILABLE' | 'AUTHENTICATION_REQUIRED' — An enumeration.
    - `message` string — In case of an error on the processor's part, we will return the message returned by the processor. This is usually a human readable error.
    - `paymentMethodResultCode` string — The result code returned by the payment method or card network. This code is unified across all supported processors. _e.g. Code `46` refers to the message "Closed account" for Visa across all supported processors._
    - `paymentMethodResultMessage` string — Human-readable version of the Payment Method Result Code. This message is unified across all supported processors. _e.g. Code `46` refers to the message "Closed account" for Visa across all supported processors._
    - `paymentMethodAdviceCode` string — The advice code returned by the payment method or card network. This code is unified across all supported processors. _For payments made with Mastercard, this represents the Merchant Advice Code (MAC)._ _e.g. Code `24` refers to the message "Retry after 1 hour" for Mastercard across all supported processors._
    - `paymentMethodAdviceMessage` string — Human-readable version of the Payment Method Advice Code. This message is unified across all supported processors. _For payments made with Mastercard, this represents the message of the Merchant Advice Code (MAC)._ _e.g. Code `24` refers to the message "Retry after 1 hour" for Mastercard across all supported processors._
    - `advisedAction` 'RETRY_LATER' | 'UPDATE_DATA' | 'DO_NOT_RETRY' | 'STOP_ALL_PAYMENTS' — The Primer-recommended action to take based on the underlying decline reason and advice code. This advised action is unified across all supported processors and payment methods. - `RETRY_LATER`: The payment was likely declined due to a temporary issue (e.g. Insufficient funds). The payment can be retried immediately or at a later date. - `UPDATE_DATA`: The payment was likely declined because critical data was missing or out-of-date. Please ensure you use the most up-to-date payment information and customer details before retrying the payment. - `DO_NOT_RETRY`: The payment was declined and should not be retried. You can still charge this payment method for future orders or installments. - `STOP_ALL_PAYMENTS`: The processor or payment method explicitly informs you to stop making any payment requests with this payment method. Please use another payment method to charge this customer. - `null`: Primer is unable to determine a recommended action.
  - `transactions` TransactionOverviewAPISchema[], required — A list summarizing the transactions that occurred while processing the payment. Note: a refund is a separate transaction and so will appear in this `transactions` list if a refund was performed.
    - `date` string, required — Date & time of the transaction (UTC)
    - `amount` integer, required — Transaction amount in minor units
    - `currencyCode` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SOS' | 'SRD' | 'SSP' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XFU' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required — 3-letter currency code in <a href='https://en.wikipedia.org/wiki/ISO_4217#Active_codes'>ISO 4217</a> format, e.g. <code>USD</code> for US dollars.
    - `orderId` string, required — The reference submitted on payment creation or refund.
    - `transactionType` 'SALE' | 'REFUND', required — An enumeration.
    - `processorTransactionId` string — Processor's unique identifier for the transaction
    - `authorizationCode` string — The authorization code returned by the processor on a successful authorization. For transactions that were subsequently auth-adjusted, this is the latest code. Useful for chargeback matching and bank reconciliation. Not guaranteed to be present; availability depends on the processor.
    - `processorName` string, required — An identifier of a processor.
    - `processorMerchantId` string, required — Processor's main account identifier. * Adyen: Account code * Braintree: Merchant ID * Stripe: Account ID"
    - `processorStatus` 'PENDING' | 'FAILED' | 'AUTHORIZED' | 'SETTLING' | 'PARTIALLY_SETTLED' | 'SETTLED' | 'DECLINED' | 'CANCELLED', required — An enumeration.
    - `processorStatusReason` StatusReasonAPISchema
      - `type` 'APPLICATION_ERROR' | 'GATEWAY_REJECTED' | 'GATEWAY_TIMEOUT' | 'ISSUER_DECLINED', required — The status reason type for the payment, providing more information on the error. `APPLICATION_ERROR` indicates something went wrong internally within primer's system. `GATEWAY_REJECTED` indicates that request was rejected on the third-party. `GATEWAY_TIMEOUT` indicates the timeout limit on the third party request was exceeded. `ISSUER_DECLINED` indicates a legitimate decline that is not due to a timeout.
      - `declineType` 'SOFT_DECLINE' | 'HARD_DECLINE' — An enumeration.
      - `code` 'ERROR' | 'INVALID_CARD_NUMBER' | 'EXPIRED_CARD' | 'LOST_OR_STOLEN_CARD' | 'SUSPECTED_FRAUD' | 'UNKNOWN' | 'DECLINED' | 'REFER_TO_CARD_ISSUER' | 'DO_NOT_HONOR' | 'INSUFFICIENT_FUNDS' | 'WITHDRAWAL_LIMIT_EXCEEDED' | 'ISSUER_TEMPORARILY_UNAVAILABLE' | 'AUTHENTICATION_REQUIRED' — An enumeration.
      - `message` string — In case of an error on the processor's part, we will return the message returned by the processor. This is usually a human readable error.
      - `paymentMethodResultCode` string — The result code returned by the payment method or card network. This code is unified across all supported processors. _e.g. Code `46` refers to the message "Closed account" for Visa across all supported processors._
      - `paymentMethodResultMessage` string — Human-readable version of the Payment Method Result Code. This message is unified across all supported processors. _e.g. Code `46` refers to the message "Closed account" for Visa across all supported processors._
      - `paymentMethodAdviceCode` string — The advice code returned by the payment method or card network. This code is unified across all supported processors. _For payments made with Mastercard, this represents the Merchant Advice Code (MAC)._ _e.g. Code `24` refers to the message "Retry after 1 hour" for Mastercard across all supported processors._
      - `paymentMethodAdviceMessage` string — Human-readable version of the Payment Method Advice Code. This message is unified across all supported processors. _For payments made with Mastercard, this represents the message of the Merchant Advice Code (MAC)._ _e.g. Code `24` refers to the message "Retry after 1 hour" for Mastercard across all supported processors._
      - `advisedAction` 'RETRY_LATER' | 'UPDATE_DATA' | 'DO_NOT_RETRY' | 'STOP_ALL_PAYMENTS' — The Primer-recommended action to take based on the underlying decline reason and advice code. This advised action is unified across all supported processors and payment methods. - `RETRY_LATER`: The payment was likely declined due to a temporary issue (e.g. Insufficient funds). The payment can be retried immediately or at a later date. - `UPDATE_DATA`: The payment was likely declined because critical data was missing or out-of-date. Please ensure you use the most up-to-date payment information and customer details before retrying the payment. - `DO_NOT_RETRY`: The payment was declined and should not be retried. You can still charge this payment method for future orders or installments. - `STOP_ALL_PAYMENTS`: The processor or payment method explicitly informs you to stop making any payment requests with this payment method. Please use another payment method to charge this customer. - `null`: Primer is unable to determine a recommended action.
    - `cardTokenType` 'CARD_PAN' | 'NETWORK_TOKEN' | 'PROCESSOR_TOKEN' — An enumeration.
    - `reason` string — The reason for a cancel or refund request on this transaction, if any.
    - `events` TransactionEventApiResponse[] — A list of events related to the transaction, included when the `expand` parameter is passed.
      - `id` string, uuid, required — The id of the event.
      - `processorEventId` string — The ID of the event from the payment processor (e.g. PayPal).
      - `date` string, date-time, required — Timestamp of when the event occurred.
      - `type` 'AUTHORIZATION_SUCCEEDED' | 'AUTHORIZATION_ADJUSTMENT_SUCCEEDED' | 'CAPTURE_SUCCEEDED' | 'CANCELLATION_SUCCEEDED' | 'AUTHORIZATION_FAILED' | 'AUTHORIZATION_DECLINED' | 'AUTHORIZATION_ADJUSTMENT_FAILED' | 'AUTHORIZATION_ADJUSTMENT_DECLINED' | 'CAPTURE_FAILED' | 'CAPTURE_DECLINED' | 'CANCELLATION_FAILED' | 'CANCELLATION_DECLINED', required — The type of the event.
      - `amount` integer — The amount associated with the event in minor units.
      - `final` boolean — Indicates whether the event is final. For example, in the case of a capture event this would indicate whether it was a final capture or not, but in the case of a cancellation request this field will not be present.
      - `processorStatusReason` StatusReasonAPISchema
        - `type` 'APPLICATION_ERROR' | 'GATEWAY_REJECTED' | 'GATEWAY_TIMEOUT' | 'ISSUER_DECLINED', required — The status reason type for the payment, providing more information on the error. `APPLICATION_ERROR` indicates something went wrong internally within primer's system. `GATEWAY_REJECTED` indicates that request was rejected on the third-party. `GATEWAY_TIMEOUT` indicates the timeout limit on the third party request was exceeded. `ISSUER_DECLINED` indicates a legitimate decline that is not due to a timeout.
        - `declineType` 'SOFT_DECLINE' | 'HARD_DECLINE' — An enumeration.
        - `code` 'ERROR' | 'INVALID_CARD_NUMBER' | 'EXPIRED_CARD' | 'LOST_OR_STOLEN_CARD' | 'SUSPECTED_FRAUD' | 'UNKNOWN' | 'DECLINED' | 'REFER_TO_CARD_ISSUER' | 'DO_NOT_HONOR' | 'INSUFFICIENT_FUNDS' | 'WITHDRAWAL_LIMIT_EXCEEDED' | 'ISSUER_TEMPORARILY_UNAVAILABLE' | 'AUTHENTICATION_REQUIRED' — An enumeration.
        - `message` string — In case of an error on the processor's part, we will return the message returned by the processor. This is usually a human readable error.
        - `paymentMethodResultCode` string — The result code returned by the payment method or card network. This code is unified across all supported processors. _e.g. Code `46` refers to the message "Closed account" for Visa across all supported processors._
        - `paymentMethodResultMessage` string — Human-readable version of the Payment Method Result Code. This message is unified across all supported processors. _e.g. Code `46` refers to the message "Closed account" for Visa across all supported processors._
        - `paymentMethodAdviceCode` string — The advice code returned by the payment method or card network. This code is unified across all supported processors. _For payments made with Mastercard, this represents the Merchant Advice Code (MAC)._ _e.g. Code `24` refers to the message "Retry after 1 hour" for Mastercard across all supported processors._
        - `paymentMethodAdviceMessage` string — Human-readable version of the Payment Method Advice Code. This message is unified across all supported processors. _For payments made with Mastercard, this represents the message of the Merchant Advice Code (MAC)._ _e.g. Code `24` refers to the message "Retry after 1 hour" for Mastercard across all supported processors._
        - `advisedAction` 'RETRY_LATER' | 'UPDATE_DATA' | 'DO_NOT_RETRY' | 'STOP_ALL_PAYMENTS' — The Primer-recommended action to take based on the underlying decline reason and advice code. This advised action is unified across all supported processors and payment methods. - `RETRY_LATER`: The payment was likely declined due to a temporary issue (e.g. Insufficient funds). The payment can be retried immediately or at a later date. - `UPDATE_DATA`: The payment was likely declined because critical data was missing or out-of-date. Please ensure you use the most up-to-date payment information and customer details before retrying the payment. - `DO_NOT_RETRY`: The payment was declined and should not be retried. You can still charge this payment method for future orders or installments. - `STOP_ALL_PAYMENTS`: The processor or payment method explicitly informs you to stop making any payment requests with this payment method. Please use another payment method to charge this customer. - `null`: Primer is unable to determine a recommended action.
  - `riskData` RiskDataAPISchema — Risk data associated with this payment.
    - `fraudChecks` FraudCheckAPISchema — Results of the pre-authorization and post-authorization fraud checks.
      - `source` string
      - `preAuthorizationResult` 'ACCEPT' | 'REFUSE' | 'FAILED' | 'THREE_DS' | 'THREE_DS_EXEMPTION' — Possible pre-authorization fraud check outcomes.
      - `preAuthorizationRecommendation` 'TRANSACTION_RISK_ANALYSIS' — Pre-authorization recommendation indicating the SCA exemption or risk assessment path taken. Only present when `preAuthorizationResult` is `THREE_DS_EXEMPTION`. Values: - `TRANSACTION_RISK_ANALYSIS`: Indicates that the fraud check deemed the transaction low risk and recommends applying a Transaction Risk Analysis (TRA) exemption to bypass Strong Customer Authentication (SCA) under PSD2, reducing friction for users.
      - `postAuthorizationResult` 'ACCEPT' | 'REFUSE' | 'FAILED' | 'THREE_DS' — Possible post-authorization fraud check outcomes.
    - `cvvCheck` CVVCheckAPISchema — Results of any external CVV check performed on this payment.
      - `source` string, required
      - `result` 'MATCHED' | 'NOT_MATCHED' | 'NOT_VERIFIED' | 'NOT_PROVIDED' | 'NOT_APPLICABLE' | 'SKIPPED', required — Possible risk assessment values for CVV and AVS checks.
    - `avsCheck` AVSCheckAPISchema — Results of any external AVS check performed on this payment.
      - `source` string, required
      - `result` AVSRiskAssessmentValues, required
        - `streetAddress` 'MATCHED' | 'NOT_MATCHED' | 'NOT_VERIFIED' | 'NOT_PROVIDED' | 'NOT_APPLICABLE' | 'SKIPPED', required — Possible risk assessment values for CVV and AVS checks.
        - `postalCode` 'MATCHED' | 'NOT_MATCHED' | 'NOT_VERIFIED' | 'NOT_PROVIDED' | 'NOT_APPLICABLE' | 'SKIPPED', required — Possible risk assessment values for CVV and AVS checks.

## Other responses

- `400` — Error Response
- `409` — Error Response
- `422` — Error Response

---

[API](https://skmtc.dev/primer/apis/primer-api.md) · [All operations](https://skmtc.dev/primer/apis/primer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/primer/primer-api/revisions/a4459530edb7/schema)
