Barcode Generation

Barcode Generation & Confirmation API Methods

Generating Barcodes

The BarCode Generation API generates a barcode number for a given program/product/customer.

Structure of API Call:

POST /v1/barcode

Sample Request - Add Cash Partner (Header)

{
   x-gdn-ipaddress: 127.0.0.1
   x-gdn-encryptiontype: 1
   x-gdn-devicetype: 1
   x-gdn-programnumber: Catalina-BC x-gdn-channeltype: 1
   x-gdn-messageid: 200306011700823 x-gdn-signature:
   573BCFB6212C434680D72BE36F72C7FD5306D7779521B8EA2F082721FB6899F8
   x-gdn-timestamp: 2020-03-06T01:17:00.00Z(Z means zero time zone offset from utc)
}

Sample Request - Add Cash Partner (Body)

{
   "gd_retailer_key": "2433",
   "gd_barcode_type": 2,
   "amount": "22.22",
   "partner_transaction_reference": "abcdefg",
   "sender_customer_ref": "123456789",
   "sender_first_name": "123",
   "sender_last_name": "sln",
   "sender_email": "[email protected]",
   "sender_phone": "6263331234",
   "recipient_customer_ref": "1147762",
   "recipient_first_name": "rfn",
   "recipient_last_name": "rln",
   "recipient_email": "[email protected]",
   "recipient_phone": "2133334321",
   "notification_channel_type": 0,    
   "amount_match_type": 0
}

Sample Request – Bill Pay Partner (Headers)

{
   x-gdn-ipaddress: 127.0.0.1
   x-gdn-encryptiontype: 1
   x-gdn-devicetype: 1
   x-gdn-programnumber: Aptexx-BC (The program should configure the SubProgramCategory of the Bill Pay type)
   x-gdn-channeltype: 1
   x-gdn-messageid: 200306011700823 x-gdn-signature:
   573BCFB6212C434680D72BE36F72C7FD5306D7779521B8EA2F082721FB6899F8
   x-gdn-timestamp: 2020-03-06T01:17:00.00Z(Z means zero time zone offset from utc) Content-Type:application/json
}

Sample Request – Bill Pay Partner (Body)

{
   "gd_retailer_key": 2480,
   "gd_barcode_type": 2,
   "amount": 25,
   "partner_transaction_reference": "{{$timestamp}}",
   "sender_customer_ref": "123456789",
   "recipient_customer_ref": "1147762",
   "sender_first_name": "Abraham",
   "sender_last_name": "Washington",
   "sender_address": "shanghai",
   "sender_zipcode": "94926",
   "notification_channel_type": "0"
}

Request Parameter Field Descriptions

Note: With regards to requiring parameters for Add Cash and Bill Pay, Y=Required, N=Not required, and C=Conditional.

ParameterTypeAdd Cash RequiredBill Pay RequiredDescription
gd_retailer_keyIntYYRetailer for which the barcode is being generated. The barcode number might be different based on the retailer. GD will provide the list of RetailerKeys to the consumer of the API.
gd_barcode_typeIntYY- 0 = None

- 1 = BarcodeLink

- 2 = BarcodeNumberForPrint

- 3 = BarcodeNumberForViewNote:

- Use 1 to send a barcode link so the customer can generate a barcode at a later stage.Note: If this is selected. then notification_channel_type must be either SMS or Email.

- Use 2 when online web and print option is selected. Default barcode expiration time is 48 hours.

- Use 3 for mobile barcodes. Default barcode expiration time is 1 hour. The default value can be overwritten if there is a value configured in DB.
amountDecimalCCThis is the amount for which the barcode is being generated. It is required when parameter amount_match_type = 1 or 2.
amount_match_typeIntNN0 = Default. No constraints. Barcode can be consumed without constraint on amount.
1 = Partial consumption. Barcode must be consumed less than or equal to the amount specified in amount parameter (Not currently supported).
2 = Full consumption. Barcode must be consumed with exact amount specified in the amount parameter.
partner_transaction_refer enceStringYYThis is the transaction reference for the current transaction (i.e., send money request, etc.). The partner generates/maintains this value. Green Dot uses it for audit purposes.
sender_customer_refStringYYIdentifier/Reference which the partner generates for the source (sender) of this transaction.

Example: If A is sending money to B, this field identifies A's account.

Note: If applicable, sender risk controls are calculated off this identifier.
sender_first_nameStringYYFor Add Cash type, this field passes the depositor’s first Name. For Bill Pay type, it passes the bill payer’s first name.
sender_last_nameStringYYFor Add Cash type, this field passes the cash depositor’s last name. For Bill Pay type, it passes the bill payer’s last name.
sender_emailStringYNFor Add Cash type, this field passes the cash depositor’s email address. For Bill Pay type, it passes the bill payer’s email address.
sender_phoneStringYNFor Add Cash type, this field passes the cash depositor’s phone number. For Bill Pay type, it passes the bill payer’s phone number.
sender_addressStringNYFor Add Cash type, this field passes the cash depositor’s address. For Bill Pay type, it passes the bill payer’s address.
sender_zipcodeStringNYFor Add Cash type, this field passes the cash depositor’s zip code. For Bill Pay type, it passes the bill payer’s zip code.
recipient_customer_refStringYYThis is the Identifier/Reference the partner generates for the target/receiver of this transaction.

Example: If A is trying to send money to B, this is an identifier/ reference of B's account.

Note: If applicable, receiver risk controls are calculated off this identifier.
recipient_first_nameStringYNFor Add Cash type, this field passes the recipient’s first name. For Bill Pay type, it passes the payee’s first name.

Note: If the bill pay partner cannot pass this data, we will block certain states during program configuration. For more details, contact your account manager.
recipient_last_nameStringYNFor Add Cash type, this field passes the recipient’s last name. For Bill Pay type, it passes the payee’s last name.

Note: If the bill pay partner cannot provide this data, we will block certain states during program configuration. For more details, contact your account manager.

Note: If the payee is a business, only provide a name in the recipient_first_name field.
recipient_emailStringYNFor Add Cash type, this field passes the recipient’s email address. For Bill Pay type, it passes the payee’s email address.
recipient_phoneStringYNFor Add Cash type, this field passes the recipient’s phone number. For Bill Pay type, it passes the payee’s phone number.
recipient_addressStringNNFor Add Cash type, this field passes the recipient’s address. For Bill Pay type, it passes the payee’s address.

Note: If the bill pay partner cannot pass this data, we will block certain states during program configuration. For more details, contact your account manager.
recipient_zipcodeStringNNFor Add Cash type, this field passes the recipient’s zip code. For Bill Pay type, it passes the payee’s zip code.

Note: If the bill pay partner cannot pass this data, we will block transactions in certain states. For more details, contact your account manager.
notification_channel_typeStringNN0 = none,
1 = SMS
2 – Email (only if Green Dot is sending barcode notifications on the partner’s behalf.)
gd_barcode_payment_typeIntNN0 = Default. None. Barcode for cash-in.
1 = Deposit
2 = Payment
3 = Debit. Barcode for cash-out.

Response Model

{
   "gd_barcode_id": "string",
   "gd_barcode_id_expiration": "2022-05-05T14:42:05.124Z",
   "gd_retailer_key": 0,
   "gd_barcode_type": 0,
   "gd_barcode_payment_type": 0,
   "gd_retailer_name": "string",
   "partner_transaction_reference": "string",
   "gd_transaction_reference": "string", 
   "gd_response_code": 0,    
   "gd_response_message": "string",   
   "gd_response_date": "2022-05-05T14:42:05.124Z"
}

Sample Response – Bill Pay Partner

<barcode_response xmlns:i="http://www.w3.org/2001/XMLSchema-
instance" xmlns="http://greendotcorp.com/WebServices/Corporate/GDFNReloadServices/">
<gd_response_code>0</gd_response_code>
<gd_response_date>2021-01-18T06:44:43.4410039Z</gd_response_date>
<gd_response_message>Success</gd_response_message>
<gd_transaction_reference>dd21cd41-a305-4768-97c3-40062b35f247</gd_transaction_reference>
<partner_transaction_reference>1610952228</partner_transaction_reference>
<gd_barcode_id>629964901010005816100000000000</gd_barcode_id>
<gd_barcode_id_expiration>2021-04-18T06:44:12.277Z</gd_barcode_id_expiration>
<gd_barcode_payment_type>None</gd_barcode_payment_type>
<gd_barcode_type>BarcodeNumberForPrint</gd_barcode_type>
<gd_retailer_key>2480</gd_retailer_key>
<gd_retailer_name>7-Eleven</gd_retailer_name>
</barcode_response>