{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-order-payment-instrument-request-schema.json",
  "title": "OrderPaymentInstrumentRequest",
  "description": "Document representing an order payment instrument request.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-shopper-orders-api-openapi.yml#/components/schemas/OrderPaymentInstrumentRequest",
  "additionalProperties": {
    "title": "Additional Property Support",
    "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix."
  },
  "type": "object",
  "properties": {
    "amount": {
      "format": "double",
      "description": "The payment transaction amount.",
      "type": "number"
    },
    "bankRoutingNumber": {
      "maxLength": 256,
      "description": "The bank routing number.",
      "type": "string"
    },
    "giftCertificateCode": {
      "maxLength": 256,
      "description": "The gift certificate code.",
      "type": "string"
    },
    "paymentCard": {
      "description": "The payment card.",
      "allOf": [
        {
          "$ref": "#/$defs/OrderPaymentCardRequest"
        }
      ]
    },
    "giftCardRequest": {
      "description": "The gift card request.",
      "allOf": [
        {
          "$ref": "#/$defs/GiftCardRequest"
        }
      ]
    },
    "paymentMethodId": {
      "maxLength": 256,
      "description": "The payment method ID.",
      "type": "string"
    },
    "paymentReferenceRequest": {
      "description": "Payment reference information for various payment service providers, only when Salesforce Payments is enabled.",
      "allOf": [
        {
          "$ref": "#/$defs/PaymentReferenceRequest"
        }
      ]
    }
  },
  "$defs": {
    "GiftCardRequest": {
      "additionalProperties": false,
      "description": "Represents gift card details for a request.",
      "type": "object",
      "required": [
        "brand",
        "cardNumber",
        "cvc"
      ],
      "properties": {
        "brand": {
          "maxLength": 256,
          "description": "The gift card type or brand (for example, givex, blackhawk).",
          "type": "string"
        },
        "cardNumber": {
          "maxLength": 40,
          "description": "The gift card number.",
          "type": "string"
        },
        "cvc": {
          "maxLength": 4,
          "description": "The card verification code (CVC/CVV) for the gift card.",
          "type": "string"
        },
        "expirationMonth": {
          "format": "int32",
          "description": "The month when the gift card expires.",
          "type": "integer"
        },
        "expirationYear": {
          "format": "int32",
          "description": "The year when the gift card expires.",
          "type": "integer"
        }
      }
    },
    "OrderPaymentCardRequest": {
      "description": "Document representing an order payment card request.",
      "type": "object",
      "properties": {
        "cardType": {
          "maxLength": 256,
          "description": "The payment card type (for example: Visa).",
          "type": "string"
        },
        "creditCardToken": {
          "description": "A credit card token. If a credit card is tokenized, the token can be used to look up the credit card data\nin the token store.",
          "type": "string"
        },
        "expirationMonth": {
          "format": "int32",
          "description": "The month when the payment card expires.",
          "type": "integer"
        },
        "expirationYear": {
          "format": "int32",
          "description": "The year when the payment card expires.",
          "type": "integer"
        },
        "holder": {
          "maxLength": 256,
          "description": "The payment card holder.",
          "type": "string"
        },
        "issueNumber": {
          "maxLength": 256,
          "description": "The payment card issue number.",
          "type": "string"
        },
        "maskedNumber": {
          "pattern": "^[0-9 -]{0,7}\\D{6,15}\\d{0,4}$",
          "maxLength": 25,
          "description": "The masked payment card number.",
          "type": "string"
        },
        "validFromMonth": {
          "minimum": 1,
          "maximum": 12,
          "format": "int32",
          "description": "The month the payment card is valid from.",
          "type": "integer"
        },
        "validFromYear": {
          "format": "int32",
          "description": "The year the payment card is valid from.",
          "type": "integer"
        }
      }
    },
    "PaymentReferenceRequest": {
      "type": "object",
      "description": "Properties for Payments Reference Request",
      "properties": {
        "paymentMethodType": {
          "type": "string",
          "maxLength": 64,
          "description": "Payment Method Type"
        },
        "zoneId": {
          "type": "string",
          "description": "The unique identifier for a Payments zone.",
          "pattern": "^[a-zA-Z0-9\\-_]{1,100}$",
          "minLength": 1,
          "maxLength": 100
        },
        "gateway": {
          "description": "The payment gateway used to process the payment.",
          "type": "string",
          "enum": [
            "stripe",
            "paypal",
            "adyen"
          ]
        },
        "gatewayProperties": {
          "description": "The payment gateway specific properties.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "stripe": {
              "description": "# Stripe specific properties.\n\n- setupFutureUsage: Indicates that you intend to make future payments with this payment method.\n  - **on_session**: The payment method is intended to be used for a future payment on the same website session.\n  - **off_session**: The payment method is intended to be used for a future payment on a different website session.\n  - **null**: The payment method is not intended to be used for a future payment.\n",
              "type": "object",
              "additionalProperties": true
            },
            "paypal": {
              "description": "# PayPal specific properties.\n\n- shippingPreference: Shipping preference for PayPal payment processing. Applicable only for basket payment instruments.\n  - **GET_FROM_FILE**\n  - **NO_SHIPPING**\n  - **SET_PROVIDED_ADDRESS**\n",
              "type": "object",
              "additionalProperties": true
            },
            "adyen": {
              "description": "# Adyen specific properties.\n",
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      }
    }
  }
}