API reference
createRefundIntent
Required permission: RestaurantOrderRefund
createRefundIntent(
input: RefundIntentInput
orderId: ID
restaurantId: ID!
): RefundIntentArguments
| Name | Type | Description |
|---|---|---|
input |
RefundIntentInput |
|
orderId |
ID |
MANDATORY: This field will be made mandatory in the future. |
restaurantId |
ID! |
Returns
Example
mutation CreateRefundIntent($restaurantId: ID!) {
createRefundIntent(restaurantId: $restaurantId) {
id
completedAt
createdAt
discountAmount
paymentProvider
tipAmount
}
}curl https://api.thelocoapp.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LOCO_API_KEY" \
-d '{"query": "mutation { createRefundIntent(...) { __typename } }"}'