Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

Skip to main content

Get payment information

You can query information about a single payment and multiple payments using the API.

Prerequisites

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.

  1. Call the payments query.
  2. Add all the information you'd like to review.
    • The sample query uses several payments query options, including filtering for only Rejected payments.
  3. Add optional messages to the success payload, either for validation or in case of rejection.
    • The sample query adds a more thorough Rejected payload.

Query​

Open in API Explorer
query 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.

  1. Call the payment query.
  2. Enter the payment ID for the payment you're querying.
  3. Add all the information you'd like to review. The sample query uses several payment query options.
  4. Add optional messages to the success payload, either for validation or in case of rejection.

Query​

Open in API Explorer
query 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"
}
}
}