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.
| Environment | Endpoint |
|---|---|
| Test | https://bulk.test.paysafecard.com/v1/barcodes/ |
| Production | https://bulk.paysafecard.com/v1/barcodes/ |
Payment process
- Submit a CSV file with
POST /creation,POST /modification, orPOST /cancellation. Include theAccept: application/jsonandnotification_urlheaders so PaysafeCash can notify the business partner when processing completes. - For bulk creation, the response returns a
tracking_id. - Use
GET /json?tracking_id=to retrieve processed barcodes as JSON, orGET /file?tracking_id=to download the results. - Provide retrieved barcodes to customers. Customers bring a barcode to a payment point, have it scanned, and pay the transaction amount.
- PaysafeCash creates and captures the payment and sends the reusable barcode webhook to the per-barcode
webhook_urlfrom the CSV.
CSV columns
| Parameter | Type | Constraint | Example | Description |
|---|---|---|---|---|
amount | number | optional | 10.00 | Amount the transaction is issued for. |
max_amount | number | optional | 50.00 | Max total amount that can be paid for a given barcode. |
currency | string | required | USD | ISO 4217 (3 letter ISO currency code) - Currency in which the barcide is created for. |
country | string | required | US | Country in which the barcode is created for. |
webhook_url | string | required | https://webhook.com/ | URL to post transaction updates to the business partner. |
customer_id | string | required | 3ncrypt3d3m41l | Uniquely 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_time | number | required | 1756090825518 | Expiration time of the reusable barcode. Unix Timestamp in Milliseconds(ms). |
correlation_id | string | test_correlation_id_12345 | Correlation 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
| Parameter | Type | Example | Description |
|---|---|---|---|
barcode | string | 799366433670006371683106190078 | Barcode number. |
created | number | 1694435820845 | Creation time of the reusable barcode. Unix Timestamp in Milliseconds(ms). |
updated | number | 1694435820845 | Update time of the reusable barcode. Unix Timestamp in Milliseconds(ms). |
expires | number | 1756090825518 | Expiration time of the reusable barcode. Unix Timestamp in Milliseconds(ms). |
visualization | string | CODE128 | Barcode visualization format. |
country | string | US | Country the barcode is generated for/can be paid in. |
status | string | ACTIVE | Barcode status. |
barcode_identifier | string | fdde7bc9-6f68-43dc-95e1-bfc9aebae955_1694435820 | Identification value of the barcode. |
correlation_id | string | test_correlation_id_34567 | Correlation ID sent in the initial request from merchant. |