Getting Started

Getting Started - Retail API

Environments and Base URL

All Retail API requests use a versioned base URL. The {env} prefix determines the target environment.

Base URL: https://{env}-fscpartner-apim.go2bankonline.com/fscpartner/v1
Environment{env} ValueHost
Productionprodprod-fscpartner-apim.go2bankonline.com
Pre-Production (PIE)piepie-fscpartner-apim.go2bankonline.com

PIE (Partner Integration Environment) is the recommended environment for integration development and testing. It mirrors the current production environment throughout Green Dot's development cycle, with the exception of the final week before each release.

IP Allowlisting: Access to the Retail API requires that your server's IP address be allowlisted by Green Dot. Submit your egress IP addresses to your Green Dot account manager before beginning integration work.


Authentication

The Retail API uses OAuth 2.0 Client Credentials flow via the Microsoft identity platform. All authentication credentials are provisioned by Green Dot during onboarding.

Step 1 — Generate an Access Token

Request a Bearer token from the Microsoft OAuth endpoint using your client credentials.

Request format:

POST login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id={client_id}&client_secret={client_secret}&grant_type=client_credentials&scope={scope}

Example request:

POST https://login.microsoftonline.com/a1b2c3d4-e5f6-7890-abcd-ef1234567890/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded

client_id=b2c3d4e5-f6a7-8901-bcde-f12345678901
&client_secret=xK8mPqR2~NvBwYt7LCjZ91Ds3uGhFnXaVe3pQr4
&grant_type=client_credentials
&scope=api%3A%2F%2Ff3e4d5c6-b7a8-9012-cdef-123456789012%2F.default

Token Request Parameters

ParameterRequiredTypeMax LengthDescription
tenant_idYesString255Authentication domain. Provided by Green Dot.
client_idYesString255ID associated with your account. Provided by Green Dot.
client_secretYesString255Secret associated with your account. Provided by Green Dot.
scopeYesString255Scope for this authentication request, specific to the Retail API. Provided by Green Dot.
grant_typeYesString255Must be set to client_credentials.

Successful Token Response

{
  "token_type": "Bearer",
  "expires_in": 3599,
  "ext_expires_in": 3599,
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhcGktY2xpZW50IiwiYXVkIjoiZjNlNGQ1YzYtYjdhOC05MDEyLWNkZWYtMTIzNDU2Nzg5MDEyIn0.<signature>"
}
FieldRequiredTypeDescription
token_typeYesStringAlways Bearer.
expires_inYesNumericToken validity in seconds.
ext_expires_inYesNumericExtended lifetime indicator; used for resiliency during token service outages.
access_tokenYesStringThe Bearer token to include in subsequent API calls.

Token Error Response

{
  "error": "invalid_client",
  "error_description": "Client authentication failed.",
  "error_codes": [70011],
  "timestamp": "2026-01-15 12:00:00Z",
  "trace_id": "a1b2c3d4-efab-5678-cdef-ab9876543210",
  "correlation_id": "d4c3b2a1-bafe-8765-fedc-ab6789012345"
}
FieldRequiredTypeDescription
errorYesStringError code string for classifying the error type.
error_descriptionYesStringHuman-readable error message to help identify root cause.
error_codesNoNumeric ArraySTS-specific error codes for diagnostics.
timestampYesStringWhen the error occurred.
trace_idYesStringUnique request identifier for diagnostics.
correlation_idYesStringUnique identifier for tracing the request across components.

Authentication Error Codes

Error CodeDescriptionResolution
invalid_requestProtocol error — missing required parameter.Fix and resubmit. Typically a development-time error.
unauthorized_clientClient application not permitted to request a token.Verify the client is registered and configured in Azure AD.
invalid_clientClient authentication failed.Verify client_id and client_secret are correct.
invalid_scopeRequested scope is invalid or malformed.Fix and resubmit. Typically a development-time error.
invalid_resourceTarget resource in the scope does not exist or is not configured.Verify the resource is configured in Azure AD.
server_errorUnexpected server-side error.Retry. May be transient.
temporarily_unavailableServer too busy to handle the request.Retry with backoff.

Reference documentation:


Step 2 — Use the Token in API Requests

Include the access token as a Bearer token in the Authorization header of every API call that requires authentication.

Authorization: Bearer {access_token}

Example:

Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhcGktY2xpZW50In0.<signature>

Token expiration: If a token is invalid, expired, or issued for a different application, the API returns HTTP 401 Unauthorized with no response body. No detail about the specific failure reason is provided. Regenerate your token and retry.


Standard Metadata

Every API request (except Ping) requires metadata that identifies the retail location and operator. How metadata is passed depends on the HTTP verb:

  • GET requests — Pass metadata as HTTP headers, each prefixed with X-GD-.
  • POST/PUT requests — Pass metadata in the request body under a metadata object.

The X-GD-RequestId header must always be passed in the HTTP header for all request types.

Metadata Parameters

ParameterRequiredTypeMax LengthDescription
X-GD-RequestIdYesString50Unique transaction identifier generated by the retailer. Must be unique per request. Always passed as an HTTP header.
requestDateTimeYesDateTimeUTC timestamp of the transaction. Format: YYYY-MM-DDTHH:MM:SSZ
storeIdYesString20Store number for the retail location where the transaction occurred.
merchantIdYesString20Unique merchant ID assigned by Green Dot.
registerIdNoString20Register identifier at the store where the transaction occurred.
userIdNoString50Unique ID of the user (cashier/operator) performing the transaction.

GET Request — Header Example

GET {baseUrl}/system/ping
Authorization: Bearer {access_token}
X-GD-RequestId: req-20260115-abc123
X-GD-StoreId: STORE-0042
X-GD-MerchantId: MRC-20001
X-GD-RegisterId: REG-01
X-GD-UserId: [email protected]
X-GD-RequestDateTime: 2026-01-15T12:00:00Z

POST Request — Body Metadata Example

POST {baseUrl}/card/details
Authorization: Bearer {access_token}
Content-Type: application/json
X-GD-RequestId: req-20260115-abc123

{
  "metadata": {
    "storeId": "STORE-0042",
    "merchantId": "MRC-20001",
    "registerId": "REG-01",
    "userId": "[email protected]",
    "requestDateTime": "2026-01-15T12:00:00Z"
  },
  "accountNumber": "4111111111111234",
  "transactionAmount": "100.00",
  "paymentProgramType": "Regular"
}

Standard Response Envelope

All API responses return a consistent set of base fields:

{
  "requestId": "req-20260115-abc123",
  "responseId": "f8e7d6c5-b4a3-2190-fedc-ba9876543210",
  "responseCode": 0,
  "responseDescription": "Success",
  "responseDateTime": "2026-01-15T12:00:07.4411753Z"
}

Did this page help you?