Get payment information
You can query information about a single payment and multiple payments using the API.
You need a project access token run these queries.
Multiple payments​
Get information about multiple payments using the API.
This sample queries the project's Rejected payments.
- Call the
paymentsquery. - Add all the information you'd like to review.
- The sample query uses several
paymentsquery options, including filtering for onlyRejectedpayments.
- The sample query uses several
- Add optional messages to the success payload, either for validation or in case of rejection.
- The sample query adds a more thorough
Rejectedpayload.
- The sample query adds a more thorough
Query​
Open in API Explorerquery RejectedPayments {
payments(filters: { status: Rejected }) {
edges {
node {
createdAt
id
statusInfo {
status
... on PaymentRejected {
__typename
reason
status
}
}
updatedAt
}
}
totalCount
}
}
Payload​
Review all Rejected payments for your project and the reason for rejection.
{
"data": {
"payments": {
"edges": [
{
"node": {
"createdAt": "2023-03-30T14:12:18.874Z",
"id": "$PAYMENT_ID",
"statusInfo": {
"status": "Rejected",
"__typename": "PaymentRejected",
"reason": "Expired"
},
"updatedAt": "2023-03-30T14:12:18.989Z"
}
},
{
"node": {
"createdAt": "2023-03-30T14:12:18.874Z",
"id": "$PAYMENT_ID",
"statusInfo": {
"status": "Rejected",
"__typename": "PaymentRejected",
"reason": "AccountNotFound"
},
"updatedAt": "2023-03-30T14:12:18.989Z"
}
},
],
"totalCount": 2
}
}
}
Single payment​
Get information about a single payment using the API.
- Call the
paymentquery. - Enter the payment ID for the payment you're querying.
- Add all the information you'd like to review. The sample query uses several
paymentquery options. - Add optional messages to the success payload, either for validation or in case of rejection.
Query​
Open in API Explorerquery PaymentInfo {
payment(id: "$YOUR_PAYMENT_ID") {
createdAt
id
statusInfo {
status
... on PaymentRejected {
__typename
reason
status
}
}
transactions {
totalCount
edges {
node {
amount {
currency
value
}
}
}
}
updatedAt
}
}
Payload​
View all the requested information about the single payment.
{
"data": {
"payment": {
"createdAt": "2023-05-03T12:34:05.227Z",
"id": "$PAYMENT_ID",
"statusInfo": {
"status": "Initiated"
},
"transactions": {
"totalCount": 1,
"edges": [
{
"node": {
"amount": {
"currency": "EUR",
"value": "250.00"
}
}
}
]
},
"updatedAt": "2023-05-03T12:34:05.227Z"
}
}
}