---
updatedAt: 2025-06-09T21:34:38.000Z
agentTools:
  projectIndex: https://docs.gettrx.com/llms.txt
---

# Create a Customer

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "payments",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api-dev.gettrx.com/payments/v1/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "secretKey"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/customers": {
      "post": {
        "summary": "Create a Customer",
        "description": "",
        "operationId": "create-a-customer",
        "parameters": [
          {
            "name": "idempotencyKey",
            "in": "header",
            "description": "A unique identifier to ensure the same operation isn't processed multiple times, preventing duplicate transactions.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "onBehalfOf",
            "in": "header",
            "description": "Specifies the account for which the Customer creation is intended. This is used for scenarios where one partner processes payments on behalf of another partner, such as in PayFac or related partner relationships.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The customer’s full name or business name."
                  },
                  "email": {
                    "type": "string",
                    "description": "The customer’s email address."
                  },
                  "description": {
                    "type": "string",
                    "description": "A custom description for the customer."
                  },
                  "phone": {
                    "type": "string",
                    "description": "The customer’s phone number."
                  },
                  "address": {
                    "type": "object",
                    "description": "The customer’s address.",
                    "properties": {
                      "city": {
                        "type": "string",
                        "description": "The city, district, suburb, town, or village."
                      },
                      "country": {
                        "type": "string",
                        "description": "The two-letter country code (ISO 3166-1 alpha-2)."
                      },
                      "line1": {
                        "type": "string",
                        "description": "The address line 1 (e.g., street, PO Box, or company name)."
                      },
                      "line2": {
                        "type": "string",
                        "description": "The address line 2 (e.g., apartment, suite, unit, or building)."
                      },
                      "postalCode": {
                        "type": "string",
                        "description": "The ZIP or postal code."
                      },
                      "state": {
                        "type": "string",
                        "description": "The state, county, province, or region."
                      }
                    }
                  },
                  "shipping": {
                    "type": "object",
                    "description": "The customer's mailing and shipping address.",
                    "properties": {
                      "address": {
                        "type": "object",
                        "description": "The shipping address.",
                        "properties": {
                          "city": {
                            "type": "string",
                            "description": "The city, district, suburb, town, or village."
                          },
                          "country": {
                            "type": "string",
                            "description": "The two-letter country code (ISO 3166-1 alpha-2)."
                          },
                          "line1": {
                            "type": "string",
                            "description": "The address line 1 (e.g., street, PO Box, or company name)."
                          },
                          "line2": {
                            "type": "string",
                            "description": "The address line 2 (e.g., apartment, suite, unit, or building)."
                          },
                          "postalCode": {
                            "type": "string",
                            "description": "The ZIP or postal code."
                          },
                          "state": {
                            "type": "string",
                            "description": "The state, county, province, or region."
                          }
                        }
                      },
                      "name": {
                        "type": "string",
                        "description": "The recipient name."
                      },
                      "phone": {
                        "type": "string",
                        "description": "The recipient phone number (including extension)."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```