paymentRequestById
Overview
This query takes in a payment ID as an input and searches all payment requests from the given ID.
Special Considerations
- ID used must correspond to a given payment request
- ID does not have a limit or minimum character length, consisting of only letters and numbers
Inputs
paymentRequestByIdArgs
Required Data
id: string
Returns
Promise<PublicPaymentRequest>
A promise containing the following object / data:
PublicPaymentRequest: {
status: PublicPaymentRequestStatus,
currency: CURRENCY,
amount: float,
description: string,
createdBy: Contact,
chargeDate: DateTime,
requestToDisplayName: string,
redirectURL: string
}
Example
Running this query:
query {
paymentRequestById(id:"ckb8bx8js00re0772mykjh0ve") {
status
currency
amount
description
createdBy {
account {
accountType
displayName
currency
slug
}
email
}
chargeDate
requestedToDisplayName
redirectUrl
}
}
Gives us:
{
"data": {
"paymentRequestById": {
"status": "REQUESTED",
"currency": "USD",
"amount": 10,
"description": "test",
"createdBy": {
"account": {
"accountType": "BUSINESS",
"displayName": "test business",
"currency": "USD",
"slug": "test"
},
"email": null
},
"chargeDate": "2020-06-09T19:40:41.981Z",
"requestedToDisplayName": "docexample@getborderless.com",
"redirectUrl": null
}
}
}
Common Errors
N/A