Set Up Funding Source

This page explains how to set up a funding source for JIT Funding. The type of funding source you choose to set up depends on the type of JIT Funding you plan to implement. For Managed JIT Funding, set up a Program Funding Source. For Gateway JIT Funding, set up a Program Gateway Funding source.

For an explanation of the types of JIT Funding and an overview of the entire procedure of setting up JIT Funding, see JIT Funding Overview. For more information about creating Funding Sources, see Funding Sources.

Set up a Program Funding Source

Action: POST
Endpoint: /fundingsources/program

This endpoint creates a Program Funding Source for Managed JIT Funding.

Body field details

Field Type Required? Description Allowable Values
token string No Unique identifier of the Program Funding Source. If you don't provide a value, one will be generated. 36 char max
name string Yes Descriptive name for the Program Funding Source. 40 char max
active boolean No Indicates whether this Program Funding Source is active. true | false; Default: true

Sample request body

{
"token": "my_pfs_token",
"name": "My Program Funding Source"
}

Sample response body

{
"name": "My Program Funding Source",
"active": true,
"token": "my_pfs_token",
"account": "12.003.001.001519",
"created_time": "2016-06-13T18:47:52Z",
"last_modified_time": "2016-06-13T18:47:52Z"
}


Set up a Program Gateway Funding Source

Action: POST
Endpoint: /fundingsources/programgateway

This endpoint creates a Program Gateway Funding Source for Gateway JIT Funding.

Body field details

Field Type Required? Description Allowable Values            
token string No Unique identifier of the Program Gateway Funding Source. If you don't provide a value, one will be generated. 36 char max
url string Yes URL of the JIT Funding gateway (must be HTTPS). 250 char max
basic_auth_username string Yes Basic Authentication user name for HTTPS access to the JIT Funding gateway. 50 char max
basic_auth_password string Yes Basic Authentication password for HTTPS access to the JIT Funding gateway. 50 char max;

Must contain:
  • 20-50 characters
  • at least 1 numeral
  • at least 1 lower-case letter
  • at least 1 upper-case letter
  • at least 1 of these symbols: @#$%!^&*()\_+~`-=[]{}|;:'",./<>?
name string Yes Descriptive name for the Program Gateway Funding Source 40 char max
timeout_millis integer No The maximum number of milliseconds Marqeta waits for the JIT Funding gateway to respond. If the gateway does not respond in the specified time, Marqeta times out the request by breaking the socket connection to the gateway. If the timed-out request contained an "actionable" method (pgfs.authorization or pgfs.auth_plus_capture), Marqeta declines the associated transaction back to the card network. Default: 3000
active boolean No Indicates whether this Program Gateway Funding Source is active. true | false; Default: true

Sample request body

{
"token": "my_pgfs_token",
"url": "https://example.com/my_gateway",
"basic_auth_username": "my_username",
"basic_auth_password": "ulr3w&T9ec@jkZq7rscx",
"name": "My Gateway Name"
}

Sample response body

{
"name": "My Gateway Name",
"active": true,
"token": "my_pgfs_token",
"account": "12.003.001.000165",
"url": "https://example.com/my_gateway",
"created_time": "2016-01-13T19:15:51Z",
"last_modified_time": "2016-01-13T19:15:51Z",
"basic_auth_username": "_____________________",
"basic_auth_password": "____________________",
"timeout_millis": 3000
}