paymentActivityById
Overview
This query takes in a payment ID as an input and returns the payment request or payment sent by the given ID.
Special Considerations
- ID used must correspond to a given payment
- ID does not have a limit or minimum character length, consisting of only letters and numbers
Inputs
paymentActivityByIdArgs
Required Data
id (required): string
Returns
Promise<PaymentEntry>
A promise containing the following object / data:
PaymentEntry: {
id: string,
type: PaymentEntryType,
subAmount: float
totalAmount: float,
totalFeeAmount: float,
description: string,
estimatedArrival: string,
valueDate: DateTime,
createdAt: DateTime,
message: string,
contact: Contact,
status: PaymentEntryStatus,
currency: CURRENCY,
reason: RefundReason,
refundType: RefundType,
paymentMethod: string,
tradeNumber: string,
savingsAmount: float,
sessionType: PaymentSessionType
originalPayment: OriginalPayment,
refunds: [RefundDisplayData],
paymentRequestLink: string,
refundLimitReached: boolean
}
Example
Running this query:
query {
paymentActivityById(id:"ckb8bx8js00re0772mykjh0ve") {
id
type
subAmount
totalAmount
description
valueDate
createdAt
contact {
email
}
status
currency
paymentRequestLink
}
}
Gives us:
{
"data": {
"paymentActivityById": {
"id": "ckb8bx8js00re0772mykjh0ve",
"type": "CREATED_PAYMENT_REQUEST",
"subAmount": 10,
"totalAmount": 10,
"description": "test",
"valueDate": "2020-06-09T19:40:41.981Z",
"createdAt": "2020-06-09T19:40:43.527Z",
"contact": {
"email": "docexample@getborderless.com"
},
"status": "REQUESTED",
"currency": "USD",
"paymentRequestLink": "http://localhost:8000/payment-request?id=ckb8bx8js00re0772mykjh0ve",
}
}
}
Common Errors
When running this query some of the common errors encountered include:
- There is no payment activity with this id. (I-4904)
- The id given from the input does not correspond to a payment