Package Sale

🚧

This offering is not yet live, and contract(s) may change. However, you can read below to get a sneak-peak before full release!

Package Sale API Method

This method is used to sell a card or MoneyPak to a customer.

📘

Every request triggered should have a unique X-GD-RequestId value in the header

Syntax

POST {baseUrl}/package/sale

Example Request

Success Request

POST {baseUrl}/package/sale
Authorization: bearer {token}
Content-Type: application/json
X-GD-RequestId: 123456789

{
  "metadata": {    
    "merchantId": "15|118",
    "registerId": "01001",
    "storeId": "CC970",
    "userId": "[email protected]",
    "requestDateTime": "2013-09-18T10:53:07Z"    
  },
  "externId": "3085033189"
  "transactionAmount": 20.00,
  "paymentProgramType": "Regular"
}

Request Parameters

ParameterRequired(Y/N)Format/Data TypePatternDescription
X-GD-RequestIdYesStringMaxLength:50It is a unique transaction identifier that is generated by the retailer.
requestDateTimeYesDateTime2023-08-08T12:34:56ZTime stamp at which transaction occurred.
The time stamp has to be in UTC time zone and follow the following date and time formats:
• YYYY-MM-DDTHH:mm:ssZ
merchantIdYesStringMaxLength: 20The unique merchant Id. Defined by Green Dot – Merchant corresponding with Retailer.
storeIdYesStringMaxLength: 20The store number associated with the retailer that sold the package.
If not supplied, InvalidParameter (Code:100) error will be return.
registerIdNoStringMaxLength: 20Register where the transaction occurred.
userIdNoStringMaxLength:50The unique ID of the user generating the transaction.
UserID is now a required field to support ‘teller incentive program’.
externIdYesstringMax:19The externId is the last 19 digits of the barcode on the package.
transactionAmountYesdecimal500.00Amount of money to be loaded.
For example: Five Hundred Dollars is entered as “500.00”. Twenty Dollars is entered as “20.00”)
paymentProgramTypeYesEnumRegular,
CheckCashing
Type of payment option that customer selects.
For example:
• If the customer is paying with a check, then it will be “CheckCashing”.
If they are paying by cash, or a combination of check and cash, PaymentProgramType will be “Regular”.

Example Response

Success Response

HTTP/1.1 200 OK
Content-Type: application/json
X-GD-RequestId: 201309181254
X-GD-ResponseId: 127d59fa-8851-444a-a639-716e81b2cecd
X-GD-ResponseCode: 0

{
    "metadata": {
        "requestId": "201309181254",
        "responseCode": 0,
        "responseDescription": "Success",
        "responseDateTime": "2013-09-18T17:53:07.1411753Z",
        "responseId": "127d59fa-8851-444a-a639-716e81b2cecd"
    },    
"receiptText":"Please wait 10 minutes to register your card at www.mygreendot.com or 1 (866) 785-6963. You need the temporary card number found on the card in your package. ... Keep this receipt for your records.",
“fundingDelaySeconds”: “60”
}

Response Parameters

ParameterRequired(Y/N)Format/Data TypePatternDescription
requestIdYesStringMaxLength:50The unique request ID from request.
responseIdYesStringMaxLength:50The unique Response Identifier (generated by GreenDot).
responseDateTimeYesDateTime2023-09-07T16:12:23.4541445+08:00Time stamp at which transaction occurred.
The time stamp is in UTC time zone and follow the following date and time formats:
• YYYY-MM-DDTHH:mm:ssfffffffK
responseCodeYesNumericMaxLength:4Indicates success and failure of the response codes. It is in the numeric format.
responseDescriptionYesStringMaxLength:255Describes the Response Code in more detail. It is in the String format.
fundingDelaySecondsYesString“60”The length of the funding delay in seconds. The transaction may be voided immediately after it had succeeded and up to FundingDelaySeconds. Please note that the actual delay the funds will be usable may be up to 2 minutes longer that this value due to some asynchronous processing in the backend system. Only successful reload will have fundingDelaySeconds value.
receiptTextNoStringMax 1000Describes the receipt text.

Response Codes

CodeCode TextResponse DescriptionExplanation of the Response Code
0SuccessSuccessCard is enrolled successfully.
100InvalidParameter• StoreId is required
• MerchantId is required
• UserId is required
• StoreId is too long
• UserId is too long
• MerchantId is too long
• RequestId is too long
• ExternalId already used.
• ExternalId expired.
• RequestDateTime is required
• RequestId is required
• The field ExternId must be a string with a maximum length of 20.
Invalid parameter when validating the request value. Examples: MerchantID not supplied, StoreID not supplied.
130InvalidMerchantInvalidMerchantMerchantId in request has not been found/enabled in the system.
800InvalidStoreStore was not foundStore is not found; store is not for the partner or store does not support this operation.
861RetailChainUserNotFoundUser is not found.UserID in the request is not found in system.
862RetailChainUserNotActiveUser is not active.UserId in request is not active.
600UnableToProcessRequestPackage Id not foundExtern ID on the package was not found.
1000GeneralFailureGeneralFailureService failure.