NAV
shell

Introduction

Welcome to the Strikepay API! Strikepay is a cashless tipping and payments platform. You can learn more about how Strikepay can work for you, your team, or your business at www.strikepay.co

The current API version is 2023-01-16. We currently support the following current and historic API versions: * 2023-01-16

If you have any questions about our API, or how you can integrate with Strikepay, please contact developers@strikepay.co

Tags

What is a tag?

A tag is a payment page. It represents a single location or interface. A business or individual may have multiple tags. In order to understand where a tip or payment was made (e.g. multi location, multiple outlets) a team may choose to have multiple tags. One use case is that a food delivery platform may have many drivers. Each will have their own tag, and should have their own Strikepay One account.

How do I create my own tags?

You need to contact us as developers@strikepay.co to get allocated a template id. Once you have your "template", we will set it up so you can connect your webhooks and start calling our APIs.

Using your allocated template id, you can generate as many tags as you wish. A tag is created from a URI that you can make yourself. The tag must be unique within the scope of your assigned template. Here's an example:

https://pay.strikepay.co/tags/pay?uid=any-unique-id

https://pay.strikepay.co/tags/{template}?uid={uid}

If you want to prompt your cilents to return to a specified page on your site after activating the tag, just add the url parameter to the Tag link:

https://pay.strikepay.co/tags/{template}?uid={uid}&url={url}

Parameter Description
template Your allocated template
uid Your own generated unique id to identify your client
url Your own url that returns a client back to your specified page

When you click on a link that is not activated, your client will first be asked to "Connect" or "Activate" the tag for their own Strikepay One account. Once the tag is activated, anyone you that uses that link will be able pay using the tag specific custom checkout page.

To view your tag (page) as a QR code, use the following url construction. Use /qr and add /png before the query parameters. You can any the query parameters you need, and they will be included in the link encoded in the QR code.

Here's the simplest QR code PNG link: https://pay.strikepay.co/qr/{template}/png?uid={uid}

You can use the link in an <img /> tag as the src parameter.

<img src="https://pay.strikepay.co/qr/{template}/png?uid={uid}" alt="Scan QR Code" />

Scan QR Code This QR image is displayed using a team tag link: <img src="https://pay.strikepay.co/qr/Generic/png?uid=E2911TAPITAG1T-2" alt="Scan QR Code" />

What happens after a tag is activated?

Once a Tag is activated, and you've had us setup you webhooks, you will get a tag_claimed webhook. With this your platform will know that a Tag is claimed and can now be used to accept payments. This tells you that a client of your platform has connected their Strikepay One account to this Tag. You can now use this unique Tag link on your website or app to allow your clients to receive payments.

If you used the link with the url parameter, the url you specified we will redirect to that page and add some query parameters to help identify the purpose of tag link.

{url}?uid={uid}&status={status}&template={template}

URL Parameters passed to your page when chosen by the client

Parameter Description
url The url you provided on the link
uid The uid you provided on the link
template Your allocated template
status The resulting status of the new tag, will always be live

Get a Specific Tag

curl "https://pay.strikepay.co/api/tags/myTagId"

The above command returns JSON structured like this:

{
    "id": "test-payment---test1",
    "clientId": "clientId",
    "displayName": "Test User",
    "placeOfWork": "Strikepay",
    "product": "payment",
    "tagUid": "test1",
    "templateTagId": "test-payment",
    "is_test": true,
    "apiVersion": "2023-01-16"
}

HTTP Request

GET https://pay.strikepay.co/api/tags/{tagId}

URL Parameters

Parameter Description
tagId The ID of tag

Taps

What is a tap?

A tap is a unique instance of payment. A tap represents the action of making a payment and has a lifecycle starting at the initial tap or scan of a tag, through to its final state following a successful payment.

How does a Tap get created from a Tag?

Once your Tag is activated, the link is live, anyone can start making payments to the Tag holder using the same link that was used by the holder to activate it. Anyone making a payment using a Tag will get a unique session called a Tap which is unique to that session and customer payment. Subscribing to the payment_success webhook will let your platform know when a successful payment was made to a Tag with your templateTagId.

Using yor templateTagId, you can generate as many tags as you wish. For each Tag you can create as many Tap links are you like using your own custom refId. A tag link is created from the Tag URI that you can make yourself and all you need to do is add the refId query parameter to the link. You can then use that refId to query the Tap we create during the payment process. Here's an example:

https://pay.strikepay.co/tags/pay?uid=any-unique-id&refId=your-session-id

https://pay.strikepay.co/tags/{templateTagId}?uid={uid}

Parameter Description
templateTagId Your allocated template
uid Your own generated unique id to identify your client

&amount={amount}&name={name}&reference={reference}&refId={refId}&fee={fee}&cs={cs}

Parameter Description
amount Amount in cent to pay (optional)
name Pre-fills the Name field
reference Pre-fills the Message field
refId The reference ID (refId) passed is generated by you and must be unique per session
fee Fee amount in cent (optional)
cs Checksum value to validate fee and amount (required in conjuntion with fee)

&total={total}&bid={bid}&refId={refId}&amount={amount}

Parameter Description
amount Amount in cent to pay (optional)
total Uses this to pre-fill the Bill amount (total) field (to calculate percentage tipping)
bid Unique Bill ID (bid) to identify the chekc our bill ID (for POS integration)
refId The reference ID (refId) passed is generated by you and must be unique per session

Get a Specific Tap by its tapId

curl "https://pay.strikepay.co/api/tags/myTagId/tapId"

The above command returns JSON structured like this:

{
    "id": "DmdS9W8zQwrPQmWSRbJm",
    "tagId": "test-payment---test1",
    "amount": 1000,
    "currency": "EUR",
    "created": "2022-05-09T15:44:40.000Z",
    "feesPaid": true,
    "fee": 1,
    "netAmount": 100,
    "status": "available",
    "name": "Test User",
    "reference": "My payment reference",
    "refId": "abcd1234-4140-4910-b6b5-8f4e9d31d113",
    "apiVersion": "2023-01-16"
}

HTTP Request

GET https://pay.strikepay.co/api/tags/{tagId}/{tapId}

URL Parameters

Parameter Description
tagId The ID of tag
tagId The ID of the tap

Get All Taps matching refId

curl "https://pay.strikepay.co/api/tags/myTagId/ref/refId"

The above command returns JSON structured like this:

[
  {
    "id": "DmdS9W8zQwrPQmWSRbJm",
    "tagId": "test-payment---test1",
    "amount": 1000,
    "currency": "EUR",
    "created": "2022-05-09T15:44:40.000Z",
    "feesPaid": true,
    "fee": 1,
    "netAmount": 100,
    "status": "available",
    "name": "Test User",
    "reference": "My payment reference",
    "refId": "abcd1234-4140-4910-b6b5-8f4e9d31d113",
    "apiVersion": "2023-01-16"
  }
]

The refId parameter is passed to the tap on its creation (e.g. using &refId=1234 in the pay link). While your design should use a universally unique refId, such as an order or invoice number, an array is returned. The array includes all successful taps that match the refId. Incomplete taps with a status of 'created' indicate started but unpaid sessions so only taps with a status of 'pending' or 'available' should be considered to have been paid.

HTTP Request

GET https://pay.strikepay.co/api/tags/{tagId}/ref/{refId}

URL Parameters

Parameter Description
tagId The ID of tag
refId The reference ID (refId) passed in at tap creation

Webhooks

Why use webhooks?

When integrating with Strikepay, it's very likely that you'll want to be notified in realtime, or close to realtime, about new events that take places in Strikepay relating to your account, tags, or taps. Note that, as with many other webhooks, Strikepay works on an 'at least once delivery' principal. This means that webhooks will be sent at least once so your system should do any deduplication logic on payment events. It should also be noted that webhook events will be attempted 4 times over a window of approximately 60 minutes, and then marked as failed. If you identify that your API was not able to receive webhooks for 60 minutes and your webhook events failed, get in touch as these can be manually re-triggered and are not lost forever. Strikepay will only mark a webhook as successfully sent if the endpoint specified returns an HTTP 200 response. If webhooks are configured to go to the same endpoint for all events they can be differentiated by using the event property. The apiVersion will also be present in all payloads and can be used to check validity of the payload against the standard documented here. At the moment we only have one version but in the future if Strikepay introduce a breaking change, backward compatibility will be maintained for a documented period of time and you will be notified.

Payment webhook

The webhook payload for payment_success will look like this:

{
  "apiVersion": "2023-01-16",
  "event": "payment_success",
  "fee": 24,
  "status": "pending",
  "netAmount": 400,
  "id": "voLmYEgSNAnxoV0p0R2P",
  "currency": "EUR",
  "reference": null,
  "name": null,
  "created": 1673892760,
  "tagId": "test-tipping---testJack2",
  "feePaid": true,
  "amount": 400,
  "refId": null
}

If you have configured a webhook on successful payment, you will receive a payload outlining a summary of the payment that was made. The will include the amount, the fees, and any effect on the net amount (netAmount), as well as any metadata provided regarding customer name, reference or refId (as set by the payee).

Tag claimed webhook

The webhook payload for tag_claimed will look like this:

{
  "apiVersion": "2023-01-16",
  "event": "tag_claimed",
  "email": "jack+1@strikepay.co",
  "tagId": "test-tipping---testJack2",
  "created": 1673892647,
  "templateTagId": "test-tipping",
  "displayName": "Jack Spargo",
  "clientId": "l0buIJa3Ajh9SIQrM8au",
  "currency": "EUR"
}

If you have a template tag configured with a webhook configuration for tag_claimed then you will receive a webhook event whenever one of your tags is successfully claimed by a client. The payload will contain a short summary of the tag and information about the claiming client.

Errors

The Strikepay API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The resource requested is hidden for administrators only.
404 Not Found -- The specified resource could not be found.
429 Too Many Requests -- You've hit the request limit for your API key. Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.