DOCS

New!

/

5 minute read

October 2, 2019

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 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

Develop Now!

Sign in and use your sandbox to access the API Explorer

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

Fields Description

token

string, optional

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.

Allowable Values:

36 char max

url

string, required

The URL of the gateway endpoint hosted in your environment, to which POST messages are submitted by Marqeta.

Allowable Values:

  • 250 char max

  • Must be HTTPS

  • Empty string not allowed

basic_auth_username

string, required

Username for authenticating your environment.

Allowable Values:

50 char max

basic_auth_password

string, required

Password for authenticating your environment.

Allowable Values:

  • 20-100 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

name

string, required

The name of the program gateway funding source.

Allowable Values:

50 char max

timeout_millis

integer, optional

Total timeout in milliseconds for gateway processing.

Allowable Values:

Default value: 3000

custom_header

object, optional

Contains information about custom headers for additional security beyond the required Basic Authentication.

Allowable Values:

active

boolean, optional

Indicates whether the program gateway funding source is active.

Allowable Values:

true, false

Default value: true

The custom_header object

Fields Description

my_header_name_1
my_header_name_2
my_header_name_3

(500 char max per name)

Additional security information included in the HTTP header, along with Basic Authentication, when making a JIT Funding request. The Marqeta customer defines the name and value of up to three fields, for example:

"custom_header": {
  "my_header_name_1": "my_value_1",
  "my_header_name_2": "my_value_2"
  "my_header_name_3": "my_value_3"
}

Is this helpful?

Allowable Values:

500 char max

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"
}

Is this helpful?

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
}

Is this helpful?

Update program gateway source

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

Develop Now!

Sign in and use your sandbox to access the API Explorer

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

Fields Description

token

string, required

Identifies the program gateway funding source to retrieve.

Allowable Values:

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

Fields Description

url

string, required

The URL of the gateway endpoint hosted in your environment, to which POST messages are submitted by Marqeta.

Allowable Values:

  • 250 char max

  • Must be HTTPS

  • Empty string not allowed

timeout_millis

integer, optional

Total timeout in milliseconds for gateway processing.

Allowable Values:

Default value: 3000

basic_auth_username

string, required

Username for authenticating your environment.

Allowable Values:

50 char max

basic_auth_password

string, required

Password for authenticating your environment.

Allowable Values:

  • 20-100 characters

  • Must contain at least one numeral

  • Must contain at least one lowercase letter

  • Must contain at least one uppercase letter

  • Must contain at least one of these symbols: @#$%!^&*()\_+~`-=[]{},;:'",./<>?

active

boolean, optional

Indicates whether the program gateway funding source is active.

Allowable Values:

true, false

Default value: true

name

string, optional

The name of the program gateway funding source.

Allowable Values:

50 char max

Sample request body

{
  "active": false
}

Is this helpful?

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
}

Is this helpful?

Retrieve program gateway source

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

Develop Now!

Sign in and use your sandbox to access the API Explorer

Retrieve a specific program gateway funding source.

URL path parameters

Fields Description

token

string, required

Identifies the gateway program funding source to retrieve.

Allowable Values:

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
}

Is this helpful?

Have any feedback on this page?

If you feel we can do anything better, please let our team know.

We strive for the best possible developer experience.