API reference
createPaymentIntent
Required permission: Authenticated
createPaymentIntent(
orderIntentId: ID!
input: PaymentIntentInput!
): PaymentIntentArguments
| Name | Type | Description |
|---|---|---|
orderIntentId |
ID! |
|
input |
PaymentIntentInput! |
Returns
Example
mutation CreatePaymentIntent($orderIntentId: ID!, $input: PaymentIntentInput!) {
createPaymentIntent(orderIntentId: $orderIntentId, input: $input) {
id
finalizeAccessToken
metadata
paymentProvider
receiptPaymentMethodLabel
state
}
}curl https://api.thelocoapp.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $LOCO_API_KEY" \
-d '{"query": "mutation { createPaymentIntent(...) { __typename } }"}'