API reference

cancelPaymentIntent

Required permission: Authenticated

graphql
cancelPaymentIntent(
  paymentIntentId: ID!
): PaymentIntent

Arguments

Name Type Description
paymentIntentId ID!

Returns

PaymentIntent

Example

graphql
mutation CancelPaymentIntent($paymentIntentId: ID!) {
  cancelPaymentIntent(paymentIntentId: $paymentIntentId) {
    id
    finalizeAccessToken
    metadata
    paymentProvider
    receiptPaymentMethodLabel
    state
  }
}
bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { cancelPaymentIntent(...) { __typename } }"}'