Skip to main content
POST
/
cash
/
barcodes
Create a barcode for a cash transaction
curl --request POST \
  --url https://api.synctera.com/v1/cash/barcodes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "account_id": "123e4567-e89b-12d3-a456-426614174001",
  "customer_id": "123e4567-e89b-12d3-a456-426614174000",
  "customer_latitude": 40.73061,
  "customer_longitude": -73.935242,
  "external_device_id": "device123",
  "metadata": {},
  "type": "CASH_DEPOSIT"
}'
{
  "account_id": "123e4567-e89b-12d3-a456-426614174001",
  "barcode_number": "839650172948537162049873516238",
  "creation_time": "2023-10-01T12:00:00Z",
  "currency": "USD",
  "customer_id": "123e4567-e89b-12d3-a456-426614174000",
  "customer_latitude": 40.73061,
  "customer_longitude": -73.935242,
  "external_device_id": "device123",
  "id": "123e4567-e89b-12d3-a456-426614174002",
  "last_updated_time": "2023-10-01T12:00:00Z",
  "max_amount": 1000,
  "metadata": {},
  "min_amount": 10,
  "status": "AVAILABLE",
  "tenant": "abcdef_ghijkl",
  "timestamp_valid_to": "2023-10-01T12:00:00Z",
  "type": "CASH_DEPOSIT"
}

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
required

Latitude of the customer location.

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

40.73061

customer_longitude
number
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 length: 64
Example:

"device123"

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
required

Latitude of the customer location.

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

40.73061

customer_longitude
number
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
required

Maximum amount for the cash transaction.

Example:

1000

min_amount
number
required

Minimum amount for the cash transaction.

Example:

10

status
enum<string>
required

Status of the barcode.

Available options:
AVAILABLE,
BLOCKED,
REDEEMED
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 length: 64
Example:

"device123"

metadata
object

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