Physical card orders

To create an order in Toggle, make a mutation request to createOrder.

Take a look at the playground example >

Where should I get the card reference when creating an order?

The use-case here is that a POS operative would have a stack of unused cards (not associated with an order yet) on-site which would be keyed or swiped/scanned in as the card order is created on EPOS.

So to simulate this scenario while developing, you need some 'blank' cards to create orders with. If you haven't yet been provided any, ask our support team to create some card numbers, which we will provide to you as a CSV.

You can then use card numbers from the CSV during development, as if they were unsold stock on site.

You will also need to switch your account to use Magnetic Stripe cards under General Settings.

What product ID should you use?

All orders in Toggle are linked to a product. This would enable you to create a menu of product options to choose from when selling a gift card or experience.

There is an example query of how to retrieve a list of products on the API playground.

Alternatively, we do have a default product on every account which you can use if you wish to simply sell a single gift card product type and avoid the extra overhead of creating a menu of product options to choose from.

To retrieve the default product ID, use the same query as above and find a product called "In-store Gift". This Product ID will be unique per customer/client account, but you only need to retrieve and configure this id a single time as it will not change for an account once that account exists.

What value should I use for "total"?

This should equal the total of the cards being created. e.g. if a customer is buying 1x card for £20, the total would be 2000. If they are buying 2x £20 cards, and it’s being done as a single order, the total would be passed as 4000.

Common troubleshooting tips

Unit EPOS Reference errors

If you receive this validation response:

"unit_epos_reference" : [
 "This field is not of an expected value"
]

This is because the unit_epos_reference you are passing in to the createOrder mutation is not set up in Toggle yet, or is incorrectly typed in.

These references are site specific IDs that allow you to programmatically indicate back to Toggle which physical location this transaction is taking place in. We have an interface in Toggle where a user adds their sites/locations and specifies what the EPOS reference is for each one as they do so.

For example:

The card number generated isn't the one provided

If you create an order for a card and provide a card number, but the generated card number returned isn't the one you provided, check to make sure your Toggle account is set to use Magnetic Stripe cards under Settings > General.

Last updated