Skip to main content

PaysafeCash Reusable Barcode API


The business partner retrieves the PaysafeCash barcode (called "reusable barcode" going forward) using an API request and has full control on how the reusable barcode is displayed to the customer.

Reusable Barcode flow

In this section, the payment flow of a reusable barcode is shown.

reusable_barcode_flow

Group Payment Process

  1. generate Reusable Barcode: send POST request generate reusable barcodes

  2. barcode and other details are returned in response

  3. provide retrieved barcode to customer

  4. customer brings the barcode to a payment point, has it scanned and pays for the transaction amount.

  5. PaysafeCash creates and captures the payment

  6. Webhook notification delivery: Since the transaction is paid and the amount assigned to the transaction, PaysafeCash captures the payment on behalf of the business partner (transaction status "SUCCESS") and the webhook notification is sent(PAYMENT_CAPTURED).

  7. business partner verifies the webhook notification.

  8. Upon successfuly verifying the webhook notification, the business partner completes the transaction in its database and delivers the product/service to the customer.

Reusable Barcode Information

The following section provides additional information about the payment process.

Reusable barcode status

ValueDescription
ACTIVEThe initial state of a reusable barcode after it has been successfully created.
INUSEBarcode has been paid at least once
USEDThe barcode has reached the predefined maximum payment amount
INVALIDATEDBarcode has been invalidated by the partner
IDLEBarcode has expired without being used. It will stay in this state for 6 month and then switch to EXPIRED
EXPIREDAllowed timeframe to use the barcode for payments has elapsed.

HTTP status codes

CodeShort DescriptionDescription
200OKThe request was successful.
201CreatedObject successfully created.
400Bad RequestInvalid data provided in the request.
401UnauthorizedInvalid or expired API key.
403ForbiddenUnknown IP address.
404Not Found
500Internal Server ErrorThis indicates a general technical error on PaysafeCash's end.
501Not ImplementedVersion feature not implemented.
502Bad GatewayInvalid response from upstream system.
503Service UnavailableServer overloaded.
504Gateway TimeoutTimeout from upstream system.

Below is an example of an error response:

400 Bad Request

{
"code": "invalid_request_parameter"
"message": ""must contain 1-10 digits, followed by a decimal separator '.' followed by 2 digits",
"number": 10028,
"param": "amount"
}

customer id

Also known as "Merchant Client ID", the customer id is an important parameter for the integration of PaysafeCash.

The customer id identifies the Customer on our business partners side.

The most optimal customer id is a completely random value. A value that uniquely identifies the customer and is disconnected from any personal information.

This value should be the same for all transactions of the customer.

Here are Guidelines for possible customer ids:

Valid Values:

ValueType
2c3be0b50c7a5f1964a63d78f38a6ffc41c027e9SHA1 - test@123.com
742f2b1a55cd5d606ea44b4fcb54646aMD5 - test@123.com
3a5b0d0777dead9df93d502df85c8180e53804ebSHA1 - UsernameValue1
3192481752123Random Customer Identifier
CustomerID1Customer Identifier free of personal information

Invalid Values:

  • test@123.com
  • Username_1
  • FirstName123
  • LastName123
  • Timestamp
  • IP Address

Please note that sending any form of the invalid values will not be accepted.

If you intend to process payments on multiple brands, please inquire about the possibilities of separating multiple entities for your account.