> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Program Gateway

> Create a new Credit Program Gateway.

POST/credit/programgateways

Create a new Credit Program Gateway.

Use this endpoint to configure your Program Gateway to receive gateway requests from Marqeta's credit platform. You can create multiple Program Gateways, but only one can be active per credit program.

> [!NOTE]
>
> **Note**\
> To create a Program Gateway, you must have consumer or admin credentials.

## Request body

| Fields | Description |
| - | - |
| token string  Optional | Unique identifier of the Program Gateway. If you do not include a token, the system generates one automatically. As this token is necessary for use in other calls, it is recommended that you define a simple and easy to remember string rather than letting the system generate a token for you. This value cannot be updated. **Allowable Values:**  36 char max |
| name string  Required | Name of the Program Gateway. **Allowable Values:**  255 char max |
| url string  Required | URL of the Program Gateway endpoint hosted in your environment and configured to receive authorization requests made by the Marqeta platform. Must be HTTPS. **Allowable Values:**  250 char max |
| basic\_auth\_username string  Required | Basic Authentication username for authenticating your environment. **Allowable Values:**  50 char max |
| basic\_auth\_password string  Required | Basic Authentication password for authenticating your environment. **Allowable Values:**  20–50 chars |
| timeout\_millis integer  Optional | Total timeout for Program Gateway calls, in milliseconds. **Allowable Values:**  1–2000 |
| active boolean  Optional | Indicates whether the Program Gateway is active. **Allowable Values:**  `true`, `false` |
| mtls boolean  Optional | Indicates whether the Program Gateway uses mutual Transport Layer Security (mTLS). **Allowable Values:**  `true`, `false` |
| custom\_header object  Optional | Additional custom information included in the HTTP header. For example, this might contain security information, along with Basic Authentication, when making a Program Gateway request. Custom headers also appear in the associated webhook's notifications. **Allowable Values:**  Up to three name-value pairs: 500 char max per name, 500 char max per value  Example:  `json JSON { "custom_header": { "customer_header_key_1": "customer_header_value_1", "customer_header_key_2": "customer_header_value_2", "customer_header_key_3": "customer_header_value_3" } } ` |

## Sample request body

```json JSON lines wrap theme={null}
{
  "name": "My Program Gateway",
  "url": "https://my-url",
  "basic_auth_username": "my_username",
  "basic_auth_password": "my_20-50_character_password",
  "custom_header": {
    "my_header_name_1": "my_value_1"
  }
}
```

## Response body

| Fields | Description |
| - | - |
| token string  Conditionally returned | Unique identifier of the Program Gateway. **Allowable Values:**  36 char max |
| name string  Conditionally returned | Name of the Program Gateway. **Allowable Values:**  255 char max |
| url string  Conditionally returned | URL of the Program Gateway endpoint hosted in your environment and configured to receive authorization requests made by the Marqeta platform. **Allowable Values:**  250 char max |
| basic\_auth\_username string  Conditionally returned | Basic Authentication username for authenticating your environment. **Allowable Values:**  50 char max |
| basic\_auth\_password string  Conditionally returned | Basic Authentication password for authenticating your environment. **Allowable Values:**  20–50 chars |
| timeout\_millis integer  Conditionally returned | Total timeout for Program Gateway calls, in milliseconds. **Allowable Values:**  2000 max |
| active boolean  Conditionally returned | Indicates whether the Program Gateway is active. **Allowable Values:**  `true`, `false` |
| custom\_header object  Conditionally returned | Additional custom information included in the HTTP header. **Allowable Values:**  Up to three name-value pairs: 500 char max per name, 500 char max per value |
| mtls boolean  Conditionally returned | Indicates whether the Program Gateway uses mutual Transport Layer Security (mTLS). **Allowable Values:**  `true`, `false` |
| created\_time datetime  Conditionally returned | Date and time when the Program Gateway was created on Marqeta's credit platform, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |
| updated\_time datetime  Conditionally returned | Date and time when the Program Gateway was last updated on Marqeta's credit platform, in UTC. **Allowable Values:**  Format: yyyy-MM-ddThh:mm:ssZ |


## Related topics

- [Create program gateway source](https://www.marqeta.com/docs/core-api/program-gateway-funding-sources/create-program-gateway-source.md)
- [Program Gateways Overview](https://www.marqeta.com/docs/core-api/credit-program-gateways.md)
- [About Credit Program Gateways](https://www.marqeta.com/docs/developer-guides/about-credit-program-gateways.md)
- [Program Gateway Funding Sources Overview](https://www.marqeta.com/docs/core-api/program-gateway-funding-sources.md)
- [Configuring Gateway JIT Funding](https://www.marqeta.com/docs/developer-guides/configuring-gateway-jit-funding.md)
