API reference

createPaymentIntent

Required permission: Authenticated

graphql
createPaymentIntent(
  orderIntentId: ID!
  input: PaymentIntentInput!
): PaymentIntent

Arguments

Name Type Description
orderIntentId ID!
input PaymentIntentInput!

Returns

PaymentIntent

Example

graphql
mutation CreatePaymentIntent($orderIntentId: ID!, $input: PaymentIntentInput!) {
  createPaymentIntent(orderIntentId: $orderIntentId, input: $input) {
    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 { createPaymentIntent(...) { __typename } }"}'