API reference

createPaymentMethod

Required permission: RestaurantReportWrite

graphql
createPaymentMethod(
  restaurantId: ID!
  input: PaymentMethodInput!
): PaymentMethod

Arguments

Name Type Description
restaurantId ID!
input PaymentMethodInput!

Returns

PaymentMethod

Example

graphql
mutation CreatePaymentMethod($restaurantId: ID!, $input: PaymentMethodInput!) {
  createPaymentMethod(restaurantId: $restaurantId, input: $input) {
    id
    iconUrl
    isLegacy
    name
    paymentProvider
    receiptPaymentMethodLabel
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { createPaymentMethod(...) { __typename } }"}'