updatePaymentSession
Overview
This mutation takes the inputs and updates payment session amount, description, or email message. All fields must be updated before submitting (i.e. submitPaymentSession mutation).
Special Considerations
- Payment session must be created before using updatePaymentSession mutation
- Payment session must be updated before using submitPaymentSession mutation
Inputs
updatePaymentSessionArgs
Required Data
amount: float
description: string
emailMessage (optional): string
popCode (optional): string
payerAcceptedFees (optional): boolean
value: dateTime
quoteBasis (optional): string
Returns
Promise<UpdatePaymentSessionResult>
A promise containing either a success message:
message: string
or a call for more data:
dataNeeded: dataNeededForPayment
balanceRefreshRequired: balanceRefresh
Example
Running this mutation:
mutation {
updatePaymentSession (data: {
amount: 25
description: "test"
popCode: "COMM"
valueDate: "2020-06-06"
}) {
... on SuccessResult {
message
}
... on ActionRequiredForPayment {
dataNeeded {
idUpload
personalTaxId
}
balanceRefreshRequired {
providerAccountId
bankAccountId
type
}
}
}
}
Gives us:
{
"data": {
"updatePaymentSession": {
"message": "Payment session successfully updated"
}
}
}
Common Errors
When running this mutation some of the common errors encountered include:
Invalid session id (I-4713)
- You've may not have created a payment session before trying to update the payment session
POP Code is required for payments to personal accounts. I-4735
- The payment class is either business to person or person to person and the pop code is not defined
The selected date cannot be before today.
- A payment is scheduled to take place in the past
You cannot schedule a payment more than a year in advance from the current day.
- A payment is scheduled to take place in over a year from today's date
Contact our support team to enable international scheduled payments for your account. (I-4731)
- The payer's currency is not equal to the beneficiary's currency