---
title: "Create a barcode for cash deposit or payment"
method: POST
path: "/v2/Barcode"
tags: ["Barcode"]
---

# Create a barcode for cash deposit or payment

`POST /v2/Barcode`

Creates a barcode number or barcode link for a cash deposit or cash payment transaction.

## Headers

- `x-gdn-programnumber` string, required
- `x-gdn-channeltype` string, required
- `x-gdn-longitude` string
- `x-gdn-latitude` string
- `x-gdn-devicetype` string, required
- `x-gdn-deviceid` string
- `x-gdn-messageid` string, required
- `x-gdn-sessionid` string
- `x-gdn-encryptiontype` string, required
- `x-gdn-signature` string, required
- `x-gdn-ipaddress` string, required
- `x-gdn-timestamp` string, required

## Request body

- BarcodeRequest
  - `gd_retailer_key` integer — Retailer 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_type` 0 | 1 | 2 | 3 | 4 — 1-BarcodeLink, 2-BarcodeForPrint, 3-BarcodeForView, 4-MultiUseBarcode
  - `gd_barcode_payment_type` 0 | 1 | 2 | 3 — 0-None, 1-Deposit, 2-Payment, 3-Debit
  - `amount` number, double — Amount for which the barcode is being generated
  - `amount_match_type` 0 | 1 | 2 — 0-No constraint, 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 amount parameter. By default, amount_match_type is 0.
  - `partner_transaction_reference` string — Transaction Reference for the current transaction (eg send money request, etc). This is the reference generated/maintained by Partner. GD will use it for audit purposes.
  - `sender_customer_ref` string — Identifier/Reference which the partner generates for the source (/sender) of this transaction. Eg., If A is trying to send money to B, this is an identifier/ reference of A's account.
  - `sender_first_name` string — First Name of the sender
  - `sender_last_name` string — Last Name of the sender
  - `sender_email` string — Email address of the sender
  - `sender_phone` string — phone number of the sender
  - `sender_address` string — address of the sender
  - `sender_zipcode` string — Zip code of the sender
  - `recipient_customer_ref` string — Identifier/Reference which the partner generates for the target (/receiver) of this transaction. Eg., If A is trying to send money to B, this is an identifier/ reference of B's account.
  - `recipient_first_name` string — First Name of the target account
  - `recipient_last_name` string — Last Name of the target account
  - `recipient_email` string — Email address of the recipient
  - `recipient_phone` string — phone number of the recipient
  - `recipient_address` string — address of the recipient
  - `recipient_zipcode` string — Zip code of the recipient
  - `notification_channel_type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 — 0 - none, 1 - SMS, 2 - Email
  - `extensioninfos` object — Extension Infos

## Response `200`

OK

- BarcodeV2Response
  - `gd_barcode_link` string — Complete Barcode link for Barcode link code
  - `gd_barcode_id` string — Barcode number or Barcode link code based on the type of barcode generated
  - `gd_barcode_id_expiration` string, date-time — Expiration datetime of the barcode or barcode link based on the type selected
  - `gd_retailer_key` integer — Retailer selected for generating the barcode
  - `gd_barcode_type` 0 | 1 | 2 | 3 | 4 — barcode type. 1-BarcodeLink, 2-BarcodeForPrint, 3-BarcodeForView, 4-MultiUseBarcode
  - `gd_barcode_payment_type` 0 | 1 | 2 | 3 — 0-None, 1-Deposit, 2-Payment, 3-Debit
  - `gd_retailer_name` string — Retailer against which the barcode is generated
  - `partner_transaction_reference` string — partner_transaction_reference TransactionReference of the partner if the partner passes this information
  - `gd_transaction_reference` string — gd_transaction_reference Unique reference for this transaction generated by Gd
  - `gd_response_code` integer — gd_response_code
  - `gd_response_message` string — gd_response_message Custom text describing the success or failure of the API.
  - `gd_response_date` string, date-time — gd_response_date Response date time in UTC

---

[API](https://skmtc.net/greendot/apis/baas-apis.md) · [All operations](https://skmtc.net/greendot/apis/baas-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/greendot/baas-apis/revisions/666553766b78/schema)
