In this example, we will review how to change a payment draft. We will update counterparty and payment amount.
We are going to update the PAYM-21826
payment.
Payer information. In this example, the payer details remained the same as in the .
Updated counterparty details. The counterparty name, account information, and financial institution id were updated.
Updated payment amount.
To change the payment, use the following endpoint:
https://payment-api.sandbox.tuumplatform.com/api/v3/payments/{paymentId}/change
The sample request body is as follows:
{
"paymentParties": [
{
"typeCode": "OUR_PARTY",
"accountNumber": {
"value": "21824474",
"type": "BBAN"
},
"accountNumberCountryCode": "GB",
"financialInstitutionId": "608382",
},
{
"typeCode": "COUNTERPARTY",
"name": "Test Receiver",
"accountNumber": {
"value": "56497232",
"type": "BBAN"
},
"accountNumberCountryCode": "GB",
"financialInstitutionId": "BARCGB22"
}
],
"money": {
"amount": 20,
"currencyCode": "GBP"
}
}
curl --location 'https://payment-api.sandbox.tuumplatform.com/api/v3/payments/PAYM-21777/change' \
--header 'x-channel-code: SYSTEM' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHBpcnlEVGltZSI6IjIwMjQtMTEtMzBUMDI6NDc6MjYiLCJleHAiOjE3MzI5MzQ4NDYsInJvbGVzIjpbIkFETUlOIiwiUE9TVElOR1NfVEVBTSJdfQ.aZQf-Tf3Zro6Ri6_FD-izuqQ37MoDJKJmISkWeDyzSo' \
--header 'Content-Type: application/json' \
--data '{
"paymentParties": [
{
"typeCode": "OUR_PARTY",
"accountNumber": {
"value": "21824474",
"type": "BBAN"
},
"accountNumberCountryCode": "GB",
"financialInstitutionId": "608382"
},
{
"typeCode": "COUNTERPARTY",
"name": "Test Receiver",
"accountNumber": {
"value": "56497232",
"type": "BBAN"
},
"accountNumberCountryCode": "GB",
"financialInstitutionId": "BARCGB22"
}
],
"money": {
"amount": 20,
"currencyCode": "GBP"
}
}'
Below you will find the response to the sample request:
The payment draft with the paymentId: PAYM-21826
was updated. The payment status remained as INSERTED
.
After updating a payment draft, you have the following options:
Change the draft payment - modify the draft payment.
Confirm the draft payment - complete payment to initiate further payment processing.
Cancel the draft payment - discard the draft payment if it is no longer required.
...v3/payments/PAYM-21826/change
{
"typeCode": "OUR_PARTY",
"accountNumber": {
"value": "21824474",
"type": "BBAN"
},
"accountNumberCountryCode": "GB",
"financialInstitutionId": "608382"
}
{
"typeCode": "COUNTERPARTY",
"name": "Test Receiver",
"accountNumber": {
"value": "56497232",
"type": "BBAN"
},
"accountNumberCountryCode": "GB",
"financialInstitutionId": "BARCGB22"
}
"money": {
"amount": 20,
"currencyCode": "GBP"
}