Get Payment Intents
With this endpoint, you can obtain the payments intents filtered. Sandbox or production environment will be selected by apiKey passed as authentication.
Uri
https://backend.turinlabs.com/graphql
Headers
{
"apiKey": "turinpay_sk_test_eee78-de9e-4e84-b2e6-fc2ae0687"
}
GraphQL Query
query GET_PAYMENT_INTENTS_QUERY($input: GetPaymentIntentsInput) {
getTPayPaymentIntents(input: $input) {
__typename
... on TPayPaymentIntentItems {
items {
id
userId
notificationUrl
orderId
currency
price
description
createdAt
executionEnvironment
invoiceExpirationTimeMin
active
multipleInvoicesAllowed
onlyLN
initDate
endDate
}
metadata {
offset
limit
orderBy
orderDirection
numElements
page
pages
}
}
... on Error {
code
message
description
}
}
}
Variables (sample)
{
"input": {
"offset": 0,
"limit": 10,
"orderBy": "orderId",
"orderDirection": "ASC"
}
}
Parameters description
id: (optional) pass the id of a payment intent to obtain only info related to this payment intent
notificationUrl: (optional) pass the notificationUrl used by TurinPay to communicate the event when an invoice has been paid.
orderId: (optional) orderId related to the Payment Intent
currency: (optional) currency associated to the Payment Intent
priceFrom: (optional) select Payment Intents with price equal or greater than this value
priceTo: (optional) select Payment Intents with price equal or lower than this value
invoiceExpirationTime: (optional) select Payment Intents with this value
active: (optional) select Payment Intents with active flag set with this value
multipleInvoicesAllowed: (optional) select Payment Intents with this flag value
onlyLN: (optional) select Payment Intents with this flag value
initDateFrom: (optional) select Payment Intents with initDate equal or greater than this value
initDateTo: (optional) select Payment Intents with initDate equal or lower than this value
endDateFrom: (optional) select Payment Intents with endDate equal or greater than this value
endDateTo: (optional) select Payment Intents with endDate equal or lower than this value
offset: (optional, 0 as default value) number of elements that you want leave before the first element that will appear in the search result.
limit: (optional, 10 as default value) max number of elements in each page of the result
orderBy: (optional, dateFrom as default value) field used in the ordering of the elements returned by the endpoint
orderDirection: (optional, DESC as default value) field used in the ordering sense. Values allowed are DESC and ASC
Last updated