API reference

createRefundIntent

Required permission: RestaurantOrderRefund

graphql
createRefundIntent(
  input: RefundIntentInput
  orderId: ID
  restaurantId: ID!
): RefundIntent

Arguments

Name Type Description
input RefundIntentInput
orderId ID MANDATORY: This field will be made mandatory in the future.
restaurantId ID!

Returns

RefundIntent

Example

graphql
mutation CreateRefundIntent($restaurantId: ID!) {
  createRefundIntent(restaurantId: $restaurantId) {
    id
    completedAt
    createdAt
    discountAmount
    paymentProvider
    tipAmount
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { createRefundIntent(...) { __typename } }"}'