Skip to main content
POST
Create a barcode for a cash transaction

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

An idempotency key is an arbitrary unique value generated by client to detect subsequent retries of the same request. It is recommended that a UUID or a similar random identifier be used as an idempotency key. A different key must be used for each request, unless it is a retry.

Example:

"7d943c51-e4ff-4e57-9558-08cab6b963c7"

Body

application/json

The barcode to be created.

account_id
string<uuid>
required

ID of the account for which the barcode is generated.

Example:

"123e4567-e89b-12d3-a456-426614174001"

customer_id
string<uuid>
required

ID of the customer for whom the barcode is generated.

Example:

"123e4567-e89b-12d3-a456-426614174000"

customer_latitude
number<float>
required

Latitude of the customer location.

Required range: -90 <= x <= 90
Example:

40.73061

customer_longitude
number<float>
required

Longitude of the customer location.

Required range: -180 <= x <= 180
Example:

-73.935242

type
enum<string>
required

Type of the barcode.

Available options:
CASH_DEPOSIT
external_device_id
string

ID of the external device used for the barcode generation.

Maximum string length: 64
Example:

"device123"

memo
string

A short memo that will be inherited by all transactions created with this barcode.

Maximum string length: 255
Example:

"Cash deposit - Downtown 5th Ave store"

metadata
object

Any additional custom metadata related to the barcode. * Can contain up to 10 key-value pairs with up to 200 characters each.

Response

Successful creation of a barcode

account_id
string<uuid>
required

ID of the account for which the barcode was generated.

Example:

"123e4567-e89b-12d3-a456-426614174001"

barcode_number
string
required

The generated barcode number.

Example:

"839650172948537162049873516238"

creation_time
string<date-time>
required

Timestamp of when the barcode was created.

Example:

"2023-10-01T12:00:00Z"

currency
enum<string>
required

ISO 4217 Alpha-3 currency code for the cash transaction.

Available options:
USD
customer_id
string<uuid>
required

ID of the customer for whom the barcode was generated.

Example:

"123e4567-e89b-12d3-a456-426614174000"

customer_latitude
number<float>
required

Latitude of the customer location.

Required range: -90 <= x <= 90
Example:

40.73061

customer_longitude
number<float>
required

Longitude of the customer location.

Required range: -180 <= x <= 180
Example:

-73.935242

id
string<uuid>
required

ID of the generated barcode.

Example:

"123e4567-e89b-12d3-a456-426614174002"

last_updated_time
string<date-time>
required

Timestamp of the last update to the barcode.

Example:

"2023-10-01T12:00:00Z"

max_amount
number<float>
required

Maximum amount for the cash transaction.

Example:

1000

min_amount
number<float>
required

Minimum amount for the cash transaction.

Example:

10

status
enum<string>
required

Status of the barcode.

Available options:
AVAILABLE,
REDEEMED,
BLOCKED
tenant
string
required

The id of the tenant containing the resource.

Example:

"abcdef_ghijkl"

timestamp_valid_to
string<date-time>
required

Timestamp indicating the expiration time of the barcode. Always set to 15 minutes after the creation time.

Example:

"2023-10-01T12:00:00Z"

type
enum<string>
required

Type of the barcode.

Available options:
CASH_DEPOSIT
external_device_id
string

ID of the external device used for the barcode generation.

Maximum string length: 64
Example:

"device123"

memo
string

A short memo that will be inherited by all transactions created with this barcode.

Maximum string length: 255
Example:

"Cash deposit - Downtown 5th Ave store"

metadata
object

Any additional custom metadata related to the barcode. * Can contain up to 10 key-value pairs with up to 200 characters each.