# Accept a Payment in an iOS App

Learn how to accept a one-time card payment in your iOS app with the Finix iOS SDK and the Finix API. After setup, you can charge buyers from a native checkout screen in your app.

To see a working example, run the [Finix iOS SDK demo app](/ios/online/demo-app-walkthrough).

## Prerequisites

Before you start, you need:

- A [Finix Sandbox account](https://finix.payments-dashboard.com/signup).
- A Sandbox API key. The Finix API uses HTTP Basic Authentication with the key's username and password.
- Your Application ID, which initializes the Finix iOS SDK.
- Your Merchant ID, which tells Finix which merchant receives the funds.
- Xcode 15.0 or later, Swift 5.9 or later, and an app that targets iOS 15.0 or later.


To find these values, see [Set Up Development Environment](/guides/getting-started/set-up-developer-environment).

Keep your API key on your back end
The app only needs your Application ID. Don't embed your API username or password in your app, because anyone can extract them from the app binary. Your back end makes every Finix API call in this guide.

## Step 1: Create your buyer

### Create an Identity

On your back end, create an Identity to represent the buyer. Every field on a buyer Identity is optional. Collect at least the buyer's name and email to help with reconciliation and disputes.

Don't pass the `business_type` field when you create a buyer Identity. Including `business_type` makes Finix treat the Identity as a seller.

Example
```shell cURL
curl -i -X POST \
  -u '<username>:<password>' \
  https://finix.sandbox-payments-api.com/identities \
  -H 'Content-Type: application/json' \
  -d '{
    "entity": {
      "email": "john.smith@example.com",
      "first_name": "John",
      "last_name": "Smith",
      "personal_address": {
        "city": "San Mateo",
        "country": "USA",
        "line1": "741 Douglass St",
        "line2": "Apartment 7",
        "postal_code": "94114",
        "region": "CA"
      },
      "phone": "14158885080"
    },
    "identity_roles": [
      "BUYER"
    ],
    "type": "PERSONAL"
  }'
```

API Definition
```json
{
  "$ref": "#/components/schemas/createIdentityBuyer",
  "components": {
    "schemas": {
      "country": {
        "type": "string",
        "enum": [
          "ABW",
          "AFG",
          "AGO",
          "AIA",
          "ALA",
          "ALB",
          "AND",
          "ARE",
          "ARG",
          "ARM",
          "ASM",
          "ATA",
          "ATF",
          "ATG",
          "AUS",
          "AUT",
          "AZE",
          "BDI",
          "BEL",
          "BEN",
          "BES",
          "BFA",
          "BGD",
          "BGR",
          "BHR",
          "BHS",
          "BIH",
          "BLM",
          "BLR",
          "BLZ",
          "BMU",
          "BOL",
          "BRA",
          "BRB",
          "BRN",
          "BTN",
          "BVT",
          "BWA",
          "CAF",
          "CAN",
          "CCK",
          "CHE",
          "CHL",
          "CHN",
          "CIV",
          "CMR",
          "COD",
          "COG",
          "COK",
          "COL",
          "COM",
          "CPV",
          "CRI",
          "CUB",
          "CUW",
          "CXR",
          "CYM",
          "CYP",
          "CZE",
          "DEU",
          "DJI",
          "DMA",
          "DNK",
          "DOM",
          "DZA",
          "ECU",
          "EGY",
          "ERI",
          "ESH",
          "ESP",
          "EST",
          "ETH",
          "FIN",
          "FJI",
          "FLK",
          "FRA",
          "FRO",
          "FSM",
          "GAB",
          "GBR",
          "GEO",
          "GGY",
          "GHA",
          "GIB",
          "GIN",
          "GLP",
          "GMB",
          "GNB",
          "GNQ",
          "GRC",
          "GRD",
          "GRL",
          "GTM",
          "GUF",
          "GUM",
          "GUY",
          "HKG",
          "HMD",
          "HND",
          "HRV",
          "HTI",
          "HUN",
          "IDN",
          "IMN",
          "IND",
          "IOT",
          "IRL",
          "IRN",
          "IRQ",
          "ISL",
          "ISR",
          "ITA",
          "JAM",
          "JEY",
          "JOR",
          "JPN",
          "KAZ",
          "KEN",
          "KGZ",
          "KHM",
          "KIR",
          "KNA",
          "KOR",
          "KWT",
          "LAO",
          "LBN",
          "LBR",
          "LBY",
          "LCA",
          "LIE",
          "LKA",
          "LSO",
          "LTU",
          "LUX",
          "LVA",
          "MAC",
          "MAF",
          "MAR",
          "MCO",
          "MDA",
          "MDG",
          "MDV",
          "MEX",
          "MHL",
          "MKD",
          "MLI",
          "MLT",
          "MMR",
          "MNE",
          "MNG",
          "MNP",
          "MRT",
          "MSR",
          "MTQ",
          "MUS",
          "MWI",
          "MYS",
          "MYT",
          "NAM",
          "NCL",
          "NER",
          "NFK",
          "NGA",
          "NIC",
          "NIU",
          "NLD",
          "NOR",
          "NPL",
          "NRU",
          "NZL",
          "OMN",
          "PAK",
          "PAN",
          "PCN",
          "PER",
          "PHL",
          "PLW",
          "PNG",
          "POL",
          "PRI",
          "PRK",
          "PRT",
          "PRY",
          "PSE",
          "PYF",
          "QAT",
          "REU",
          "ROU",
          "RUS",
          "RWA",
          "SAU",
          "SDN",
          "SEN",
          "SGP",
          "SGS",
          "SHN",
          "SJM",
          "SLB",
          "SLE",
          "SLV",
          "SMR",
          "SOM",
          "SPM",
          "SRB",
          "SSD",
          "STP",
          "SUR",
          "SVK",
          "SVN",
          "SWE",
          "SWZ",
          "SXM",
          "SYC",
          "SYR",
          "TCA",
          "TCD",
          "TGO",
          "THA",
          "TJK",
          "TKL",
          "TKM",
          "TLS",
          "TON",
          "TTO",
          "TUN",
          "TUR",
          "TUV",
          "TWN",
          "TZA",
          "UGA",
          "UKR",
          "UMI",
          "URY",
          "USA",
          "UZB",
          "VAT",
          "VCT",
          "VEN",
          "VGB",
          "VIR",
          "VNM",
          "VUT",
          "WLF",
          "WSM",
          "XKX",
          "YEM",
          "ZAF",
          "ZMB",
          "ZWE"
        ],
        "nullable": true
      },
      "address": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "minLength": 1,
            "description": "First line of the address (max 35 characters).",
            "nullable": true
          },
          "line2": {
            "type": "string",
            "minLength": 1,
            "description": "Second line of the address (max 35 characters).",
            "nullable": true
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "description": "City (max 20 characters).",
            "nullable": true
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "2-letter State code.",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "minLength": 1,
            "description": "Zip or Postal code (max 7 characters).",
            "nullable": true
          },
          "country": {
            "$ref": "#/components/schemas/country"
          }
        },
        "required": [
          "city",
          "country",
          "line1",
          "postal_code",
          "region"
        ]
      },
      "tags": {
        "type": "object",
        "title": "tags",
        "additionalProperties": true,
        "description": "Include up to 50 `key: value` pairs to annotate requests with custom metadata.\n- Maximum character length for individual `keys` is 40.\n- Maximum character length for individual `values` is 500.\n(For example, `order_number: 25`, `item_type: produce`, `department: sales`)",
        "nullable": true
      },
      "createIdentityBuyer": {
        "title": "Buyer",
        "type": "object",
        "properties": {
          "entity": {
            "type": "object",
            "description": "The underwriting details required to verify an `Identity`.",
            "properties": {
              "email": {
                "type": "string",
                "description": "The email address of the buyer where they can be reached (max 100 characters)."
              },
              "first_name": {
                "type": "string",
                "description": "The legal first name of the buyer (max 20 characters)."
              },
              "last_name": {
                "type": "string",
                "description": "The legal last name of the buyer (max 20 characters)."
              },
              "personal_address": {
                "description": "The billing address of the buyer. This field is used for identity verification purposes.\n",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/address"
                  }
                ]
              },
              "phone": {
                "type": "string",
                "description": "Phone number where the buyer can be reached."
              }
            }
          },
          "identity_roles": {
            "type": "array",
            "description": "The set of roles available to the `Identity`.",
            "items": {
              "type": "string",
              "enum": [
                "BUYER"
              ]
            }
          },
          "tags": {
            "$ref": "#/components/schemas/tags"
          },
          "type": {
            "type": "string",
            "description": "The `Identity` type.",
            "enum": [
              "BUSINESS",
              "PERSONAL"
            ]
          }
        },
        "required": [
          "entity"
        ]
      }
    }
  }
}
```

The response returns the buyer's Identity. Save the `id` to create the Payment Instrument in Step 2.

Example
Identity - Buyer
```json Identity - Buyer
{
  "id": "IDgdNdwvY26TK2ACZJKuwQNi",
  "created_at": "2026-11-28T01:25:53.79Z",
  "updated_at": "2026-11-28T01:25:53.79Z",
  "application": "APt9MknRZxiDMkeReFPMdr7R",
  "entity": {
    "ach_max_transaction_amount": 0,
    "amex_mid": null,
    "annual_card_volume": 0,
    "business_address": null,
    "business_name": null,
    "business_phone": null,
    "business_tax_id_fingerprint": null,
    "business_tax_id_provided": false,
    "business_type": null,
    "default_statement_descriptor": null,
    "discover_mid": null,
    "dob": null,
    "doing_business_as": null,
    "email": "john.smith@example.com",
    "first_name": "John",
    "has_accepted_credit_cards_previously": false,
    "incorporation_date": null,
    "last_name": "Smith",
    "max_transaction_amount": 0,
    "mcc": null,
    "ownership_type": null,
    "personal_address": {
      "line1": "741 Douglass St",
      "line2": "Apartment 7",
      "city": "San Mateo",
      "region": "CA",
      "postal_code": "94114",
      "country": "USA"
    },
    "phone": "14158885080",
    "principal_percentage_ownership": null,
    "short_business_name": null,
    "tax_authority": null,
    "tax_id_fingerprint": null,
    "tax_id_provided": false,
    "title": null,
    "url": null
  },
  "identity_roles": [ // [!code highlight]
    "BUYER"
  ],
  "tags": {},
  "type": "PERSONAL",
  "_links": {
    "self": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi"
    },
    "verifications": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi/verifications"
    },
    "merchants": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi/merchants"
    },
    "settlements": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi/settlements"
    },
    "authorizations": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi/authorizations"
    },
    "transfers": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi/transfers"
    },
    "payment_instruments": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi/payment_instruments"
    },
    "associated_identities": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi/associated_identities"
    },
    "disputes": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDgdNdwvY26TK2ACZJKuwQNi/disputes"
    },
    "application": {
      "href": "https://finix.sandbox-payments-api.com/applications/APt9MknRZxiDMkeReFPMdr7R"
    }
  }
}
```

API Definition
```json
{
  "$ref": "#/components/schemas/identity",
  "components": {
    "schemas": {
      "id": {
        "type": "string",
        "minLength": 1,
        "description": "The ID of the resource."
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "Timestamp of when the object was created."
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "description": "Timestamp of when the object was last updated."
      },
      "additional_underwriting_data": {
        "type": "object",
        "description": "Additional underwriting data about the seller.",
        "properties": {
          "annual_ach_volume": {
            "type": "integer",
            "description": "The approximate annual ACH sales expected to be processed (in cents) by this merchant (max 10 characters)."
          },
          "annual_card_volume": {
            "type": "integer",
            "description": "The approximate annual credit card sales expected to be processed (in cents) by this merchant."
          },
          "average_ach_transfer_amount": {
            "type": "integer",
            "description": "The approximate average ACH sale amount (in cents) for this merchant."
          },
          "average_card_transfer_amount": {
            "type": "integer",
            "description": "The average credit card sale amount (in cents) for this merchant."
          },
          "business_description": {
            "type": "string",
            "minLength": 1,
            "description": "Description of this merchant's business (max 200 characters)."
          },
          "card_volume_distribution": {
            "type": "object",
            "description": "The distribution of the merchant's credit card volume The sum of `card_volume_distribution` must be 100.",
            "nullable": true,
            "properties": {
              "card_present_percentage": {
                "type": "integer",
                "description": "The percentage of the merchant's volume that's card present (between 0 and 100)."
              },
              "ecommerce_percentage": {
                "type": "integer",
                "description": "The percentage of the merchant's business that is eCommerce (between 0 and 100)."
              },
              "mail_order_telephone_order_percentage": {
                "type": "integer",
                "description": "The percentage of the merchant's business that is a mail or telephone order (between 0 and 100)."
              }
            }
          },
          "credit_check_allowed": {
            "type": "boolean",
            "description": "Sets if this merchant has consented and accepted to a credit check."
          },
          "credit_check_ip_address": {
            "type": "string",
            "minLength": 1,
            "description": "The IP address of the merchant when they consented to a credit check (e.g., 42.1.1.112 )."
          },
          "credit_check_timestamp": {
            "type": "string",
            "minLength": 1,
            "description": "A timestamp of when this merchant consented to a credit check (e.g., 2021-04-28T16:42:55Z)."
          },
          "credit_check_user_agent": {
            "type": "string",
            "minLength": 1,
            "description": "The details of the browser that was used when this merchant consented to a credit check (e.g., Mozilla 5.0 (Macintosh; Intel Mac OS X 10 _14_6))."
          },
          "merchant_agreement_accepted": {
            "type": "boolean",
            "description": "Sets whether this merchant has accepted the terms and conditions of the merchant agreement. Required for USA and CAN sellers."
          },
          "merchant_agreement_ip_address": {
            "type": "string",
            "minLength": 1,
            "description": "IP address of the merchant when this merchant accepted the merchant agreement (e.g., 42.1.1.113). Required for USA and CAN sellers."
          },
          "merchant_agreement_timestamp": {
            "type": "string",
            "minLength": 1,
            "description": "Timestamp of when the merchant accepted Finix's Terms of Service (e.g., 2021-04-28T16:42:55Z). Required for USA and CAN sellers."
          },
          "merchant_agreement_user_agent": {
            "type": "string",
            "minLength": 1,
            "description": "The details of the browser that was used when this merchant accepted Finix's Terms of Service (e.g., Mozilla 5.0 (Macintosh; Intel Mac OS X 10 _14_6)). Required for USA and CAN sellers."
          },
          "refund_policy": {
            "type": "string",
            "minLength": 1,
            "description": "Include the value that best applies to the merchant's refund policy.",
            "enum": [
              "NO_REFUNDS",
              "MERCHANDISE_EXCHANGE_ONLY",
              "WITHIN_30_DAYS",
              "OTHER"
            ]
          },
          "volume_distribution_by_business_type": {
            "type": "object",
            "description": "Merchant's distribution of credit card volume by business type. Sum of `volume_distribution_by_business_type` must be 100.",
            "nullable": true,
            "properties": {
              "business_to_business_volume_percentage": {
                "type": "integer",
                "description": "The percentage of the merchant's volume that's business to business (between 0 and 100)."
              },
              "business_to_consumer_volume_percentage": {
                "type": "integer",
                "description": "The percentage of the merchant's volume that's business to consumer (between 0 and 100)."
              },
              "consumer_to_consumer_volume_percentage": {
                "type": "integer",
                "description": "Merchant's percentage of volume that is consumer to consumer (between 0 and 100)."
              },
              "other_volume_percentage": {
                "type": "integer",
                "description": "The percentage of the merchant's volume that isn't represented by the previous fields (between 0 and 100)."
              },
              "person_to_person_volume_percentage": {
                "type": "integer",
                "description": "The percentage the merchant's volume that's person to person (between 0 and 100)."
              }
            }
          }
        }
      },
      "statement_descriptor": {
        "type": "string",
        "maxLength": 20,
        "nullable": true,
        "description": "The description of the `Merchant` that appears on the buyer's bank or card statement."
      },
      "country": {
        "type": "string",
        "enum": [
          "ABW",
          "AFG",
          "AGO",
          "AIA",
          "ALA",
          "ALB",
          "AND",
          "ARE",
          "ARG",
          "ARM",
          "ASM",
          "ATA",
          "ATF",
          "ATG",
          "AUS",
          "AUT",
          "AZE",
          "BDI",
          "BEL",
          "BEN",
          "BES",
          "BFA",
          "BGD",
          "BGR",
          "BHR",
          "BHS",
          "BIH",
          "BLM",
          "BLR",
          "BLZ",
          "BMU",
          "BOL",
          "BRA",
          "BRB",
          "BRN",
          "BTN",
          "BVT",
          "BWA",
          "CAF",
          "CAN",
          "CCK",
          "CHE",
          "CHL",
          "CHN",
          "CIV",
          "CMR",
          "COD",
          "COG",
          "COK",
          "COL",
          "COM",
          "CPV",
          "CRI",
          "CUB",
          "CUW",
          "CXR",
          "CYM",
          "CYP",
          "CZE",
          "DEU",
          "DJI",
          "DMA",
          "DNK",
          "DOM",
          "DZA",
          "ECU",
          "EGY",
          "ERI",
          "ESH",
          "ESP",
          "EST",
          "ETH",
          "FIN",
          "FJI",
          "FLK",
          "FRA",
          "FRO",
          "FSM",
          "GAB",
          "GBR",
          "GEO",
          "GGY",
          "GHA",
          "GIB",
          "GIN",
          "GLP",
          "GMB",
          "GNB",
          "GNQ",
          "GRC",
          "GRD",
          "GRL",
          "GTM",
          "GUF",
          "GUM",
          "GUY",
          "HKG",
          "HMD",
          "HND",
          "HRV",
          "HTI",
          "HUN",
          "IDN",
          "IMN",
          "IND",
          "IOT",
          "IRL",
          "IRN",
          "IRQ",
          "ISL",
          "ISR",
          "ITA",
          "JAM",
          "JEY",
          "JOR",
          "JPN",
          "KAZ",
          "KEN",
          "KGZ",
          "KHM",
          "KIR",
          "KNA",
          "KOR",
          "KWT",
          "LAO",
          "LBN",
          "LBR",
          "LBY",
          "LCA",
          "LIE",
          "LKA",
          "LSO",
          "LTU",
          "LUX",
          "LVA",
          "MAC",
          "MAF",
          "MAR",
          "MCO",
          "MDA",
          "MDG",
          "MDV",
          "MEX",
          "MHL",
          "MKD",
          "MLI",
          "MLT",
          "MMR",
          "MNE",
          "MNG",
          "MNP",
          "MRT",
          "MSR",
          "MTQ",
          "MUS",
          "MWI",
          "MYS",
          "MYT",
          "NAM",
          "NCL",
          "NER",
          "NFK",
          "NGA",
          "NIC",
          "NIU",
          "NLD",
          "NOR",
          "NPL",
          "NRU",
          "NZL",
          "OMN",
          "PAK",
          "PAN",
          "PCN",
          "PER",
          "PHL",
          "PLW",
          "PNG",
          "POL",
          "PRI",
          "PRK",
          "PRT",
          "PRY",
          "PSE",
          "PYF",
          "QAT",
          "REU",
          "ROU",
          "RUS",
          "RWA",
          "SAU",
          "SDN",
          "SEN",
          "SGP",
          "SGS",
          "SHN",
          "SJM",
          "SLB",
          "SLE",
          "SLV",
          "SMR",
          "SOM",
          "SPM",
          "SRB",
          "SSD",
          "STP",
          "SUR",
          "SVK",
          "SVN",
          "SWE",
          "SWZ",
          "SXM",
          "SYC",
          "SYR",
          "TCA",
          "TCD",
          "TGO",
          "THA",
          "TJK",
          "TKL",
          "TKM",
          "TLS",
          "TON",
          "TTO",
          "TUN",
          "TUR",
          "TUV",
          "TWN",
          "TZA",
          "UGA",
          "UKR",
          "UMI",
          "URY",
          "USA",
          "UZB",
          "VAT",
          "VCT",
          "VEN",
          "VGB",
          "VIR",
          "VNM",
          "VUT",
          "WLF",
          "WSM",
          "XKX",
          "YEM",
          "ZAF",
          "ZMB",
          "ZWE"
        ],
        "nullable": true
      },
      "entity": {
        "type": "object",
        "properties": {
          "amex_mid": {
            "type": "integer",
            "description": "Assigned amexMid value. If a value is passed, it must be 10 or 11 digits.",
            "nullable": true
          },
          "annual_card_volume": {
            "type": "integer",
            "description": "The annual credit card sales (in cents) expected to be processed by this merchant (max 19 characters).",
            "nullable": true
          },
          "business_address": {
            "type": "object",
            "description": "The primary address for the legal entity.",
            "nullable": true,
            "properties": {
              "line1": {
                "type": "string",
                "minLength": 1,
                "description": "First line of the address (max 35 characters).",
                "nullable": true
              },
              "line2": {
                "type": "string",
                "minLength": 1,
                "description": "Second line of the address (max 35 characters).",
                "nullable": true
              },
              "city": {
                "type": "string",
                "minLength": 1,
                "description": "City (max 20 characters).",
                "nullable": true
              },
              "region": {
                "type": "string",
                "minLength": 1,
                "description": "2-letter state code.",
                "nullable": true
              },
              "postal_code": {
                "type": "string",
                "minLength": 1,
                "description": "Zip or Postal code (max 7 characters).",
                "nullable": true
              },
              "country": {
                "type": "string",
                "minLength": 1,
                "description": "3-Letter Country code (e.g. USA).",
                "nullable": true
              }
            }
          },
          "business_name": {
            "type": "string",
            "minLength": 1,
            "description": "The merchant's legal business name (max 120 characters).<ul><li>If <code>INDIVIDUAL_SOLE_PROPRIETORSHIP</code>, pass the owner's legal first name, last name, and middle initial.</li></ul>",
            "nullable": true
          },
          "business_phone": {
            "type": "string",
            "minLength": 1,
            "description": "Customer service phone number where the merchant can be reached (max 10 characters).",
            "nullable": true
          },
          "business_tax_id": {
            "type": "string",
            "description": "**US-based Merchants**:\n\nNine-digit Tax Identification Number (TIN) or Employer Identification Number (EIN). If the `business_type` is `INDIVIDUAL_SOLE_PROPRIETORSHIP` and they do not have an EIN, use the sole proprietor's Social Security Number (SSN).\n\n**Canada-based Merchants**:\n\nNine-digit Business Number (BN) issued by the Canada Revenue Agency (CRA) for business tax purposes. If the business_type is INDIVIDUAL_SOLE_PROPRIETORSHIP and they do not have a Business Number, use the sole proprietor’s Social Insurance Number (SIN).\n"
          },
          "business_tax_id_fingerprint": {
            "type": "string",
            "description": "A unique fingerprint for the `business_tax_id`.",
            "nullable": true
          },
          "business_tax_id_provided": {
            "type": "boolean",
            "description": "Whether the `business_tax_id` has been provided."
          },
          "business_type": {
            "description": "Include the value that best applies to the merchant.",
            "type": "string",
            "enum": [
              "INDIVIDUAL_SOLE_PROPRIETORSHIP",
              "CORPORATION",
              "LIMITED_LIABILITY_COMPANY",
              "PARTNERSHIP",
              "LIMITED_PARTNERSHIP",
              "GENERAL_PARTNERSHIP",
              "ASSOCIATION_ESTATE_TRUST",
              "TAX_EXEMPT_ORGANIZATION",
              "GOVERNMENT_AGENCY"
            ],
            "nullable": true
          },
          "default_statement_descriptor": {
            "$ref": "#/components/schemas/statement_descriptor"
          },
          "discover_mid": {
            "description": "Assigned discoverMid value.",
            "type": "integer",
            "nullable": true
          },
          "dob": {
            "type": "object",
            "description": "The control owner's date of birth.",
            "nullable": true,
            "properties": {
              "day": {
                "type": "integer",
                "description": "Day of birth (between 1 and 31).",
                "minimum": 1
              },
              "month": {
                "type": "integer",
                "description": "Month of birth (between 1 and 12).",
                "minimum": 1
              },
              "year": {
                "type": "integer",
                "description": "Year of birth (4-digit). Year must be greater than 1900.",
                "minimum": 1900
              }
            }
          },
          "doing_business_as": {
            "type": "string",
            "minLength": 1,
            "description": "Alternate names of the business. If there are no other names, pass the same value used for `business_name` (max 60 characters).",
            "nullable": true
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "description": "The email address of the entity or its control owner (max 100 characters).",
            "nullable": true
          },
          "first_name": {
            "type": "string",
            "minLength": 1,
            "description": "The legal first name of the entity or its control owner (max 20 characters).",
            "nullable": true
          },
          "has_accepted_credit_cards_previously": {
            "type": "boolean",
            "description": "Defaults to **false** if not passed."
          },
          "incorporation_date": {
            "type": "object",
            "description": "The date the company was founded and registered.",
            "nullable": true,
            "properties": {
              "day": {
                "type": "integer",
                "description": "Day business was incorporated (between 1 and 31)."
              },
              "month": {
                "type": "integer",
                "description": "Month business was incorporated (between 1 and 12)."
              },
              "year": {
                "type": "integer",
                "description": "Year business was incorporated (4-digit)."
              }
            }
          },
          "last_name": {
            "type": "string",
            "minLength": 1,
            "description": "The legal last name of the entity or its control owner (max 20 characters).",
            "nullable": true
          },
          "max_transaction_amount": {
            "type": "integer",
            "description": "The maximum amount (in cents) that can be charged for a single transaction (max 12 characters).",
            "nullable": true
          },
          "ach_max_transaction_amount": {
            "type": "integer",
            "description": "The maximum amount (in cents) that can be processed for a single ACH transaction (max 12 characters).",
            "nullable": true
          },
          "mcc": {
            "type": "string",
            "minLength": 1,
            "description": "The Merchant Category Code ([MCC](http://www.dm.usda.gov/procurement/card/card\\_x/mcc.pdf)) that this merchant will be classified under. For a list of approved MCCs, see [Approved Merchant Category Codes.](/guides/managing-operations/security-compliance/approved-merchant-category-codes)",
            "nullable": true
          },
          "ownership_type": {
            "type": "string",
            "minLength": 1,
            "description": "Values can be either: <ul><li><strong>PUBLIC</strong> to indicate a publicly-traded company.</li><li><strong>PRIVATE</strong> for privately-held businesses.</li></ul>",
            "enum": [
              "PUBLIC",
              "PRIVATE"
            ],
            "nullable": true
          },
          "personal_address": {
            "type": "object",
            "nullable": true,
            "description": "The personal address of the entity or its control owner.",
            "properties": {
              "line1": {
                "type": "string",
                "minLength": 1,
                "description": "First line of the address (max 35 characters).",
                "nullable": true
              },
              "line2": {
                "type": "string",
                "minLength": 1,
                "description": "Second line of the address (max 35 characters).",
                "nullable": true
              },
              "city": {
                "type": "string",
                "minLength": 1,
                "description": "City (max 20 characters).",
                "nullable": true
              },
              "region": {
                "type": "string",
                "minLength": 1,
                "description": "2-letter State code.",
                "nullable": true
              },
              "postal_code": {
                "type": "string",
                "minLength": 1,
                "description": "Zip or Postal code (max 7 characters).",
                "nullable": true
              },
              "country": {
                "$ref": "#/components/schemas/country"
              }
            },
            "required": [
              "city",
              "country",
              "line1",
              "postal_code",
              "region"
            ]
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "description": "The phone number of the entity or its control owner (max 10 characters).",
            "nullable": true
          },
          "principal_percentage_ownership": {
            "type": "integer",
            "description": "Percentage of the company owned by the principal control owner (min 0; max 100).",
            "nullable": true
          },
          "short_business_name": {
            "type": "string",
            "description": "Abbreviated names of the business. If there are no abbreviated name, leave this field blank.",
            "nullable": true
          },
          "tax_authority": {
            "type": "string",
            "description": "<ul><li>Only required when onboarding a merchant with a <code>MCC</code> of <code>9311</code>.</li><li>The <code>tax_authority</code> is the tax gathering entity (e.g., San Francisco Water Authority).</li></ul>",
            "nullable": true
          },
          "tax_id": {
            "type": "string",
            "description": "The control owner's Social Security Number (SSN) or an Individual Taxpayer Identification Number (ITIN). This is required for identity verification. It is not included in the response.",
            "nullable": true
          },
          "tax_id_fingerprint": {
            "type": "string",
            "description": "A unique fingerprint for the `tax_id`.",
            "nullable": true
          },
          "tax_id_provided": {
            "type": "boolean",
            "description": "Whether the `tax_id` has been provided."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "description": "The corporate title of the control owner (e.g. Chief Executive Officer, CFO, etc. Max 60 characters).",
            "nullable": true
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "description": "The URL of the merchant's public website.",
            "nullable": true
          }
        }
      },
      "identity_roles": {
        "type": "array",
        "description": "The set of roles available to the `Identity`. If none is provided, the Identity will be assigned `BUYER`.",
        "items": {
          "type": "string",
          "enum": [
            "APPLICATION_OWNER",
            "BENEFICIAL_OWNER",
            "BUYER",
            "PLATFORM_OWNER",
            "RECIPIENT",
            "SELLER",
            "SENDER"
          ]
        }
      },
      "tags": {
        "type": "object",
        "title": "tags",
        "additionalProperties": true,
        "description": "Include up to 50 `key: value` pairs to annotate requests with custom metadata.\n- Maximum character length for individual `keys` is 40.\n- Maximum character length for individual `values` is 500.\n(For example, `order_number: 25`, `item_type: produce`, `department: sales`)",
        "nullable": true
      },
      "self": {
        "type": "object",
        "description": "Link to the resource that was used in the request.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "verifications": {
        "type": "object",
        "description": "Link to the `Verification` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "merchants": {
        "type": "object",
        "description": "Link to the `Merchant` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "settlements": {
        "type": "object",
        "description": "Link to the `Settlement` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "authorizations": {
        "type": "object",
        "description": "Link to the `Authorization` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "transfers": {
        "type": "object",
        "description": "Link to the `Transfer` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "payment_instruments": {
        "type": "object",
        "description": "Link to the `Payment Instrume` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "associated_identities": {
        "type": "object",
        "description": "Link to any other `Identites` associated with the request.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "disputes": {
        "type": "object",
        "description": "Link to the `Dispute` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "application_link": {
        "type": "object",
        "description": "Link to the `Application` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "identity": {
        "title": "Identity",
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/id"
          },
          "created_at": {
            "$ref": "#/components/schemas/created_at"
          },
          "updated_at": {
            "$ref": "#/components/schemas/updated_at"
          },
          "additional_underwriting_data": {
            "$ref": "#/components/schemas/additional_underwriting_data"
          },
          "application": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the `Application` associated with the resource."
          },
          "entity": {
            "$ref": "#/components/schemas/entity"
          },
          "identity_roles": {
            "$ref": "#/components/schemas/identity_roles"
          },
          "type": {
            "type": "string",
            "description": "The `Identity` type.",
            "enum": [
              "PERSONAL",
              "BUSINESS"
            ]
          },
          "tags": {
            "$ref": "#/components/schemas/tags"
          },
          "_links": {
            "type": "object",
            "properties": {
              "self": {
                "$ref": "#/components/schemas/self"
              },
              "verifications": {
                "$ref": "#/components/schemas/verifications"
              },
              "merchants": {
                "$ref": "#/components/schemas/merchants"
              },
              "settlements": {
                "$ref": "#/components/schemas/settlements"
              },
              "authorizations": {
                "$ref": "#/components/schemas/authorizations"
              },
              "transfers": {
                "$ref": "#/components/schemas/transfers"
              },
              "payment_instruments": {
                "$ref": "#/components/schemas/payment_instruments"
              },
              "associated_identities": {
                "$ref": "#/components/schemas/associated_identities"
              },
              "disputes": {
                "$ref": "#/components/schemas/disputes"
              },
              "application": {
                "$ref": "#/components/schemas/application_link"
              }
            }
          }
        }
      }
    }
  }
}
```

## Step 2: Collect your buyer's payment details

### Install the Finix iOS SDK

The Finix iOS SDK is distributed with Swift Package Manager.

1. In Xcode, choose **File** → **Add Package Dependencies**.
2. Enter the package URL: `https://github.com/finix-payments/finix-paymentsheet-ios-sdk`.
3. Select **Up to Next Major Version** starting at `1.0.0`.


If you manage dependencies in a `Package.swift` file, add the package there instead.

```swift Package.swift
dependencies: [
    .package(url: "https://github.com/finix-payments/finix-paymentsheet-ios-sdk", from: "1.0.0"),
],
targets: [
    .target(
        name: "YourApp",
        dependencies: [
            .product(name: "FinixPaymentSheet", package: "finix-paymentsheet-ios-sdk"),
        ]
    ),
]
```

Then import the SDK in the files that use it. No bridging headers or additional configuration are required.

```swift
import FinixPaymentSheet
```

### Initialize the payment sheet

In the view controller that hosts your checkout, create a `FinixCredentials` with your Application ID and environment. Then create a `PaymentAction`, which presents the payment sheet and reports the result to its delegate.

```swift CheckoutViewController.swift
import UIKit
import FinixPaymentSheet

class CheckoutViewController: UIViewController {
    var paymentAction: PaymentAction!

    override func viewDidLoad() {
        super.viewDidLoad()

        let credentials = FinixCredentials(
            applicationId: "<APPLICATION_ID>",
            environment: .Sandbox // Use .Live for live payments.
        )

        paymentAction = PaymentAction(credentials: credentials, delegate: self)
    }
}
```

Application IDs are environment-specific. Your Application ID and the API key your back end uses must belong to the same environment. The Finix iOS SDK represents the Live environment as `.Live`.

Initializing `PaymentAction` makes no network calls. The first request happens when you present the payment sheet.

### Present the payment sheet

When the buyer taps your pay button, build a card sheet with `paymentSheet(style:)` and present it with `present(from:paymentSheet:animated:)`.

```swift CheckoutViewController.swift
func showPaymentSheet() {
    let sheet = paymentAction.paymentSheet(style: .complete)
    paymentAction.present(from: self, paymentSheet: sheet, animated: true)
}
```

The `style` controls which fields the buyer sees. `.complete` collects the buyer's name, card details, and full billing address, which you need for address verification. For the other styles, see [Form Styles](/ios/online/form-styles).

The sheet includes a card scanning option by default. To support it, add an `NSCameraUsageDescription` entry to your app's `Info.plist`. Without it, iOS denies camera access and the scanner doesn't work. For more information, see [Card Scanner](/ios/online/card-scanner).

```xml Info.plist
<key>NSCameraUsageDescription</key>
<string>Used to scan credit cards for faster entry.</string>
```

To change the sheet title, button label, or logo, pass a `Configuration` to `PaymentAction`. For more information, see [Configuration](/ios/online/configuration).

### Send the token to your back end

Conform to `PaymentActionDelegate` to receive the result. When the buyer submits the sheet, `didSucceed(paymentController:response:)` returns a `PaymentSheetResponse`. Its `tokenizedResponse.id` is a token with a `TK` prefix. Send the token to your back end.

```swift CheckoutViewController.swift
extension CheckoutViewController: PaymentActionDelegate {
    func didSucceed(paymentController: PaymentInputController, response: PaymentSheetResponse) {
        let token = response.tokenizedResponse.id
        sendTokenToBackend(token)
        dismiss(animated: true)
    }

    func didCancel(paymentController: PaymentInputController) {
        // The buyer closed the sheet without paying.
        dismiss(animated: true)
    }

    func didFail(paymentController: PaymentInputController, error: Error) {
        // Show an error and let the buyer try again.
        print("Tokenization failed: \(error.localizedDescription)")
        dismiss(animated: true)
    }

    func sendTokenToBackend(_ token: String) {
        var request = URLRequest(url: URL(string: "<YOUR_BACKEND_URL>/payments")!)
        request.httpMethod = "POST"
        request.setValue("application/json", forHTTPHeaderField: "Content-Type")
        request.httpBody = try? JSONSerialization.data(withJSONObject: ["token": token])

        URLSession.shared.dataTask(with: request) { data, response, error in
            // Show the payment result to the buyer.
        }.resume()
    }
}
```

The networking code is illustrative. Use your app's own networking layer and endpoint. For every field on the token, see [TokenizedResponse](/ios/online/token-response).

### Create a Payment Instrument

Exchange the token for a Payment Instrument, which represents the buyer's card. The request is the same as for a token from Finix.js. Include:

- `token` - The token ID your app sends to your back end.
- `type` - `TOKEN`.
- `identity` - The buyer's Identity ID from Step 1.


Tokens expire after 30 minutes
Create the Payment Instrument as soon as your back end receives the token. You can't use a token after it expires.

Example
```shell cURL
curl -i -X POST \
  -u '<username>:<password>' \
  https://finix.sandbox-payments-api.com/payment_instruments \
  -H 'Content-Type: application/json' \
  -d '{
    "identity": "IDjvxGeXBLKH1V9YnWm1CS4n",
    "token": "TKiMxe323RE5Dq3wLVtG8kSW",
    "type": "TOKEN"
  }'
```

API Definition
```json
{
  "$ref": "#/components/schemas/createPaymentInstrumentTokenCard",
  "components": {
    "schemas": {
      "tags": {
        "type": "object",
        "title": "tags",
        "additionalProperties": true,
        "description": "Include up to 50 `key: value` pairs to annotate requests with custom metadata.\n- Maximum character length for individual `keys` is 40.\n- Maximum character length for individual `values` is 500.\n(For example, `order_number: 25`, `item_type: produce`, `department: sales`)",
        "nullable": true
      },
      "createPaymentInstrumentTokenCard": {
        "title": "Payment Instrument - Token - Card",
        "type": "object",
        "properties": {
          "identity": {
            "type": "string",
            "description": "The ID of the `Identity` used to create the `Payment Instrument` resource."
          },
          "name": {
            "type": "string",
            "description": "The name of the bank account or card owner. This value can get truncated to comply with processor requirements."
          },
          "tags": {
            "$ref": "#/components/schemas/tags"
          },
          "token": {
            "type": "string",
            "description": "ID of the `Token` that was returned from the tokenization client or hosted fields"
          },
          "type": {
            "type": "string",
            "enum": [
              "TOKEN"
            ],
            "description": "Type of `Payment Instrument`."
          }
        },
        "required": [
          "identity",
          "token",
          "type"
        ]
      }
    }
  }
}
```

The response returns the Payment Instrument. Save the `id` to charge the card in the next step, and to charge it again later without asking the buyer to re-enter their details.

Example
Payment Instrument - Card
```json Payment Instrument - Card
{
  "id": "PImmCg3Po7oNi7jaZcXhfkEu",
  "created_at": "2022-10-10T05:32:17.78Z",
  "updated_at": "2022-10-10T05:32:17.78Z",
  "account_updater_enabled": false,
  "application": "APt9MknRZxiDMkeReFPMdr7R",
  "created_via": "API",
  "currency": "USD",
  "enabled": true,
  "fingerprint": "FPRiCenDk2SoRng7WjQTr7RJY",
  "identity": "IDjvxGeXBLKH1V9YnWm1CS4n",
  "instrument_type": "PAYMENT_CARD",
  "address": {
    "line1": "900 Metro Center Blv",
    "line2": null,
    "city": "San Francisco",
    "region": "CA",
    "postal_code": "94404",
    "country": "USA"
  },
  "address_verification": "UNKNOWN",
  "bin": "520082",
  "brand": "MASTERCARD",
  "card_type": "DEBIT",
  "expiration_month": 12,
  "expiration_year": 2029,
  "issuer_country": "USA",
  "last_four": "8210",
  "name": "Amy White",
  "network_token_enabled": false,
  "network_token_state": "NOT_ENABLED",
  "security_code_verification": "UNKNOWN",
  "tags": {
    "card_name": "Business Card"
  },
  "type": "PAYMENT_CARD",
  "_links": {
    "self": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PImmCg3Po7oNi7jaZcXhfkEu"
    },
    "authorizations": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PImmCg3Po7oNi7jaZcXhfkEu/authorizations"
    },
    "transfers": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PImmCg3Po7oNi7jaZcXhfkEu/transfers"
    },
    "verifications": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PImmCg3Po7oNi7jaZcXhfkEu/verifications"
    },
    "application": {
      "href": "https://finix.sandbox-payments-api.com/applications/APt9MknRZxiDMkeReFPMdr7R"
    },
    "identity": {
      "href": "https://finix.sandbox-payments-api.com/identities/IDjvxGeXBLKH1V9YnWm1CS4n"
    },
    "updates": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PImmCg3Po7oNi7jaZcXhfkEu/updates"
    }
  }
}
```

API Definition
```json
{
  "$ref": "#/components/schemas/payment_instrument_card",
  "components": {
    "schemas": {
      "id": {
        "type": "string",
        "minLength": 1,
        "description": "The ID of the resource."
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "Timestamp of when the object was created."
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "description": "Timestamp of when the object was last updated."
      },
      "created_via": {
        "type": "string",
        "description": "The method by which the resource was created.",
        "enum": [
          "API",
          "ACCOUNT_UPDATER",
          "SETTLEMENT_REPORT",
          "SYSTEM",
          "TOKEN_IMPORT"
        ]
      },
      "account_updater_enabled_card": {
        "type": "boolean",
        "description": "When enabled, Finix automatically checks for updates with card networks. This Account Updater functionality:\n\n- Automatically updates card details (e.g., number or expiration date) to maintain continuity of charges, increasing authorization rates.\n- Saves the cardholder the hassle of updating card details across `Merchants` for each of their `Subscriptions`.\n\n**Note**: Cards created before the feature is enabled are unaffected by default. To include these cards, you can manually enable the Account Updater functionality for each card individually using a PUT request. Once enabled, you can link the card to this API call to trigger updates with card networks.\n",
        "default": false
      },
      "country": {
        "type": "string",
        "enum": [
          "ABW",
          "AFG",
          "AGO",
          "AIA",
          "ALA",
          "ALB",
          "AND",
          "ARE",
          "ARG",
          "ARM",
          "ASM",
          "ATA",
          "ATF",
          "ATG",
          "AUS",
          "AUT",
          "AZE",
          "BDI",
          "BEL",
          "BEN",
          "BES",
          "BFA",
          "BGD",
          "BGR",
          "BHR",
          "BHS",
          "BIH",
          "BLM",
          "BLR",
          "BLZ",
          "BMU",
          "BOL",
          "BRA",
          "BRB",
          "BRN",
          "BTN",
          "BVT",
          "BWA",
          "CAF",
          "CAN",
          "CCK",
          "CHE",
          "CHL",
          "CHN",
          "CIV",
          "CMR",
          "COD",
          "COG",
          "COK",
          "COL",
          "COM",
          "CPV",
          "CRI",
          "CUB",
          "CUW",
          "CXR",
          "CYM",
          "CYP",
          "CZE",
          "DEU",
          "DJI",
          "DMA",
          "DNK",
          "DOM",
          "DZA",
          "ECU",
          "EGY",
          "ERI",
          "ESH",
          "ESP",
          "EST",
          "ETH",
          "FIN",
          "FJI",
          "FLK",
          "FRA",
          "FRO",
          "FSM",
          "GAB",
          "GBR",
          "GEO",
          "GGY",
          "GHA",
          "GIB",
          "GIN",
          "GLP",
          "GMB",
          "GNB",
          "GNQ",
          "GRC",
          "GRD",
          "GRL",
          "GTM",
          "GUF",
          "GUM",
          "GUY",
          "HKG",
          "HMD",
          "HND",
          "HRV",
          "HTI",
          "HUN",
          "IDN",
          "IMN",
          "IND",
          "IOT",
          "IRL",
          "IRN",
          "IRQ",
          "ISL",
          "ISR",
          "ITA",
          "JAM",
          "JEY",
          "JOR",
          "JPN",
          "KAZ",
          "KEN",
          "KGZ",
          "KHM",
          "KIR",
          "KNA",
          "KOR",
          "KWT",
          "LAO",
          "LBN",
          "LBR",
          "LBY",
          "LCA",
          "LIE",
          "LKA",
          "LSO",
          "LTU",
          "LUX",
          "LVA",
          "MAC",
          "MAF",
          "MAR",
          "MCO",
          "MDA",
          "MDG",
          "MDV",
          "MEX",
          "MHL",
          "MKD",
          "MLI",
          "MLT",
          "MMR",
          "MNE",
          "MNG",
          "MNP",
          "MRT",
          "MSR",
          "MTQ",
          "MUS",
          "MWI",
          "MYS",
          "MYT",
          "NAM",
          "NCL",
          "NER",
          "NFK",
          "NGA",
          "NIC",
          "NIU",
          "NLD",
          "NOR",
          "NPL",
          "NRU",
          "NZL",
          "OMN",
          "PAK",
          "PAN",
          "PCN",
          "PER",
          "PHL",
          "PLW",
          "PNG",
          "POL",
          "PRI",
          "PRK",
          "PRT",
          "PRY",
          "PSE",
          "PYF",
          "QAT",
          "REU",
          "ROU",
          "RUS",
          "RWA",
          "SAU",
          "SDN",
          "SEN",
          "SGP",
          "SGS",
          "SHN",
          "SJM",
          "SLB",
          "SLE",
          "SLV",
          "SMR",
          "SOM",
          "SPM",
          "SRB",
          "SSD",
          "STP",
          "SUR",
          "SVK",
          "SVN",
          "SWE",
          "SWZ",
          "SXM",
          "SYC",
          "SYR",
          "TCA",
          "TCD",
          "TGO",
          "THA",
          "TJK",
          "TKL",
          "TKM",
          "TLS",
          "TON",
          "TTO",
          "TUN",
          "TUR",
          "TUV",
          "TWN",
          "TZA",
          "UGA",
          "UKR",
          "UMI",
          "URY",
          "USA",
          "UZB",
          "VAT",
          "VCT",
          "VEN",
          "VGB",
          "VIR",
          "VNM",
          "VUT",
          "WLF",
          "WSM",
          "XKX",
          "YEM",
          "ZAF",
          "ZMB",
          "ZWE"
        ],
        "nullable": true
      },
      "address": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "minLength": 1,
            "description": "First line of the address (max 35 characters).",
            "nullable": true
          },
          "line2": {
            "type": "string",
            "minLength": 1,
            "description": "Second line of the address (max 35 characters).",
            "nullable": true
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "description": "City (max 20 characters).",
            "nullable": true
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "2-letter State code.",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "minLength": 1,
            "description": "Zip or Postal code (max 7 characters).",
            "nullable": true
          },
          "country": {
            "$ref": "#/components/schemas/country"
          }
        },
        "required": [
          "city",
          "country",
          "line1",
          "postal_code",
          "region"
        ]
      },
      "application_id": {
        "type": "string",
        "minLength": 1,
        "description": "ID of the `Application` the resource was created under."
      },
      "currency": {
        "type": "string",
        "description": "ISO 4217 3-letter currency code.",
        "enum": [
          "CAD",
          "USD"
        ]
      },
      "identity_id": {
        "type": "string",
        "description": "The ID of the `Identity` used to create the resource."
      },
      "network_token_enabled_card": {
        "type": "boolean",
        "description": "When enabled, a \"network token\" replaces raw card details (e.g., the 16-digit PAN and expiration date) for transactions. Network tokens have several benefits:\n\n- The token offers increased authorization rates, even for lost or stolen cards, as it remains valid while the physical card is replaced.\n- Visa reduces interchange fees when using network tokens.\n- Tokens enhance security by replacing card details with a non-sensitive string that is usable only within the Finix system.\n\n**Note**: Cards created before the feature is enabled are unaffected. To include them, update the individual `Payment Instrument` to set `network_token_enabled` to `true`.\n",
        "default": false
      },
      "name_verification_results": {
        "type": "object",
        "nullable": true,
        "properties": {
          "first_name_verification": {
            "type": "string",
            "enum": [
              "MATCH",
              "MATCHED",
              "NO_MATCH",
              "NOT_SUPPORTED",
              "PARTIAL_MATCH",
              "UNKNOWN"
            ],
            "description": "The result of verifying the cardholder's first name."
          },
          "last_name_verification": {
            "type": "string",
            "enum": [
              "MATCH",
              "MATCHED",
              "NO_MATCH",
              "NOT_SUPPORTED",
              "PARTIAL_MATCH",
              "UNKNOWN"
            ],
            "description": "The result of verifying the cardholder's last name."
          },
          "middle_name_verification": {
            "type": "string",
            "enum": [
              "MATCH",
              "MATCHED",
              "NO_MATCH",
              "NOT_SUPPORTED",
              "PARTIAL_MATCH",
              "UNKNOWN"
            ],
            "description": "The result of verifying the cardholder's middle name."
          },
          "name_verification": {
            "type": "string",
            "enum": [
              "MATCH",
              "MATCHED",
              "NO_MATCH",
              "NOT_SUPPORTED",
              "PARTIAL_MATCH",
              "UNKNOWN"
            ],
            "description": "The result of verifying the cardholder's full name."
          }
        }
      },
      "tags": {
        "type": "object",
        "title": "tags",
        "additionalProperties": true,
        "description": "Include up to 50 `key: value` pairs to annotate requests with custom metadata.\n- Maximum character length for individual `keys` is 40.\n- Maximum character length for individual `values` is 500.\n(For example, `order_number: 25`, `item_type: produce`, `department: sales`)",
        "nullable": true
      },
      "payment_instrument_card": {
        "type": "object",
        "title": "Payment Instrument - Card",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/id"
          },
          "created_at": {
            "$ref": "#/components/schemas/created_at"
          },
          "updated_at": {
            "$ref": "#/components/schemas/updated_at"
          },
          "created_via": {
            "$ref": "#/components/schemas/created_via"
          },
          "account_updater_enabled": {
            "$ref": "#/components/schemas/account_updater_enabled_card"
          },
          "address": {
            "description": "The address of the card owner. Including a postal or zip code when creating a `Payment Instrument` can lower the interchange on credit card transactions.",
            "allOf": [
              {
                "$ref": "#/components/schemas/address"
              }
            ]
          },
          "address_verification": {
            "type": "string",
            "enum": [
              "POSTAL_CODE_AND_STREET_MATCH",
              "STREET_MATCH",
              "POSTAL_CODE_MATCH",
              "NO_ADDRESS",
              "NO_MATCH",
              "NOT_SUPPORTED",
              "UNKNOWN"
            ],
            "description": "- Details the results of verifying `address` with the issuing bank.\n- Set to **UNKNOWN** when `address` gets updated."
          },
          "application": {
            "$ref": "#/components/schemas/application_id"
          },
          "bin": {
            "type": "string",
            "description": "Bank Identification number for the `Payment Instrument`."
          },
          "brand": {
            "type": "string",
            "enum": [
              "UNKNOWN",
              "DINERS_CLUB_INTERNATIONAL",
              "DANKORT",
              "MIR",
              "TROY",
              "UATP",
              "CHINA_T_UNION",
              "CHINA_UNION_PAY",
              "AMERICAN_EXPRESS",
              "VERVE",
              "RUPAY",
              "DISCOVER",
              "JCB",
              "MASTERCARD",
              "INTERPAYMENT",
              "INSTAPAYMENT",
              "MAESTRO",
              "VISA",
              "LANKAPAY",
              "DINERS_CLUB",
              "INTERAC"
            ],
            "description": "The `brand` of the card saved in the `Payment Instrument`."
          },
          "card_type": {
            "type": "string",
            "enum": [
              "CREDIT",
              "DEBIT",
              "HSA_FSA",
              "NON_RELOADABLE_PREPAID",
              "RELOADABLE_PREPAID",
              "UNKNOWN"
            ],
            "description": "The type of payment card saved in the `Payment Instrument`."
          },
          "country": {
            "$ref": "#/components/schemas/country"
          },
          "currency": {
            "$ref": "#/components/schemas/currency"
          },
          "disabled_code": {
            "type": "string",
            "description": "A code indicating why the `Payment Instrument` was disabled. This field is set when:\n\n- The system automatically disables the `Payment Instrument`.\n- A user manually disables it (returns `USER_INITIATED`).\n\nSee `disabled_message` for all possible codes and their descriptions.\n",
            "enum": [
              "CARD_ACCOUNT_CLOSED",
              "INVALID_ACCOUNT_NUMBER",
              "LOST_OR_STOLEN_CARD",
              "NON_RELOADABLE_INSUFFICIENT_FUNDS",
              "PICK_UP_CARD",
              "RESTRICTED_CARD",
              "USER_INITIATED"
            ],
            "nullable": true
          },
          "disabled_message": {
            "type": "string",
            "description": "A human-readable message explaining why the `Payment Instrument` was disabled. This field provides additional context for the `disabled_code`.\n\nThe possible error codes/messages are:\n- `CARD_ACCOUNT_CLOSED`: \"The card account has been closed. The card has been disabled to prevent further use.\"\n- `INVALID_ACCOUNT_NUMBER`: \"The card number is not valid. The card has been disabled to prevent further use.\"\n- `LOST_OR_STOLEN_CARD`: \"The card is reported lost or stolen. The card has been disabled to prevent further use.\"\n- `NON_RELOADABLE_INSUFFICIENT_FUNDS`: \"The card has insufficient funds for the transaction and is non-reloadable. The card has been disabled to prevent further use.\"\n- `PICK_UP_CARD`: \"The card is reported lost or stolen. The card has been disabled to prevent further use.\"\n- `RESTRICTED_CARD`: \"The card has a restriction preventing approval for this transaction. The card has been disabled to prevent further use.\"\n- `USER_INITIATED`: \"The card has been disabled by a user.\"\n",
            "nullable": true
          },
          "enabled": {
            "type": "boolean",
            "description": "Indicates whether the `Payment Instrument` resource is enabled. The default value is `true`; set it to `false` to disable the `Payment Instrument`. The user or the system can update this field to enable or disable the payment instrument."
          },
          "expiration_month": {
            "type": "integer",
            "maximum": 12,
            "minimum": 1,
            "description": "Expiration month (e.g. 12 for December)."
          },
          "expiration_year": {
            "type": "integer",
            "minimum": 1,
            "description": "4-digit expiration year."
          },
          "fast_funds_indicator": {
            "type": "string",
            "description": "Details if Fast Funds is enabled for the card."
          },
          "fingerprint": {
            "type": "string",
            "example": "FPRxxxxxxxxxxxxxxxxx",
            "description": "Unique ID that represents the tokenized card data."
          },
          "identity": {
            "$ref": "#/components/schemas/identity_id"
          },
          "instrument_type": {
            "type": "string",
            "enum": [
              "APPLE_PAY",
              "GOOGLE_PAY",
              "PAYMENT_CARD",
              "PAYMENT_CARD_PRESENT",
              "TOKEN"
            ],
            "description": "The type of `Payment Instrument`."
          },
          "issuer_country": {
            "type": "string",
            "description": "The Alpha-3 Code of the country the card was issued in.\n\nIn addition, the following values are possible:\n\n- `NON_USA` - The card was issued outside of the United States.\n- `UNKNOWN` - The processor did not return an issuer country for this particular BIN.\n",
            "enum": [
              "ABW",
              "AFG",
              "AGO",
              "AIA",
              "ALA",
              "ALB",
              "AND",
              "ARE",
              "ARG",
              "ARM",
              "ASM",
              "ATA",
              "ATF",
              "ATG",
              "AUS",
              "AUT",
              "AZE",
              "BDI",
              "BEL",
              "BEN",
              "BES",
              "BFA",
              "BGD",
              "BGR",
              "BHR",
              "BHS",
              "BIH",
              "BLM",
              "BLR",
              "BLZ",
              "BMU",
              "BOL",
              "BRA",
              "BRB",
              "BRN",
              "BTN",
              "BVT",
              "BWA",
              "CAF",
              "CAN",
              "CCK",
              "CHE",
              "CHL",
              "CHN",
              "CIV",
              "CMR",
              "COD",
              "COG",
              "COK",
              "COL",
              "COM",
              "CPV",
              "CRI",
              "CUB",
              "CUW",
              "CXR",
              "CYM",
              "CYP",
              "CZE",
              "DEU",
              "DJI",
              "DMA",
              "DNK",
              "DOM",
              "DZA",
              "ECU",
              "EGY",
              "ERI",
              "ESH",
              "ESP",
              "EST",
              "ETH",
              "FIN",
              "FJI",
              "FLK",
              "FRA",
              "FRO",
              "FSM",
              "GAB",
              "GBR",
              "GEO",
              "GGY",
              "GHA",
              "GIB",
              "GIN",
              "GLP",
              "GMB",
              "GNB",
              "GNQ",
              "GRC",
              "GRD",
              "GRL",
              "GTM",
              "GUF",
              "GUM",
              "GUY",
              "HKG",
              "HMD",
              "HND",
              "HRV",
              "HTI",
              "HUN",
              "IDN",
              "IMN",
              "IND",
              "IOT",
              "IRL",
              "IRN",
              "IRQ",
              "ISL",
              "ISR",
              "ITA",
              "JAM",
              "JEY",
              "JOR",
              "JPN",
              "KAZ",
              "KEN",
              "KGZ",
              "KHM",
              "KIR",
              "KNA",
              "KOR",
              "KWT",
              "LAO",
              "LBN",
              "LBR",
              "LBY",
              "LCA",
              "LIE",
              "LKA",
              "LSO",
              "LTU",
              "LUX",
              "LVA",
              "MAC",
              "MAF",
              "MAR",
              "MCO",
              "MDA",
              "MDG",
              "MDV",
              "MEX",
              "MHL",
              "MKD",
              "MLI",
              "MLT",
              "MMR",
              "MNE",
              "MNG",
              "MNP",
              "MOZ",
              "MRT",
              "MSR",
              "MTQ",
              "MUS",
              "MWI",
              "MYS",
              "MYT",
              "NAM",
              "NCL",
              "NER",
              "NFK",
              "NGA",
              "NIC",
              "NIU",
              "NLD",
              "NON_USA",
              "NOR",
              "NPL",
              "NRU",
              "NZL",
              "OMN",
              "PAK",
              "PAN",
              "PCN",
              "PER",
              "PHL",
              "PLW",
              "PNG",
              "POL",
              "PRI",
              "PRK",
              "PRT",
              "PRY",
              "PSE",
              "PYF",
              "QAT",
              "REU",
              "ROU",
              "RUS",
              "RWA",
              "SAU",
              "SDN",
              "SEN",
              "SGP",
              "SGS",
              "SHN",
              "SJM",
              "SLB",
              "SLE",
              "SLV",
              "SMR",
              "SOM",
              "SPM",
              "SRB",
              "SSD",
              "STP",
              "SUR",
              "SVK",
              "SVN",
              "SWE",
              "SWZ",
              "SXM",
              "SYC",
              "SYR",
              "TCA",
              "TCD",
              "TGO",
              "THA",
              "TJK",
              "TKL",
              "TKM",
              "TLS",
              "TON",
              "TTO",
              "TUN",
              "TUR",
              "TUV",
              "TWN",
              "TZA",
              "UGA",
              "UKR",
              "UMI",
              "UNKNOWN",
              "URY",
              "USA",
              "UZB",
              "VAT",
              "VCT",
              "VEN",
              "VGB",
              "VIR",
              "VNM",
              "VUT",
              "WLF",
              "WSM",
              "YEM",
              "ZAF",
              "ZMB",
              "ZWE"
            ]
          },
          "last_four": {
            "type": "string",
            "description": "Last four digits of the card."
          },
          "name": {
            "type": "string",
            "description": "The name of the card owner.",
            "nullable": true
          },
          "network_token_enabled": {
            "$ref": "#/components/schemas/network_token_enabled_card"
          },
          "network_token_state": {
            "type": "string",
            "description": "The state of the network token. The possible enum values are as follows:\n\n- `NOT_ENABLED`: The `network_token_state` is `NOT_ENABLED` when the value of `network_token_enabled` on the `Payment Instrument` is `false`.\n- `PENDING`: Immediately after Finix enables network tokens for a specific card, `network_token_state` is initially set to `PENDING`.\n- `ACTIVE`: After Finix receives the network token successfully from the card network, `network_token_state` updates to `ACTIVE`.\n- `FAILED`: In the event that there is an issue with the card network such as service becomes unavailable, `FAILED` is returned.\n- `SUSPENDED`: When the issuing bank does not allow the network token to be used in transactions, `SUSPENDED` is returned.\n- `CLOSED`: In the event that the issuing bank has closed the card permanently, `CLOSED` is returned.\n",
            "enum": [
              "ACTIVE",
              "CLOSED",
              "ENABLED",
              "FAILED",
              "NOT_ENABLED",
              "SUSPENDED",
              "PENDING"
            ]
          },
          "payload_type": {
            "type": "string",
            "enum": [
              "SOURCE",
              "DESTINATION"
            ]
          },
          "online_gambing_block_indicator": {
            "type": "string",
            "description": "Indicates whether the card is blocked from online gambling transactions.",
            "nullable": true
          },
          "push_funds_block_indicator": {
            "type": "string",
            "description": "Details if the card is enabled to receive push-to-card disbursements."
          },
          "name_verification_results": {
            "description": "Details the results of verifying the cardholder's name with the issuing bank. Returns `null` if `name_verification_details` was not included in the request.",
            "allOf": [
              {
                "$ref": "#/components/schemas/name_verification_results"
              }
            ]
          },
          "security_code_verification": {
            "type": "string",
            "enum": [
              "MATCHED",
              "UNKNOWN",
              "UNMATCHED"
            ],
            "description": "Details the results of the Card Verification Code check."
          },
          "tags": {
            "$ref": "#/components/schemas/tags"
          },
          "third_party": {
            "type": "string",
            "description": "This field is not applicable to payment cards.",
            "nullable": true
          },
          "third_party_token": {
            "type": "string",
            "description": "This field is not applicable to payment cards.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "enum": [
              "PAYMENT_CARD",
              "TOKEN",
              "GOOGLE_PAY",
              "APPLE_PAY"
            ],
            "description": "Type of `Payment Instrument`."
          },
          "_links": {
            "type": "object",
            "description": "For your convenience, every response includes several URLs which link to resources relevant to the request. You can use these `_links` to make your follow-up requests and quickly access relevant IDs.",
            "properties": {
              "application": {
                "type": "object",
                "description": "Link to the `Application` the request was made under.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "authorizations": {
                "type": "object",
                "description": "Link to the `Authorizations` created under the resource.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "identity": {
                "type": "object",
                "description": "Link to the `Identity` the request was made under.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "self": {
                "type": "object",
                "description": "Link to the resource that was used in the request.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "transfers": {
                "type": "object",
                "description": "Link to the `Transfers` created under the resource.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "updates": {
                "type": "object",
                "description": "Link to the `Updates` created under the resource.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "verifications": {
                "type": "object",
                "description": "Link to the `Verification` that was used to verify the `Merchant` that the request was made under.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

## Step 3: Make a sale

### Create a Transfer

Create a Transfer to charge the buyer. Include:

- `amount` - The payment total in cents. For example, `10000` charges $100.00.
- `currency` - `USD` or `CAD`.
- `merchant` - Your Merchant ID.
- `source` - The Payment Instrument ID from Step 2.


If you're a platform, each of your sellers has their own Merchant ID. For more information, see [Onboarding Sellers](/guides/platform-payments/onboarding-sellers).

Example
```shell cURL
curl -i -X POST \
  -u '<username>:<password>' \
  https://finix.sandbox-payments-api.com/transfers \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 10000,
    "currency": "USD",
    "merchant": "MUfUoWEk3MBJ9m5cCnggfKMf",
    "source": "PIjkxmtZreJ3TTGE3BciARnf"
  }'
```

API Definition
```json
{
  "$ref": "#/components/schemas/createTransferMinimalFields",
  "components": {
    "schemas": {
      "amount": {
        "type": "integer",
        "description": "The total amount that will be debited in cents (e.g. 100 cents to debit $1.00).",
        "example": 5000,
        "format": "int64"
      },
      "currency": {
        "type": "string",
        "description": "ISO 4217 3-letter currency code.",
        "enum": [
          "CAD",
          "USD"
        ]
      },
      "source": {
        "type": "string",
        "example": "PIxxxxxxxxxxxxxxxxxx",
        "description": "ID of the `Payment Instrument` where funds get debited."
      },
      "createTransferMinimalFields": {
        "title": "Transfer - Minimal Fields",
        "type": "object",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/amount"
          },
          "currency": {
            "$ref": "#/components/schemas/currency"
          },
          "merchant": {
            "type": "string",
            "description": "The ID of the `Merchant` under which to create the `Transfer`."
          },
          "source": {
            "$ref": "#/components/schemas/source"
          }
        },
        "required": [
          "amount",
          "currency",
          "merchant",
          "source"
        ]
      }
    }
  }
}
```

A successful payment returns `201 Created` with a Transfer where:

- `state` is `SUCCEEDED`.
- `type` is `DEBIT`.


Example
Transfer
```json Transfer
{
  "id": "TRsGLKwasMwBgpxVM4xiDHXr",
  "created_at": "2026-11-28T00:29:59.77Z",
  "updated_at": "2026-11-28T00:29:59.77Z",
  "3d_secure_session": null,
  "additional_buyer_charges": null,
  "additional_healthcare_data": null,
  "additional_lodging_data": null,
  "additional_motor_vehicle_rental_data": null,
  "additional_purchase_data": null,
  "address_verification": "POSTAL_CODE_AND_STREET_MATCH",
  "amount": 10000,
  "amount_requested": 10000,
  "application": "APt9MknRZxiDMkeReFPMdr7R",
  "created_via": "UNKNOWN",
  "currency": "USD",
  "destination": null,
  "externally_funded": "UNKNOWN",
  "failure_code": null,
  "failure_message": null,
  "fee": 0,
  "fee_profile": "FPmtT4MYmiAs1qjLjneQmk4d",
  "idempotency_id": null,
  "ip_address_details": null,
  "merchant": "MUfUoWEk3MBJ9m5cCnggfKMf",
  "merchant_identity": "ID6TZEVtE3TGH9ZDwb8iUhsE",
  "messages": [],
  "network_details": {
    "brand": "VISA",
    "authorization_code": "271371",
    "acquirer_reference_number": null
  },
  "operation_key": "CARD_NOT_PRESENT_SALE",
  "parent_transfer": null,
  "parent_transfer_trace_id": null,
  "processed_at": "2026-11-28T00:30:00.13Z",
  "raw": null,
  "ready_to_settle_at": "2026-11-29T00:29:59.77Z",
  "receipt_last_printed_at": null,
  "security_code_verification": "MATCHED",
  "source": "PIjkxmtZreJ3TTGE3BciARnf",
  "split_transfers": [],
  "state": "SUCCEEDED", // [!code highlight]
  "statement_descriptor": "FLX*FINIX FLOWERS",
  "subtype": "API",
  "supplemental_fee": null,
  "tags": {},
  "third_party_details": null,
  "tip_amount": null,
  "trace_id": "e82da656-89a0-4d26-b2f4-e9480883d541",
  "type": "DEBIT", // [!code highlight]
  "_links": {
    "application": {
      "href": "https://finix.sandbox-payments-api.com/applications/APt9MknRZxiDMkeReFPMdr7R"
    },
    "self": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TRsGLKwasMwBgpxVM4xiDHXr"
    },
    "merchant_identity": {
      "href": "https://finix.sandbox-payments-api.com/identities/ID6TZEVtE3TGH9ZDwb8iUhsE"
    },
    "payment_instruments": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TRsGLKwasMwBgpxVM4xiDHXr/payment_instruments"
    },
    "reversals": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TRsGLKwasMwBgpxVM4xiDHXr/reversals"
    },
    "fees": {
      "href": "https://finix.sandbox-payments-api.com/fees?linked_to=TRsGLKwasMwBgpxVM4xiDHXr"
    },
    "disputes": {
      "href": "https://finix.sandbox-payments-api.com/transfers/TRsGLKwasMwBgpxVM4xiDHXr/disputes"
    },
    "source": {
      "href": "https://finix.sandbox-payments-api.com/payment_instruments/PIjkxmtZreJ3TTGE3BciARnf"
    },
    "fee_profile": {
      "href": "https://finix.sandbox-payments-api.com/fee_profiles/FPmtT4MYmiAs1qjLjneQmk4d"
    }
  }
}
```

API Definition
```json
{
  "$ref": "#/components/schemas/transfer",
  "components": {
    "schemas": {
      "id": {
        "type": "string",
        "minLength": 1,
        "description": "The ID of the resource."
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "description": "Timestamp of when the object was created."
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "description": "Timestamp of when the object was last updated."
      },
      "additional_buyer_charges": {
        "type": "object",
        "description": "Additional charges will be incurred by the buyer.\n\nThe following rules apply:\n\n- The `Merchant` must be enabled to charge these surcharges by setting the appropriate flags for each applicable surcharge to `true` using the PUT `/merchants` endpoint.\n- Only _one_ of the following charges can be applied during creation.\n",
        "nullable": true,
        "properties": {
          "convenience_amount": {
            "type": "integer",
            "description": "A convenience fee to charge the buyer for the transaction. This object property is mutually exclusive.",
            "nullable": true
          },
          "rent_surcharge_amount": {
            "type": "integer",
            "description": "A rent surcharge to charge the buyer for the transaction. This object property is mutually exclusive.",
            "nullable": true
          },
          "surcharge_amount": {
            "type": "integer",
            "description": "A surcharge amount to charge the buyer for the transaction. This object property is mutually exclusive.",
            "nullable": true
          }
        }
      },
      "additional_healthcare_data": {
        "type": "object",
        "nullable": true,
        "properties": {
          "clinic_amount": {
            "type": "integer",
            "description": "A clinic or other qualified medical amount for the transaction.",
            "nullable": true
          },
          "dental_amount": {
            "type": "integer",
            "description": "The dental amount for the transaction.",
            "nullable": true
          },
          "prescription_amount": {
            "type": "integer",
            "description": "The prescription/RX amount for the transaction.",
            "nullable": true
          },
          "vision_amount": {
            "type": "integer",
            "description": "The vision/optical amount for the transaction.",
            "nullable": true
          }
        }
      },
      "additional_lodging_data": {
        "type": "object",
        "nullable": true,
        "description": "Contains lodging-specific fields for `Authorization` and `Transfer` requests. Optional for lodging MCC transactions (MCC 3501–3999, 7011). Returns `null` for all other transactions.",
        "properties": {
          "check_in_date": {
            "type": "object",
            "nullable": true,
            "description": "The guest's scheduled arrival date.",
            "properties": {
              "month": {
                "type": "integer",
                "description": "The month of the check-in date."
              },
              "day": {
                "type": "integer",
                "description": "The day of the check-in date."
              },
              "year": {
                "type": "integer",
                "description": "The year of the check-in date."
              }
            }
          },
          "check_out_date": {
            "type": "object",
            "nullable": true,
            "description": "The guest's scheduled departure date. Must represent a date on or after `check_in_date`.",
            "properties": {
              "month": {
                "type": "integer",
                "description": "The month of the check-out date."
              },
              "day": {
                "type": "integer",
                "description": "The day of the check-out date."
              },
              "year": {
                "type": "integer",
                "description": "The year of the check-out date."
              }
            }
          },
          "customer_service_phone": {
            "type": "string",
            "nullable": true,
            "description": "The phone number guests can call for support or inquiries related to their stay."
          },
          "extra_charge_details": {
            "type": "object",
            "nullable": true,
            "description": "Additional charges billed beyond the room rate. Each field represents a specific charge type, in cents.",
            "properties": {
              "restaurant_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "mini_bar_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "laundry_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "other_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "phone_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "gift_shop_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              }
            }
          },
          "hotel_agreement_number": {
            "type": "string",
            "nullable": true,
            "description": "The folio or agreement number associated with the reservation. Max 12 characters; longer values are truncated."
          },
          "is_advance_deposit": {
            "type": "boolean",
            "nullable": true,
            "default": false,
            "description": "Indicates whether the lodging charge is an advance deposit."
          },
          "is_no_show": {
            "type": "boolean",
            "nullable": true,
            "default": false,
            "description": "Set to `true` if the cardholder is being billed for a reserved room that was not occupied."
          },
          "number_of_nights": {
            "type": "integer",
            "nullable": true,
            "description": "The total number of nights for the lodging stay."
          },
          "property_phone": {
            "type": "string",
            "nullable": true,
            "description": "The direct phone number of the lodging property."
          },
          "room_rate": {
            "type": "string",
            "nullable": true,
            "description": "The nightly room rate, in cents."
          },
          "room_tax": {
            "type": "string",
            "nullable": true,
            "description": "The tax amount applied to the room rate, in cents."
          }
        }
      },
      "country": {
        "type": "string",
        "enum": [
          "ABW",
          "AFG",
          "AGO",
          "AIA",
          "ALA",
          "ALB",
          "AND",
          "ARE",
          "ARG",
          "ARM",
          "ASM",
          "ATA",
          "ATF",
          "ATG",
          "AUS",
          "AUT",
          "AZE",
          "BDI",
          "BEL",
          "BEN",
          "BES",
          "BFA",
          "BGD",
          "BGR",
          "BHR",
          "BHS",
          "BIH",
          "BLM",
          "BLR",
          "BLZ",
          "BMU",
          "BOL",
          "BRA",
          "BRB",
          "BRN",
          "BTN",
          "BVT",
          "BWA",
          "CAF",
          "CAN",
          "CCK",
          "CHE",
          "CHL",
          "CHN",
          "CIV",
          "CMR",
          "COD",
          "COG",
          "COK",
          "COL",
          "COM",
          "CPV",
          "CRI",
          "CUB",
          "CUW",
          "CXR",
          "CYM",
          "CYP",
          "CZE",
          "DEU",
          "DJI",
          "DMA",
          "DNK",
          "DOM",
          "DZA",
          "ECU",
          "EGY",
          "ERI",
          "ESH",
          "ESP",
          "EST",
          "ETH",
          "FIN",
          "FJI",
          "FLK",
          "FRA",
          "FRO",
          "FSM",
          "GAB",
          "GBR",
          "GEO",
          "GGY",
          "GHA",
          "GIB",
          "GIN",
          "GLP",
          "GMB",
          "GNB",
          "GNQ",
          "GRC",
          "GRD",
          "GRL",
          "GTM",
          "GUF",
          "GUM",
          "GUY",
          "HKG",
          "HMD",
          "HND",
          "HRV",
          "HTI",
          "HUN",
          "IDN",
          "IMN",
          "IND",
          "IOT",
          "IRL",
          "IRN",
          "IRQ",
          "ISL",
          "ISR",
          "ITA",
          "JAM",
          "JEY",
          "JOR",
          "JPN",
          "KAZ",
          "KEN",
          "KGZ",
          "KHM",
          "KIR",
          "KNA",
          "KOR",
          "KWT",
          "LAO",
          "LBN",
          "LBR",
          "LBY",
          "LCA",
          "LIE",
          "LKA",
          "LSO",
          "LTU",
          "LUX",
          "LVA",
          "MAC",
          "MAF",
          "MAR",
          "MCO",
          "MDA",
          "MDG",
          "MDV",
          "MEX",
          "MHL",
          "MKD",
          "MLI",
          "MLT",
          "MMR",
          "MNE",
          "MNG",
          "MNP",
          "MRT",
          "MSR",
          "MTQ",
          "MUS",
          "MWI",
          "MYS",
          "MYT",
          "NAM",
          "NCL",
          "NER",
          "NFK",
          "NGA",
          "NIC",
          "NIU",
          "NLD",
          "NOR",
          "NPL",
          "NRU",
          "NZL",
          "OMN",
          "PAK",
          "PAN",
          "PCN",
          "PER",
          "PHL",
          "PLW",
          "PNG",
          "POL",
          "PRI",
          "PRK",
          "PRT",
          "PRY",
          "PSE",
          "PYF",
          "QAT",
          "REU",
          "ROU",
          "RUS",
          "RWA",
          "SAU",
          "SDN",
          "SEN",
          "SGP",
          "SGS",
          "SHN",
          "SJM",
          "SLB",
          "SLE",
          "SLV",
          "SMR",
          "SOM",
          "SPM",
          "SRB",
          "SSD",
          "STP",
          "SUR",
          "SVK",
          "SVN",
          "SWE",
          "SWZ",
          "SXM",
          "SYC",
          "SYR",
          "TCA",
          "TCD",
          "TGO",
          "THA",
          "TJK",
          "TKL",
          "TKM",
          "TLS",
          "TON",
          "TTO",
          "TUN",
          "TUR",
          "TUV",
          "TWN",
          "TZA",
          "UGA",
          "UKR",
          "UMI",
          "URY",
          "USA",
          "UZB",
          "VAT",
          "VCT",
          "VEN",
          "VGB",
          "VIR",
          "VNM",
          "VUT",
          "WLF",
          "WSM",
          "XKX",
          "YEM",
          "ZAF",
          "ZMB",
          "ZWE"
        ],
        "nullable": true
      },
      "address": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "minLength": 1,
            "description": "First line of the address (max 35 characters).",
            "nullable": true
          },
          "line2": {
            "type": "string",
            "minLength": 1,
            "description": "Second line of the address (max 35 characters).",
            "nullable": true
          },
          "city": {
            "type": "string",
            "minLength": 1,
            "description": "City (max 20 characters).",
            "nullable": true
          },
          "region": {
            "type": "string",
            "minLength": 1,
            "description": "2-letter State code.",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "minLength": 1,
            "description": "Zip or Postal code (max 7 characters).",
            "nullable": true
          },
          "country": {
            "$ref": "#/components/schemas/country"
          }
        },
        "required": [
          "city",
          "country",
          "line1",
          "postal_code",
          "region"
        ]
      },
      "additional_motor_vehicle_rental_data": {
        "type": "object",
        "nullable": true,
        "description": "Contains motor vehicle rental-specific fields for `Authorization` and `Transfer` requests. Optional for motor vehicle rental MCC transactions (MCC 3351–3500, 7512). Returns `null` for all other transactions.",
        "properties": {
          "motor_vehicle_rental_agreement_number": {
            "type": "string",
            "nullable": true,
            "description": "The rental agreement or contract reference number for the rental. Max 9 characters; longer values are truncated."
          },
          "customer_service_number": {
            "type": "string",
            "nullable": true,
            "description": "The phone number customers can call for support or inquiries related to their rental."
          },
          "extra_charge_details": {
            "type": "object",
            "nullable": true,
            "description": "Additional charges beyond the base rental rate being billed. Each field represents a specific charge type, in cents.",
            "properties": {
              "extra_mileage_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "fuel_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "insurance_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "late_return_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "one_way_service_fee_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              },
              "parking_violation_amount": {
                "type": "integer",
                "nullable": true,
                "description": "The amount of the additional charge, in cents."
              }
            }
          },
          "is_no_show": {
            "type": "boolean",
            "nullable": true,
            "default": false,
            "description": "An indicator that the cardholder is being billed for a reserved vehicle that was not actually rented (that is, a \"no-show\" charge)."
          },
          "number_of_days": {
            "type": "integer",
            "nullable": true,
            "description": "The total number of days for the vehicle rental."
          },
          "rental_rate": {
            "type": "string",
            "nullable": true,
            "description": "The daily rental rate for the vehicle, in cents."
          },
          "renter_name": {
            "type": "string",
            "nullable": true,
            "description": "The name of the person renting the vehicle."
          },
          "pickup_address": {
            "nullable": true,
            "description": "The full address of the rental pickup location.",
            "allOf": [
              {
                "$ref": "#/components/schemas/address"
              }
            ]
          },
          "pickup_date": {
            "type": "object",
            "nullable": true,
            "description": "The scheduled vehicle pickup date.",
            "properties": {
              "month": {
                "type": "integer",
                "description": "The month of the pickup date."
              },
              "day": {
                "type": "integer",
                "description": "The day of the pickup date."
              },
              "year": {
                "type": "integer",
                "description": "The year of the pickup date."
              }
            }
          },
          "return_address": {
            "nullable": true,
            "description": "The full address of the vehicle return location.",
            "allOf": [
              {
                "$ref": "#/components/schemas/address"
              }
            ]
          },
          "return_date": {
            "type": "object",
            "nullable": true,
            "description": "The scheduled vehicle return date. Must be on or after `pickup_date`.",
            "properties": {
              "month": {
                "type": "integer",
                "description": "The month of the return date."
              },
              "day": {
                "type": "integer",
                "description": "The day of the return date."
              },
              "year": {
                "type": "integer",
                "description": "The year of the return date."
              }
            }
          }
        }
      },
      "customer_reference_number": {
        "type": "string",
        "description": "A unique reference ID for the order such as a purchase order (PO) number or invoice number. A purchase order number (PO number) is a unique code assigned to a specific order of goods or services. The buyer creates this number when they make a purchase order. It helps both the buyer and the seller track the order, match invoices, and keep accurate financial records.",
        "maxLength": 17
      },
      "additional_purchase_data": {
        "type": "object",
        "description": "Additional information about the purchase used for [Level 2 and Level 3 Processing](/guides/online-payments/payment-features/level-2-level-3-processing). Please note that Visa is ending its Level 2 offering in April 2026.",
        "nullable": true,
        "properties": {
          "customer_reference_number": {
            "$ref": "#/components/schemas/customer_reference_number"
          },
          "customs_duty_amount": {
            "type": "integer",
            "nullable": true,
            "description": "The duty in cents on the total purchase amount for the order."
          },
          "destination_country_code": {
            "type": "string",
            "nullable": true,
            "description": "The ISO country code of the order destination."
          },
          "destination_postal_code": {
            "type": "string",
            "nullable": true,
            "description": "The postal code of the order destination (10 characters).",
            "maxLength": 10
          },
          "discount_amount": {
            "type": "integer",
            "nullable": true,
            "description": "The amount in cents of the discount for the order. You must include this field to qualify for Level 3 interchange benefits. Even if the value is (0), you should pass the field to qualify for Level 3."
          },
          "invoice_reference_number": {
            "type": "string",
            "nullable": true,
            "description": "The order's invoice number (max 15 characters).",
            "maxLength": 15
          },
          "order_date": {
            "type": "object",
            "nullable": true,
            "properties": {
              "day": {
                "type": "integer",
                "description": "Day of purchase (between 1 and 31)."
              },
              "month": {
                "type": "integer",
                "description": "Month of purchase (between 1 and 12)."
              },
              "year": {
                "type": "integer",
                "description": "Year of purchase (4-digit).",
                "minimum": 1990
              }
            }
          },
          "sales_tax": {
            "type": "integer",
            "nullable": true,
            "description": "- Total aggregate tax amount in cents for the entire purchase. Field is automatically calculated if you pass in the itemized tax amounts.\n- For non-taxable transactions either set `sales_tax` to 0 or omit from payload and also set `tax_exempt` to **True**.\n- Request must align so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`.\n- For Visa, this field no longer qualifies for lower interchange after April 17, 2026. Include `item_data` for Level 3 processing."
          },
          "sales_tax_finix_generated": {
            "type": "integer",
            "description": "The sales tax amount in cents Finix calculated from the `item_data` line items.",
            "nullable": true
          },
          "ship_from_postal_code": {
            "type": "string",
            "nullable": true,
            "description": "The postal code from where order is shipped (10 characters).",
            "maxLength": 10
          },
          "shipping_amount": {
            "type": "integer",
            "nullable": true,
            "description": "The shipping cost in cents for the order.\n"
          },
          "tax_exempt": {
            "type": "boolean",
            "description": "- For tax exempt purchases set to **True**.\n- If set to **True**, request can't include `sales_tax`."
          },
          "item_data": {
            "type": "array",
            "description": "Additional information about the transaction. Used for Level 2 and Level 3 Processing.",
            "items": {
              "type": "object",
              "properties": {
                "amount_excluding_sales_tax": {
                  "type": "integer",
                  "description": "- Total cost of the line item in cents, excluding tax.\n- Must align with `sales_tax` so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`."
                },
                "amount_including_sales_tax": {
                  "type": "integer",
                  "description": "- Total cost of the line item in cents, including tax.\n- Must align with `sales_tax` so `amount_excluding_sales_tax` + `sales_tax` = `amount_including_sales_tax`."
                },
                "commodity_code": {
                  "description": "A commodity code is a numeric code representing a particular product or service as defined by the National Institute of Governmental Purchasing. The code can be 3, 5, 7, or 11 digits in length. The longer the code the more granular the description of the product/service. (max 12 characters).",
                  "type": "string",
                  "maxLength": 12
                },
                "cost_per_unit": {
                  "type": "integer",
                  "description": "The price in cents, excluding tax, of one unit of the item purchased."
                },
                "item_description": {
                  "type": "string",
                  "description": "Required when `item_data` is supplied (max 25 characters).",
                  "maxLength": 25
                },
                "item_discount_amount": {
                  "type": "integer",
                  "description": "The item discount amount in cents. You must include this field to qualify for Level 3 interchange benefits. Even if the value is (0), you should pass the field to qualify for Level 3."
                },
                "merchant_product_code": {
                  "type": "string",
                  "description": "Merchant defined product code (max 12 characters).",
                  "maxLength": 12
                },
                "quantity": {
                  "type": "number",
                  "description": "The number of items purchased. Must be greater than 0.",
                  "minimum": 1,
                  "maximum": 99
                },
                "unit_of_measure": {
                  "type": "string",
                  "description": "The unit of measure of the purchased item (max 3 characters).",
                  "maxLength": 3
                },
                "sales_tax_amount": {
                  "type": "integer",
                  "description": "The sales tax amount in cents for the line item."
                },
                "sales_tax_rate": {
                  "type": "number",
                  "description": "The sales tax rate for the line item as a decimal (e.g., 0.25 equals 25%).",
                  "example": 0.25
                }
              }
            }
          }
        }
      },
      "amount": {
        "type": "integer",
        "description": "The total amount that will be debited in cents (e.g. 100 cents to debit $1.00).",
        "example": 5000,
        "format": "int64"
      },
      "tags": {
        "type": "object",
        "title": "tags",
        "additionalProperties": true,
        "description": "Include up to 50 `key: value` pairs to annotate requests with custom metadata.\n- Maximum character length for individual `keys` is 40.\n- Maximum character length for individual `values` is 500.\n(For example, `order_number: 25`, `item_type: produce`, `department: sales`)",
        "nullable": true
      },
      "currency": {
        "type": "string",
        "description": "ISO 4217 3-letter currency code.",
        "enum": [
          "CAD",
          "USD"
        ]
      },
      "created_via_transfers_authorizations": {
        "type": "string",
        "description": "Gives more information about the product flow that was used to create the resource. Finix retains the right to add additional enums for this field without it being a breaking change.",
        "default": "UNKNOWN",
        "enum": [
          "CARD_PRESENT_ANDROID_APP",
          "CARD_PRESENT_ANDROID_APP_MANUAL_ENTRY",
          "CARD_PRESENT_ANDROID_D135_SDK",
          "CARD_PRESENT_DEVICE_READER_SDK",
          "CARD_PRESENT_IOS_APP",
          "CARD_PRESENT_IOS_APP_MANUAL_ENTRY",
          "CARD_PRESENT_IOS_D135_SDK",
          "CARD_PRESENT_IOS_TAP_TO_PAY",
          "CARD_PRESENT_IOS_TAP_TO_PAY_SDK",
          "CARD_PRESENT_SEMI_INTEGRATED_API",
          "CARD_PRESENT_STANDALONE",
          "CARD_PRESENT_STANDALONE_MANUAL_ENTRY",
          "CHECKOUT_FORM",
          "CYBERSOURCE",
          "DEVICE_ORDER",
          "PAYMENT_LINK",
          "PAYOUT_LINK",
          "PLUGIN_ADMOJI",
          "PLUGIN_CHECKOUT_CHAMP",
          "PLUGIN_FYNTEK",
          "PLUGIN_GAMBLE_ID",
          "PLUGIN_GAMMA_SWEEP",
          "PLUGIN_GR4VY",
          "PLUGIN_HYPERSWITCH",
          "PLUGIN_LACORE",
          "PLUGIN_PAYSIGHT",
          "PLUGIN_PRYZR",
          "PLUGIN_SERVMAN",
          "PLUGIN_SOAP_PAY",
          "PLUGIN_STICKYIO",
          "PLUGIN_TAGADA",
          "PLUGIN_WOO_COMMERCE",
          "PLUGIN_VRIO",
          "SUBSCRIPTION",
          "UNKNOWN",
          "VIRTUAL_TERMINAL"
        ]
      },
      "failure_code": {
        "type": "string",
        "description": "The code of the failure so the decline can be handled programmatically. For more info on how to handle the failure, see [Failure Codes](/additional-resources/developers/implementation-and-testing/failure-codes).",
        "nullable": true
      },
      "failure_message": {
        "type": "string",
        "description": "A human-readable description of why the transaction was declined. This will also include a suggestion on how to complete the payment.",
        "nullable": true
      },
      "fee_transfer": {
        "type": "integer",
        "format": "int64",
        "description": "The minimum amount of the `Transfer` you'd like to collect as your fee in cents. Defaults to zero (must be less than or equal to the `amount`).\n- If the fees applied by the 'Fee Profile' are ***higher*** than the value passed in 'fee', 'fee' will not be applied and have no effect.\n- If the fees applied by the 'Fee Profile' are ***lower*** than the value passed in 'fee', an additional fee is be applied, in addition to the fees generated by the `Fee Profile`.\n    - The additional fee is equal to the difference between the value passed in 'fee' and the fees generated by the `Fee Profile`."
      },
      "funds_flow_type": {
        "type": "string",
        "description": "The type of disbursement to perform. Defaults to `GENERAL_PAYOUT`.\n",
        "enum": [
          "GENERAL_PAYOUT",
          "ME_TO_ME",
          "GOVERNMENT"
        ],
        "nullable": true
      },
      "idempotency_id": {
        "type": "string",
        "description": "Pass any randomly generated or internal ID to [idempotently](/api/section/idempotent-requests) identify `Transfers`, `Authorizations`, or refund requests.",
        "nullable": true
      },
      "statement_descriptor": {
        "type": "string",
        "maxLength": 20,
        "nullable": true,
        "description": "The description of the `Merchant` that appears on the buyer's bank or card statement."
      },
      "application_link": {
        "type": "object",
        "description": "Link to the `Application` the request was made under.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "self": {
        "type": "object",
        "description": "Link to the resource that was used in the request.",
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "transfer": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/id"
          },
          "created_at": {
            "$ref": "#/components/schemas/created_at"
          },
          "updated_at": {
            "$ref": "#/components/schemas/updated_at"
          },
          "3d_secure_session": {
            "type": "string",
            "nullable": true,
            "description": "The ID of the `3D Secure Session` that authenticated the buyer. This field is `null` when the payment was not authenticated with a `3D Secure Session`.",
            "example": "3d_secure_session_f3fG3Zj8K958MTP5vpXAXX"
          },
          "additional_buyer_charges": {
            "description": "Details about any [Buyer Charges](../../../../guides/online-payments/payment-features/buyer-charges) included in the `Transfer`. The buyer charges are mutually exclusive.\n",
            "allOf": [
              {
                "$ref": "#/components/schemas/additional_buyer_charges"
              }
            ]
          },
          "additional_healthcare_data": {
            "$ref": "#/components/schemas/additional_healthcare_data"
          },
          "additional_lodging_data": {
            "$ref": "#/components/schemas/additional_lodging_data"
          },
          "additional_motor_vehicle_rental_data": {
            "$ref": "#/components/schemas/additional_motor_vehicle_rental_data"
          },
          "additional_purchase_data": {
            "$ref": "#/components/schemas/additional_purchase_data"
          },
          "address_verification": {
            "type": "string",
            "description": "Details the results of the address verification checks.",
            "nullable": true,
            "enum": [
              "POSTAL_CODE_AND_STREET_MATCH",
              "STREET_MATCH",
              "POSTAL_CODE_MATCH",
              "NO_ADDRESS",
              "NO_MATCH",
              "NOT_SUPPORTED",
              "UNKNOWN"
            ]
          },
          "amount": {
            "$ref": "#/components/schemas/amount"
          },
          "amount_requested": {
            "type": "integer",
            "format": "int64",
            "description": "The `amount` that was requested to get debited from the `source` when the transaction was created, in cents (e.g., `100` = $1.00).",
            "example": 100
          },
          "application": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the `Application` associated with the resource."
          },
          "bank_return_details": {
            "type": "object",
            "description": "Details about a transfer that was returned and was unable to be processed. Only present when `state` is `RETURNED`",
            "nullable": true,
            "properties": {
              "reason_code": {
                "type": "string",
                "description": "Return response code from the bank."
              },
              "reason_message": {
                "type": "string",
                "description": "Detailed message explaining reason for the return."
              },
              "reason_title": {
                "type": "string",
                "description": "Short message categorizing reason for the return."
              }
            }
          },
          "card_present_details": {
            "type": "object",
            "description": "Details needed to process card present transactions.",
            "nullable": true,
            "properties": {
              "approval_code": {
                "type": "string",
                "description": "Unique ID used to identify the approval of the `Transfer`.",
                "nullable": true
              },
              "brand": {
                "type": "string",
                "description": "The brand of the card saved in the `Payment Instrument`.",
                "nullable": true
              },
              "emv_data": {
                "type": "object",
                "description": "Encrypted card data used to process the transaction.",
                "nullable": true,
                "properties": {
                  "application_identifier": {
                    "type": "string",
                    "description": "ID of the application used in the transaction. Tag 9F06 from the EMVCo standard.",
                    "nullable": true
                  },
                  "application_label": {
                    "type": "string",
                    "description": "EMV application label. Tag 50 from the EMVCo standard.",
                    "nullable": true
                  },
                  "application_preferred_name": {
                    "type": "string",
                    "description": "EMV application label with formatting (if provided). Tag 9F12 from the EMVCo standard.",
                    "nullable": true
                  },
                  "application_transaction_counter": {
                    "type": "string",
                    "description": "Transaction number for the EMV application. Tag 9F36 from the EMVCo standard.",
                    "nullable": true
                  },
                  "cryptogram": {
                    "type": "string",
                    "description": "Cryptogram returned by the card. Tag 9F26 of the EMVCo standard.",
                    "nullable": true
                  },
                  "issuer_code_table_index": {
                    "type": "string",
                    "description": "The alphabet code table (according to ISO 8859) used by the EMV application (if provided). Tag 9F11.",
                    "nullable": true
                  },
                  "network_emv_response": {
                    "type": "string",
                    "description": "EMV response data returned by the card network.",
                    "nullable": true
                  },
                  "pin_verified": {
                    "type": "boolean",
                    "description": "Whether the cardholder's PIN number was verified."
                  },
                  "tags": {
                    "$ref": "#/components/schemas/tags"
                  }
                }
              },
              "entry_mode": {
                "type": "string",
                "description": "Details of the card payment method used to process the transaction.\n\nThe possible enums are:\n\n- UNKNOWN - The method by which the payment card was used is unknown.\n- SWIPED - The card was swiped through a POS terminal.\n- CONTACTLESS - The payment was made by tapping a card on a POS terminal.\n- CHIP_ENTRY - The payment card was inserted into a card reader.\n",
                "enum": [
                  "UNKNOWN",
                  "SWIPED",
                  "CONTACTLESS",
                  "CHIP_ENTRY"
                ],
                "nullable": true
              },
              "masked_account_number": {
                "type": "string",
                "description": "Last four digits of the bank account number.",
                "nullable": true
              },
              "name": {
                "type": "string",
                "description": "The name of the bank account or card owner.",
                "nullable": true
              },
              "digital_signature_file_id": {
                "type": "string",
                "description": "The ID of the file containing the digital signature captured during the transaction. If a signature was not collected, this field returns `null`.",
                "nullable": true
              },
              "payment_type": {
                "type": "string",
                "description": "The type of `Payment Instrument` used in the transaction (or the original payment).",
                "nullable": true
              }
            }
          },
          "currency": {
            "$ref": "#/components/schemas/currency"
          },
          "created_via": {
            "$ref": "#/components/schemas/created_via_transfers_authorizations"
          },
          "destination": {
            "type": "string",
            "description": "ID of the `Payment Instrument` where funds will be sent.",
            "nullable": true
          },
          "device": {
            "type": "string",
            "description": "The ID of the `Device` resource the `Transfer` was created under."
          },
          "externally_funded": {
            "type": "string",
            "description": "Details if the `Transfer` will be settled externally by card processors."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp indicating when a held refund expires. Only returned for reversals created with refund holds enabled. A refund that can't be covered by this time fails with `failure_code: REFUND_EXPIRED`. For more information, see [Pending refunds](/guides/after-the-payment/refunds/pending-refunds).",
            "nullable": true
          },
          "failure_code": {
            "$ref": "#/components/schemas/failure_code"
          },
          "failure_message": {
            "$ref": "#/components/schemas/failure_message"
          },
          "fee": {
            "$ref": "#/components/schemas/fee_transfer"
          },
          "fee_profile": {
            "type": "string",
            "description": "The ID of the `Fee Profile` that will be used for calculating fees for this transfer."
          },
          "funds_flow_type": {
            "$ref": "#/components/schemas/funds_flow_type"
          },
          "idempotency_id": {
            "$ref": "#/components/schemas/idempotency_id"
          },
          "ip_address_details": {
            "type": "object",
            "description": "Always returns `null`.",
            "nullable": true
          },
          "merchant": {
            "type": "string",
            "description": "The ID of the `Merchant` resource the `Transfer` was created under.",
            "example": "MUxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "merchant_identity": {
            "type": "string",
            "example": "IDxxxxxxxxxxxxxxxxxxxxxxxx",
            "description": "The ID of `Identity` resource used by the `Merchant` the `Transfer` was created under."
          },
          "messages": {
            "type": "array",
            "description": "A list of messages that provides additional details.",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "network_details": {
            "type": "object",
            "nullable": true,
            "description": "Contains network-specific fields used by issuers to identify transactions.",
            "properties": {
              "brand": {
                "type": "string",
                "description": "Card brand associated with the saved payment instrument.",
                "example": "VISA"
              },
              "authorization_code": {
                "type": "string",
                "description": "Code returned by the issuing bank when a transaction is authorized.",
                "example": 840735
              },
              "acquirer_reference_number": {
                "type": "string",
                "description": "Unique identifier banks use to trace chargebacks or refunds. Available only for Mastercard transactions; otherwise returns `null`.",
                "nullable": true,
                "example": 521600805857
              }
            }
          },
          "operation_key": {
            "type": "string",
            "enum": [
              "CARD_NOT_PRESENT_CAPTURE",
              "CARD_NOT_PRESENT_REFUND",
              "CARD_NOT_PRESENT_SALE",
              "CARD_NOT_PRESENT_UNREFERENCED_REFUND",
              "CARD_PRESENT_AUTHORIZATION",
              "CARD_PRESENT_DEBIT",
              "CARD_PRESENT_SALE",
              "CARD_PRESENT_UNREFERENCED_REFUND",
              "INSTANT_APPLICATION_FUNDING_PULL_FROM_ACH",
              "INSTANT_APPLICATION_FUNDING_PULL_FROM_CARD",
              "INSTANT_APPLICATION_FUNDING_PULL_FROM_FED_NOW",
              "INSTANT_APPLICATION_FUNDING_PULL_FROM_SAME_DAY_ACH",
              "INSTANT_APPLICATION_FUNDING_PUSH_TO_ACH",
              "INSTANT_APPLICATION_FUNDING_PUSH_TO_CARD",
              "INSTANT_APPLICATION_FUNDING_PUSH_TO_FED_NOW",
              "INSTANT_APPLICATION_FUNDING_PUSH_TO_SAME_DAY_ACH",
              "INSTANT_MERCHANT_FUNDING_PULL_FROM_ACH",
              "INSTANT_MERCHANT_FUNDING_PULL_FROM_FED_NOW",
              "INSTANT_MERCHANT_FUNDING_PULL_FROM_SAME_DAY_ACH",
              "INSTANT_MERCHANT_FUNDING_PUSH_TO_ACH",
              "INSTANT_MERCHANT_FUNDING_PUSH_TO_CARD",
              "INSTANT_MERCHANT_FUNDING_PUSH_TO_FED_NOW",
              "INSTANT_MERCHANT_FUNDING_PUSH_TO_SAME_DAY_ACH",
              "MERCHANT_CREDIT_ADJUSTMENT",
              "MERCHANT_DEBIT_ADJUSTMENT",
              "PULL_FROM_ACH",
              "PULL_FROM_CARD",
              "PULL_FROM_SAME_DAY_ACH",
              "PUSH_TO_ACH",
              "PUSH_TO_CARD",
              "PUSH_TO_SAME_DAY_ACH",
              "REFUND_MERCHANT_CREDIT_ADJUSTMENT",
              "REFUND_MERCHANT_DEBIT_ADJUSTMENT",
              "SALE",
              "STANDARD_APPLICATION_FUNDING_PULL_FROM_ACH",
              "STANDARD_APPLICATION_FUNDING_PULL_FROM_CARD",
              "STANDARD_APPLICATION_FUNDING_PULL_FROM_SAME_DAY_ACH",
              "STANDARD_APPLICATION_FUNDING_PUSH_TO_ACH",
              "STANDARD_APPLICATION_FUNDING_PUSH_TO_CARD",
              "STANDARD_APPLICATION_FUNDING_PUSH_TO_SAME_DAY_ACH",
              "STANDARD_MERCHANT_FUNDING_PULL_FROM_ACH",
              "STANDARD_MERCHANT_FUNDING_PULL_FROM_CARD",
              "STANDARD_MERCHANT_FUNDING_PULL_FROM_SAME_DAY_ACH",
              "STANDARD_MERCHANT_FUNDING_PUSH_TO_ACH",
              "STANDARD_MERCHANT_FUNDING_PUSH_TO_CARD",
              "STANDARD_MERCHANT_FUNDING_PUSH_TO_SAME_DAY_ACH",
              "UNREFERENCED_REFUND"
            ],
            "description": "The operation performed in the transaction. `REFUND_MERCHANT_DEBIT_ADJUSTMENT` and `REFUND_MERCHANT_CREDIT_ADJUSTMENT` are created by Finix for [refund holds](/guides/after-the-payment/refunds/pending-refunds) and cannot be passed in requests.",
            "nullable": true
          },
          "parent_transfer": {
            "type": "string",
            "description": "ID of the original parent `Transfer`. Only present when `type` is `REVERSAL`.",
            "nullable": true
          },
          "parent_transfer_trace_id": {
            "type": "string",
            "description": "The `trace_id` of the original parent `Transfer`. Only present when `type` is `REVERSAL`.",
            "nullable": true
          },
          "processed_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp of when the `Transfer` was processed.",
            "nullable": true
          },
          "pull_transfer_id": {
            "type": "string",
            "nullable": true,
            "description": "The ID of the corresponding pull `Transfer` linked in a `ME_TO_ME` transaction."
          },
          "raw": {
            "description": "Raw response from the processor.",
            "anyOf": [
              {
                "type": "object",
                "nullable": true
              },
              {
                "type": "string",
                "nullable": true
              }
            ]
          },
          "ready_to_settle_at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp indicating when the `Transfer` is ready to be settled.",
            "nullable": true
          },
          "receipt_last_printed_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the receipt was last printed.",
            "nullable": true
          },
          "security_code_verification": {
            "type": "string",
            "nullable": true,
            "description": "Details the results of the Card Verification Code check.",
            "enum": [
              "MATCHED",
              "UNKNOWN",
              "UNMATCHED"
            ]
          },
          "source": {
            "type": "string",
            "description": "The ID of the `Payment Instrument` that will be debited and performing the `Transfer`.",
            "nullable": true
          },
          "split_transfers": {
            "type": "array",
            "description": "Array containing the resource IDs of the `Split Transfers` generated from the `Transfer`.\n\nFor standard split transactions, this contains IDs of `Split Transfers` created from the parent `Transfer`.\n\nFor [dispute adjustment transfers](/api/disputes/listdisputesadjustments) on split transactions:\n- When a `MERCHANT_DEBIT` or `MERCHANT_CREDIT` adjustment `Transfer` is created for a [Dispute](/api/disputes) on a split transaction, this array contains the IDs of `Split Transfers` created for each participant.\n- The `Split Transfers` are created proportionally based on each merchant's share of the original sale.\n\nFor more information, see [Split Transactions - Disputes](../../../../guides/online-payments/payment-features/split-transactions#disputes).\n",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "CANCELED",
              "PENDING",
              "FAILED",
              "SUCCEEDED",
              "UNKNOWN",
              "RETURNED"
            ],
            "description": "The status of the `Transfer`."
          },
          "statement_descriptor": {
            "$ref": "#/components/schemas/statement_descriptor"
          },
          "subtype": {
            "type": "string",
            "description": "Additional information describing the `payment_type`.\n\nFor [dispute adjustment transfers](/api/disputes/listdisputesadjustments) (`type: DISPUTE`):\n- `MERCHANT_DEBIT`: Funds are pulled from the merchant(s) when a chargeback occurs. For split transactions, this creates `Split Transfers` with `type: DISPUTE_MERCHANT_DEBIT`.\n- `MERCHANT_CREDIT`: Funds are returned to the merchant(s) when a `Dispute` is ruled in their favor. For split transactions, this creates `Split Transfers` with `type: DISPUTE_MERCHANT_CREDIT`.\n\nFor [refund hold](/guides/after-the-payment/refunds/pending-refunds) adjustment transfers:\n- `REFUND_MERCHANT_DEBIT_ADJUSTMENT`: Funds are pulled from the merchant to cover a held refund.\n- `REFUND_MERCHANT_CREDIT_ADJUSTMENT`: Funds are returned to the merchant when the held refund is submitted or expires.\n",
            "enum": [
              "API",
              "DISPUTE",
              "MERCHANT_CREDIT",
              "MERCHANT_CREDIT_ADJUSTMENT",
              "MERCHANT_DEBIT",
              "MERCHANT_DEBIT_ADJUSTMENT",
              "PLATFORM_CREDIT",
              "PLATFORM_CREDIT_ADJUSTMENT",
              "PLATFORM_DEBIT",
              "PLATFORM_DEBIT_ADJUSTMENT",
              "REFUND_MERCHANT_CREDIT_ADJUSTMENT",
              "REFUND_MERCHANT_DEBIT_ADJUSTMENT",
              "SETTLEMENT_MERCHANT",
              "SETTLEMENT_NOOP",
              "SETTLEMENT_PARTNER",
              "SETTLEMENT_PLATFORM",
              "SPLIT_PAYOUT",
              "SPLIT_PAYOUT_ADJUSTMENT",
              "SYSTEM"
            ]
          },
          "supplemental_fee": {
            "type": "string",
            "description": "Amount in cents for which an additional fee will be created in addition to any fees created from the assigned fee profile.",
            "nullable": true
          },
          "tags": {
            "$ref": "#/components/schemas/tags"
          },
          "tip_amount": {
            "type": "integer",
            "description": "The tip amount included in the total amount.",
            "nullable": true
          },
          "trace_id": {
            "type": "string",
            "description": "Trace ID of the `Transfer`. The processor sends back the `trace_id` so you can track the `Transfer` end-to-end.",
            "nullable": true
          },
          "type": {
            "type": "string",
            "description": "Type of `Transfer`.",
            "enum": [
              "DEBIT",
              "CREDIT",
              "REVERSAL",
              "ADJUSTMENT",
              "DISPUTE",
              "RESERVE",
              "SETTLEMENT",
              "UNKNOWN"
            ]
          },
          "third_party_details": {
            "type": "object",
            "description": "Details about the third-party processor associated with the `Transfer`.",
            "nullable": true,
            "properties": {
              "external_trace_id": {
                "type": "string",
                "description": "The trace ID returned by the third-party processor used to identify the `Transfer`.",
                "nullable": true
              },
              "type": {
                "type": "string",
                "description": "The name of the third-party processor associated with the `Transfer`.",
                "nullable": true,
                "enum": [
                  "CYBERSOURCE"
                ]
              }
            }
          },
          "_links": {
            "type": "object",
            "properties": {
              "application": {
                "$ref": "#/components/schemas/application_link"
              },
              "destination": {
                "type": "object",
                "description": "Link to the `Payment Instrument` where funds are getting sent.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "device": {
                "type": "object",
                "description": "Link to the `Device` the request was made under.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "disputes": {
                "type": "object",
                "description": "Link to the `Dispute` the request was made under.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "fee_profile": {
                "type": "object",
                "description": "Link to the `fee_profile` the request was made under.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "fees": {
                "type": "object",
                "description": "Link to the `fees` the request is associated with.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "merchant_identity": {
                "type": "object",
                "description": "Link to the `Identity` the `Merchant` was created under and the `Transfer` was submitted with.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "payment_instruments": {
                "type": "object",
                "description": "Link to the `Payment Instrument` associated with the Transfer.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "disputed_transfer": {
                "type": "object",
                "description": "Link to the `Transfer` the `Dispute` is about.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "parent": {
                "type": "object",
                "description": "Link to the original resource that was used in the request.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "reversals": {
                "type": "object",
                "description": "Link to the `reversals` associated with the `Transfer`.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              },
              "self": {
                "$ref": "#/components/schemas/self"
              },
              "source": {
                "type": "object",
                "description": "Link to the `Payment Instrument` the `Transfer` was created under.",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

A declined payment also returns `201 Created`, with `state` set to `FAILED` and a `failure_code` that explains why. Check `state` on every response instead of relying on the HTTP status, then return the result to your app so it can show the buyer a confirmation or an error. For more information, see [Handling Declined Payments](/guides/online-payments/fraud-and-risk/handling-declined-payments).

The buyer is now charged. Finix adds the payment to a Settlement and pays out the funds, minus fees, to the merchant's bank account. For more information, see [Payouts](/guides/after-the-payment/payouts).

You can also:

- Place a hold on the card and capture the funds later by creating an Authorization instead of a Transfer. For more information, see [Auth and Captures](/guides/online-payments/payment-features/auth-and-captures).
- Include an `idempotency_id` so that a retried request doesn't charge the buyer twice. For more information, see [API Idempotency](/additional-resources/developers/authentication-and-api-basics/idempotent-request).
- Collect bank account details for ACH payments with `bankPaymentSheet()`. For more information, see [Integration Guide](/ios/online/integration).
- Add 3D Secure authentication to the payment sheet. For more information, see [Enable 3D Secure](/ios/online/integration#10-enable-3d-secure-optional).


## Test your integration

Build and run your app on a simulator or a physical device, then complete a payment with a test card number from [Testing Your Integration](/additional-resources/developers/implementation-and-testing/testing-your-integration). To test failures, pass one of the following amounts in Step 3.

| `amount` | Result |
|  --- | --- |
| `102` | The payment is declined. |
| `193` | The payment fails for insufficient funds. |
| `888888` | The payment is disputed. |


To confirm the payment, open the **Payments** section of the Finix Dashboard and check that the Transfer shows the expected merchant, amount, and card details.

## Next steps

Integrating into Webhooks
Get notified when a payment succeeds, fails, or is disputed.

Apple Pay on iOS
Add Apple Pay to your iOS app.

Refunds
Return funds to a buyer after a payment.

Integration Checklist
Confirm your integration is ready before you go live.