# Payment Facilitators (PayFacs)

PayFacs are intermediaries that offer payment services for their clients (known as sub-merchants) and can process payments through us. When a cardholder completes a payment, the sub-merchant forwards the details to the PayFac, who then submits the compliant payment to us. We settle the funds with the PayFac, who subsequently distributes the payment to the respective sub-merchant.

PayFacs must provide detailed information that clearly identifies both themselves and the sub-merchant for each payment.

## Parameters

You can submit PayFac specific fields in the `merchant.paymentFacilitator` object for both Customer Initiated Transactions and Merchant Initiated Transactions.


```json
{
  "$ref": "#/components/schemas/paymentFacilitator",
  "components": {
    "schemas": {
      "paymentFacilitator": {
        "required": [
          "schemeId",
          "subMerchant"
        ],
        "type": "object",
        "description": "An object containing Payment Facilitator information. This information is required for every authorization **only if you are a Payment Facilitator**.",
        "properties": {
          "schemeId": {
            "maxLength": 11,
            "minLength": 1,
            "pattern": "[0-9]*$",
            "type": "string",
            "description": "Your payment facilitator ID received from Visa, Mastercard, or Amex."
          },
          "independentSalesOrganizationId": {
            "maxLength": 11,
            "minLength": 1,
            "pattern": "[0-9]*$",
            "type": "string"
          },
          "subMerchant": {
            "required": [
              "reference",
              "name",
              "address"
            ],
            "type": "object",
            "properties": {
              "name": {
                "maxLength": 25,
                "minLength": 1,
                "pattern": "^(?!\\s*$)[A-Za-z0-9 ]*$",
                "type": "string"
              },
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 15,
                "pattern": "^[A-Za-z0-9]*$"
              },
              "address": {
                "type": "object",
                "required": [
                  "postalCode",
                  "street",
                  "city",
                  "countryCode"
                ],
                "properties": {
                  "postalCode": {
                    "maxLength": 10,
                    "minLength": 1,
                    "pattern": "^(?!\\s*$)[a-zA-Z0-9\\s]*$",
                    "type": "string",
                    "example": "SW1 1AA"
                  },
                  "street": {
                    "maxLength": 50,
                    "minLength": 1,
                    "pattern": "^(?!\\s*$)[A-Za-z0-9\\s]*$",
                    "type": "string",
                    "example": "221B Baker Street"
                  },
                  "city": {
                    "maxLength": 13,
                    "minLength": 1,
                    "pattern": "^(?!\\s*$)[A-Za-z\\s-]*$",
                    "type": "string",
                    "example": "London"
                  },
                  "state": {
                    "maxLength": 3,
                    "minLength": 1,
                    "pattern": "^[a-zA-Z0-9]*$",
                    "type": "string",
                    "description": "The state code of the subMerchant in ISO-3166-2 format."
                  },
                  "countryCode": {
                    "maxLength": 2,
                    "minLength": 2,
                    "pattern": "^[A-Z]*$",
                    "type": "string",
                    "description": "Country code of the subMerchant in [ISO 3166-1 Alpha-2 format](/products/reference/supported-countries-currencies#iso-country-codes)."
                  }
                }
              },
              "phoneNumber": {
                "maxLength": 20,
                "minLength": 4,
                "pattern": "^(?!\\s*$)[0-9\\s()+-/.x]*$",
                "type": "string"
              },
              "taxReference": {
                "maxLength": 20,
                "minLength": 1,
                "pattern": "^(?!\\s*$)[a-zA-Z0-9\\s-]*$",
                "type": "string"
              },
              "email": {
                "maxLength": 40,
                "minLength": 1,
                "type": "string",
                "pattern": "^.+@.+$"
              },
              "url": {
                "maxLength": 255,
                "minLength": 1,
                "pattern": "^[a-zA-Z0-9@!£*#$)(+-_=.,/;:]*$",
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

### Example request


```
{
    "transactionReference": "abc-123",
    "channel": "ecom",
    "merchant": {
        "entity": "default",
        "paymentFacilitator": {
            "schemeId": "1111",
            "independentSalesOrganizationId": "222",
            "subMerchant": {
                "name": "ABC Name",
                "reference": "abc123",
                "address": {
                    "postalCode": "SM8989",
                    "street": "SMLondon",
                    "city": "London",
                    "state": "WSM",
                    "countryCode": "GB"
                },
                "phoneNumber": "079707281345",
                "email": "email@example.com",
                "url": "https://www.website.com",
                "taxReference": "54282949242"
            }
        }
    },
    "instruction": {
        "requestAutoSettlement": {
            "enabled": false
        },
        "debtRepayment": true,
        "narrative": {
            "line1": "Test1"
        },
        "value": {
            "currency": "GBP",
            "amount": 650
        },
        "paymentInstrument": {
            "type": "card/plain",
            "cardNumber": "4444333322221111",
            "cardHolderName": "Sherlock Holmes",
            "expiryDate": {
                "month": 9,
                "year": 2029
            }
        }
    }
}
```