Creating a URL

All SnapScan QR codes contain a SnapCode to identify the merchant. Additional parameters amount and id can be included to pre-populate the amount owed and a unique order number on the customers phone. These values will be associated with the payment as requiredAmount and merchantReference in the API.


Standard SnapCode

Your unique SnapCode will be displayed on your QR code stand or may be supplied by customer support. Let's say yours is "shopalot", your URL would look as follows:

Payment DetailValue
MerchantShopalot
SnapCodeshopalot

URL

https://pos.snapscan.io/qr/shopalot

Adding payment parameters

Used for online checkout, point-of-sale, vending machines and more.

In some cases, it is useful for the merchant to include the amount owed and a unique reference number to reconcile payments.

If a merchant wishes to embed the amount and reference of a payment so that this information is pulled through into the users app at payment - they simply add query parameters to the payment URL. For example:

Payment DetailValue
Merchant:Shopalot
SnapCode:shopalot
ID:Ord123
Amount:R10.00

URL

https://pos.snapscan.io/qr/shopalot?id=Ord123&amount=1000

Limiting successful payments to unique ID

To prevent the customer from successfully paying the same reference twice, and from paying less than the specified &amount= parameter, simply add &strict=true to the end of a payment URL.

Payment DetailValue
Merchant:Shopalot
SnapCode:shopalot
ID:Ord123
Amount:R10.00
Strict:true

URL

https://pos.snapscan.io/qr/shopalot?id=Ord123&amount=1000&strict=true

Adding redirect URLs

Used for online gateway payments to redirect the customer back to your website based on the payment outcome.

Redirect URLs can be added to the payment URL using the s_url, f_url, and r_url query parameters.

ParameterDescription
s_urlRedirect URL used after a successful payment
f_urlRedirect URL used after a failed payment
r_urlGeneral redirect URL used when an outcome-specific redirect URL has not been provided

For successful payments, the customer is redirected to s_url when provided; otherwise, r_url is used. For failed payments, the customer is redirected to f_url when provided; otherwise, r_url is used.

Example

https://pos.snapscan.io/qr/shopalot?id=Ord123&amount=1000&s_url=https://shopalot.example/payment/success&f_url=https://shopalot.example/payment/failed&r_url=https://shopalot.example/payment

When redirecting, the unique snapCodeReference of the payment is appended as merchant_reference to the redirect URL as a query parameter.

A successful payment using the example above would redirect to:

https://shopalot.example/payment/success?merchant_reference=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx

Adding extra parameters

You can add extra parameters to the payment URL. These details will be passed back under the extra attribute in payments.

https://pos.snapscan.io/qr/shopalot?customValue=123