Create a card
To create an order in Toggle, make a mutation request to createOrder. The typical use cases for this type of integration are;
Digital sales - Toggle fulfils
Digital sales - Partner fulfils
Physical Sales - Toggles warehouse fulfils
If you would like Toggle to fulfil the email to the guest, then you will need to ensure that;
fulfilment_method_id= 1fulfilment_email= guest to receive gift card
mutation CreateOrder {
createOrder(
account_id: 1
currency: "GBP"
merchant_id: 24
group_fulfilment: true
auto_fulfil_group_fulfilment: false
group_fulfilment_postage_category_id: 576
group_fulfilment_address: {
name: "John Smith"
address_line_1: "123 made up street"
address_line_2: "Tixall"
town_city: "Sheffield"
postcode: "S01 1AA"
}
merchant_transaction_reference: "abc-def-123-123-423-aaasdf105"
unit_epos_reference: "2251799825000010"
total: 6000
sales_channel_id: 3
order_items: [
{
product_id: 3983
custom_price_modifier_value: 5000
fulfilment_method_id: 2
generate_card_reference: false
message: "This is my personal message!"
}
]
receipt_contact: {
email: "[email protected]"
first_name: "john"
last_name: "smith"
}
) {
id,
LineItems{
id
Card{
id
card_reference
pin
balance
expiry_time
card_alias_card_reference
product_name
}
}
}
}
If you would like to fulfil the email to the guest, then you will need to ensure that;
fulfilment_method_id= 8
The card reference can be specified to return in the response, which can then be passed onto the guest.
If you would like Toggle to fulfil the email to the guest, then you will need to ensure that;
fulfilment_method_id= 2auto_group_fulfilment= false (Physical orders are fulfiled by our warehouse, so this is set to true by them once the card is sent)group_fulfilment_postage_cagegory_id= This can be obtained from the get Products call, as different products can have different postage optionsgroup_fulfilment_address= The address which the gift card should be delivered tototal= This needs to be the total value of the order (custom_price_modifier_value+discountif applicable + postage amount)receipt_contact= optional, if you want Toggle to send a confirmation to the guest on purchase
Last updated