Understanding API objects
The Core API uses objects to represent concepts for issuing payments cards and customizing card behavior. First-class objects are generally the most important objects on the Marqeta platform and occupy the first node in an endpoint URL. Some examples of first-class objects include:
- card – represents a payment card (physical or virtual) for conducting transactions.
- user – represents a person who uses a payment card.
- gpaorder – used to load funds into an account.
- fundingsource – represents the source from which a gpaorder draws funds.
To see how the fundamental API objects interrelate, refer to the Summary of Resources.
Accessing the shared sandbox environment
The Marqeta platform provides a shared sandbox environment that allows you to explore the capabilities of the Core API. The base URL for the shared sandbox is:
Note: This is a shared, public environment. Do not populate it with sensitive data. For more information about exploring the shared sandbox, see Core API Quick Start.
You can retrieve a list of the available API endpoints by sending a GET request to the /swagger.json endpoint, for example:
The response lists the endpoints you are authorized to access based on the credentials you provide in your request.
Using interactive widgets
Marqeta's developer documentation includes interactive widgets that you can use to explore and test the Core API directly from your browser. After logging in to your account, you can use these interactive widgets:
- Some pages include inline widgets for submitting API requests to specific endpoints. For example, Core API Quick Start provides a step-by-step tutorial for configuring a card and simulating a transaction with the Core API.
- The API Explorer shows all available endpoints and operations in the Core API, grouped by object.
To use an interactive widget:
- Log in or sign up for an account.
- Go to a page with the interactive widget that you want to use.
- Click the widget to expand it.
- Click Try it out.
The parameters and the example value in the Request Body field become editable.
- Enter the desired parameters and request body details, and click Execute.
The widget submits a request to the shared sandbox and shows the cURL and the response.
Accessing production environments
Each Marqeta customer who enters into an agreement to receive Marqeta's services will access the API and operate within an individually tailored production environment called a program.
To access the API in production, you use the unique base URL for your program. Be sure to update any tests or code samples with the correct base URL. For example: