Cancel or refund a transaction.
curl --request PATCH \
--url https://virtserver.swaggerhub.com/BangoProducts/payment-provider_api/1.0.1/transaction/{transactionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userIdentifier": "987654321",
"paymentMethods": [
"OPERATORBILLING"
],
"paymentItem": {
"itemName": "My item",
"itemDescription": "My item description",
"itemCategory": "1",
"externalPaymentItemId": "abcd-1234",
"price": {
"grossAmount": "3.99",
"currencyIso3": "USD",
"financialBreakdown": {
"taxAmount": "0"
}
}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userIdentifier: '987654321',
paymentMethods: ['OPERATORBILLING'],
paymentItem: {
itemName: 'My item',
itemDescription: 'My item description',
itemCategory: '1',
externalPaymentItemId: 'abcd-1234',
price: {grossAmount: '3.99', currencyIso3: 'USD', financialBreakdown: {taxAmount: '0'}}
}
})
};
fetch('https://virtserver.swaggerhub.com/BangoProducts/payment-provider_api/1.0.1/transaction/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://virtserver.swaggerhub.com/BangoProducts/payment-provider_api/1.0.1/transaction/{transactionId}"
payload = {
"userIdentifier": "987654321",
"paymentMethods": ["OPERATORBILLING"],
"paymentItem": {
"itemName": "My item",
"itemDescription": "My item description",
"itemCategory": "1",
"externalPaymentItemId": "abcd-1234",
"price": {
"grossAmount": "3.99",
"currencyIso3": "USD",
"financialBreakdown": { "taxAmount": "0" }
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"responseCode": "REFUNDED",
"responseMessage": "The transaction was refunded successfully."
}Transaction
Cancel or refund a transaction.
Resource used to cancel or refund a transaction.
PATCH
https://virtserver.swaggerhub.com/BangoProducts/payment-provider_api/1.0.1
/
transaction
/
{transactionId}
Cancel or refund a transaction.
curl --request PATCH \
--url https://virtserver.swaggerhub.com/BangoProducts/payment-provider_api/1.0.1/transaction/{transactionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userIdentifier": "987654321",
"paymentMethods": [
"OPERATORBILLING"
],
"paymentItem": {
"itemName": "My item",
"itemDescription": "My item description",
"itemCategory": "1",
"externalPaymentItemId": "abcd-1234",
"price": {
"grossAmount": "3.99",
"currencyIso3": "USD",
"financialBreakdown": {
"taxAmount": "0"
}
}
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userIdentifier: '987654321',
paymentMethods: ['OPERATORBILLING'],
paymentItem: {
itemName: 'My item',
itemDescription: 'My item description',
itemCategory: '1',
externalPaymentItemId: 'abcd-1234',
price: {grossAmount: '3.99', currencyIso3: 'USD', financialBreakdown: {taxAmount: '0'}}
}
})
};
fetch('https://virtserver.swaggerhub.com/BangoProducts/payment-provider_api/1.0.1/transaction/{transactionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://virtserver.swaggerhub.com/BangoProducts/payment-provider_api/1.0.1/transaction/{transactionId}"
payload = {
"userIdentifier": "987654321",
"paymentMethods": ["OPERATORBILLING"],
"paymentItem": {
"itemName": "My item",
"itemDescription": "My item description",
"itemCategory": "1",
"externalPaymentItemId": "abcd-1234",
"price": {
"grossAmount": "3.99",
"currencyIso3": "USD",
"financialBreakdown": { "taxAmount": "0" }
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"responseCode": "REFUNDED",
"responseMessage": "The transaction was refunded successfully."
}Authorizations
This API uses OAuth 2 with clientCredentials.
Headers
Request unique identifier. If present, this id will be used for idempotency.
Path Parameters
Body
application/json

