Program Gateway Funding Sources

Use the /fundingsources/programgateway endpoint to create a program gateway funding source.

A program gateway funding source represents a bank account from which funds are drawn for Just-in-Time (JIT) Funding transactions. For more information about JIT Funding, see About Just-in-Time Funding.

In a sandbox environment, you can create a program gateway funding source that simulates funds for use in test transactions. In a production environment, you must work with a Marqeta Customer Success representative to define the bank account from which the program gateway funding source draws funds.

Note: If you are using a third-party service to collect user funds, Marqeta and the issuing bank require specific reporting to ensure compliance with all rules and regulations. Contact Marqeta for more information.

Create program gateway source

Action: POST
Endpoint: /fundingsources/programgateway

Create a program gateway funding source. A program gateway funding source is a transaction relay that, when configured, allows you to approve or decline transactions in real time.

Body field details

Name Type Required? Description Allowable Values                    
token string No The unique identifier of the funding source. If you do not include a token, the system will generate one automatically. As this token is necessary for use in other calls, we recommend 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. 36 char max
url string Yes The URL of the gateway endpoint hosted in your environment, to which POST messages are submitted by Marqeta. 250 char max. Must be HTTPS. Empty string not allowed.
basic_auth_username string Yes Username for authenticating your environment. 50 char max.
basic_auth_password string Yes Password for authenticating your environment.
  • 20-50 characters
  • Must contain at least 1 numeral
  • Must contain at least 1 lower-case letter
  • Must contain at least 1 upper-case letter
  • Must contain at least 1 of these symbols: @#$%!^&*()\_+~`-=[]{}|;:'",./<>?
name string Yes The name of the program gateway funding source. 50 char max
timeout_millis integer No Total timeout in milliseconds for gateway processing. Default: 3000
active boolean No Indicates whether the program gateway funding source is active. true | false;

Default: true

Sample request body

{
"token": "my_pgfs_token",
"basic_auth_username": "my_username",
"basic_auth_password": "My_20-character-min_password",
"url": "https://my_secure_domain.com/my_gateway",
"name": "my_pgfs_name"
}

Sample response body

{
"name": "my_pgfs_name",
"active": true,
"token": "my_pgfs_token",
"account": "12.003.001.000155",
"url": "https://my_secure_domain.com/my_gateway",
"created_time": "2015-11-30T20:00:51Z",
"last_modified_time": "2015-11-30T20:00:51Z",
"basic_auth_username": "my_username",
"basic_auth_password": "My_20-character-min_password",
"timeout_millis": 3000
}


Update program gateway source

Action: PUT
Endpoint: /fundingsources/programgateway/{token}

Update a program gateway funding source. Only the values of parameters specified in the request are modified; all others are left unchanged.

URL path parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the program gateway funding source to retrieve. Existing program gateway funding source token.

Send a GET request to /fundingsources/user/{user_token} to retrieve existing funding source tokens for a user or to /fundingsources/business/{business_token} to retrieve existing funding source tokens for a business.

Body field details

Name Type Required? Description Allowable Values
url string Yes The URL of the gateway endpoint hosted in your environment, to which POST messages are submitted by Marqeta. 250 char max. Must be HTTPS. Empty string not allowed.
timeout_millis integer No Total timeout in milliseconds for gateway processing. Default: 3000
basic_auth_username string Yes Username for authenticating your environment. 50 char max.
basic_auth_password string Yes Password for authenticating your environment.
  • 20-50 characters
  • Must contain at least 1 numeral
  • Must contain at least 1 lower-case letter
  • Must contain at least 1 upper-case letter
  • Must contain at least 1 of these symbols: @#$%!^&*()\_+~`-=[]{}|;:'",./<>?
active boolean No Indicates whether the program gateway funding source is active. true | false;

Default: true
name string No The name of the program gateway funding source. 50 char max

Sample request body

{
"active": false
}

Sample response body

{
"name": "my_pgfs_name",
"active": false,
"token": "my_pgfs_token",
"account": "12.003.001.000155",
"url": "https://my_secure_domain.com/my_gateway",
"created_time": "2015-11-30T20:00:51Z",
"last_modified_time": "2015-11-30T23:39:10Z",
"basic_auth_username": "my_username",
"basic_auth_password": "My_20-character-min_password",
"timeout_millis": 3000
}


Retrieve program gateway source

Action: GET
Endpoint: /fundingsources/programgateway/{token}

Retrieve a specific program gateway funding source.

URL path parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the gateway program funding source to retrieve. Existing program gateway funding source token.

Send a GET request to /fundingsources/user/{user_token} to retrieve existing funding source tokens for a user or to /fundingsources/business/{business_token} to retrieve existing funding source tokens for a business.

Sample response body

{
"name": "my_pgfs_name",
"active": false,
"token": "my_pgfs_token",
"account": "12.003.001.000155",
"url": "https://my_secure_domain.com/my_gateway",
"created_time": "2015-11-30T20:00:51Z",
"last_modified_time": "2015-11-30T23:39:10Z",
"basic_auth_username": "my_username",
"basic_auth_password": "My_20-character-min_password",
"timeout_millis": 3000
}