Skip to main content

PaysafeCash Bulk Reusable Barcode API


This API gives the business partner, the possibility to generate and perform operations on multiple reusable barcodes with one API request, using CSV files.

Important: All files must be in a valid CSV format. The decimal separator can be provided at user convenience.

Test Environment and Production Endpoints

Every new business partner needs to first integrate the API in the test environment. Once the integration is finished, a UAT needs to be done in order to ensure a seemless integration flow.

EnvironmentEndpoint
Testhttps://bulk.test.paysafecard.com/v1/barcodes/
Productionhttps://bulk.paysafecard.com/v1/barcodes/

Payment process

  1. Submit a CSV file with POST /creation, POST /modification, or POST /cancellation. Include the Accept: application/json and notification_url headers so PaysafeCash can notify the business partner when processing completes.
  2. For bulk creation, the response returns a tracking_id.
  3. Use GET /json?tracking_id= to retrieve processed barcodes as JSON, or GET /file?tracking_id= to download the results.
  4. Provide retrieved barcodes to customers. Customers bring a barcode to a payment point, have it scanned, and pay the transaction amount.
  5. PaysafeCash creates and captures the payment and sends the reusable barcode webhook to the per-barcode webhook_url from the CSV.

CSV columns

ParameterTypeConstraintExampleDescription
amountnumberoptional10.00Amount the transaction is issued for.
max_amountnumberoptional50.00Max total amount that can be paid for a given barcode.
currencystringrequiredUSDISO 4217 (3 letter ISO currency code) - Currency in which the barcide is created for.
countrystringrequiredUSCountry in which the barcode is created for.
webhook_urlstringrequiredhttps://webhook.com/URL to post transaction updates to the business partner.
customer_idstringrequired3ncrypt3d3m41lUniquely identifies the customer and is provided by business partner. If any personal data (e.g. customer's user name, email address, etc.) is used here, it has to be encrypted or hashed for security reasons.
expire_timenumberrequired1756090825518Expiration time of the reusable barcode. Unix Timestamp in Milliseconds(ms).
correlation_idstringtest_correlation_id_12345Correlation ID supplied by the merchant in the CSV header row.

CSV header row:

amount, max_amount, currency, country, webhook_url, customer_id, expire_time, correlation_id

Example data rows:

100,150,USD,US,https://webhook.com/87e4134d-90b4-4084-8209-0280b2d11b6e,customerId,1756090825518,test_correlation_id_12345
150,200,USD,US,https://webhook.com/87e4134d-90b4-4084-8209-0280b2d11b6e,customerId1,1756090825518,test_correlation_id_23456
200,250,USD,US,https://webhook.com/87e4134d-90b4-4084-8209-0280b2d11b6e,customerId2,1756090825518,test_correlation_id_34567

Response parameters

ParameterTypeExampleDescription
barcodestring799366433670006371683106190078Barcode number.
creatednumber1694435820845Creation time of the reusable barcode. Unix Timestamp in Milliseconds(ms).
updatednumber1694435820845Update time of the reusable barcode. Unix Timestamp in Milliseconds(ms).
expiresnumber1756090825518Expiration time of the reusable barcode. Unix Timestamp in Milliseconds(ms).
visualizationstringCODE128Barcode visualization format.
countrystringUSCountry the barcode is generated for/can be paid in.
statusstringACTIVEBarcode status.
barcode_identifierstringfdde7bc9-6f68-43dc-95e1-bfc9aebae955_1694435820Identification value of the barcode.
correlation_idstringtest_correlation_id_34567Correlation ID sent in the initial request from merchant.