Create a card

Simple card creation

Configuration

Variable

Description

account_id

sales_channel_id

Sales channels allow reporting by the source of an order. Commonly used are:

3 - In store

5 - B2B

7 - Guest Gratuity

product_id

merchant_id

Orders can be linked back to specific merchants. You can use 26 as a catch-all "third party" merchant. But if you are an official Toggle partner, you'll have been issued your own merchant_id.


mutation(
  $account_id                   : Int!
  $order_items                  : [OrderItemInput]!
  $total                        : Int!
  $currency                     : String!
  $group_fulfilment             : Boolean!
  $sales_channel_id             : Int!
  $auto_fulfil_group_fulfilment : Boolean!
  $merchant_id                  : Int!
  
) {
  createOrder(
    account_id                   :   $account_id,  
    order_items                  :   $order_items,
    total                        :   $total,
    currency                     :   $currency,
    group_fulfilment             :   $group_fulfilment,
    sales_channel_id             :   $sales_channel_id,
    auto_fulfil_group_fulfilment :   $auto_fulfil_group_fulfilment,
    merchant_id                  :   $merchant_id
  ) {
    LineItems{
        Card{
            id,
            card_reference,
            pin,
            balance
        }
    }
  }
}

Last updated