On This Page
Refunds with Level III Data
This section shows you how to process a
refund
with Level III data. You must request a
refund
within 60 days of the authorization. Endpoint
Production:
POST
https://api.cybersource.com
/pts/v2/payments/{id}
/refundsTest:
POST
https://apitest.cybersource.com
/pts/v2/payments/{id}
/refundsThe is the transaction ID
returned in the capture or sale response.
{id}
Required Fields for Processing a Refund with Level III Data
- buyerInformation.vatRegistrationNumber
- merchantInformation.merchantDescriptor.address1
- merchantInformation.merchantDescriptor.country
- Barclayssupports UK-based merchants only. The country code must be set toGB.
- merchantInformation.merchantDescriptor.locality
- merchantInformation.merchantDescriptor.name
- merchantInformation.merchantDescriptor.postalCode
- orderInformation.amountDetails.taxAmount
- orderInformation.billTo.address1
- orderInformation.billTo.company
- orderInformation.billTo.company.name
- orderInformation.billTo.country
- orderInformation.billTo.email
- orderInformation.billTo.firstName
- orderInformation.billTo.lastName
- orderInformation.billTo.locality
- orderInformation.invoiceDetails.invoiceDate
- orderInformation.invoiceDetails.supplierOrderReference
- orderInformation.lineItems[].productName
- orderInformation.lineItems[].quantity
- orderInformation.lineItems[].taxAmount
- orderInformation.lineItems[].taxRate
- orderInformation.lineItems[].taxTypeCode
- orderInformation.lineItems[].totalAmount
- orderInformation.lineItems[].unitOfMeasure
- orderInformation.lineItems[].unitPrice
- orderInformation.shipTo.address1
- Required if anyorderInformation.shipTofields are included.
- orderInformation.shipTo.company
- orderInformation.shipTo.company
- Required if anyorderInformation.shipTofields are included.
- orderInformation.shipTo.firstName
- Required if anyorderInformation.shipTofields are included.
- orderInformation.shipTo.lastName
- Required if anyorderInformation.shipTofields are included.
- orderInformation.shipTo.postalCode
- Required if anyorderInformation.shipTofields are included.
- paymentInformation.card.expirationMonth
- paymentInformation.card.expirationYear
- paymentInformation.card.number
- processingInformation.purchaseLevel
- Set field to3.
Optional Fields for Processing a Refund with Level III Data
- buyerInformation.merchantCustomerId
- merchantInformation.merchantDescriptor.contact
- merchantInformation.merchantDescriptor.county
- merchantInformation.vatRegistrationNumber
- orderInformation.billTo.address2
- orderInformation.billTo.address3
- orderInformation.billTo.address4
- orderInformation.invoiceDetails.costCenter
- orderInformation.invoiceDetails.purchaseOrderDate
- orderInformation.invoiceDetails.purchaseOrderNumber
- orderInformation.invoiceDetails.referenceDataNumber
- orderInformation.lineItems.productSku
- orderInformation.lineItems[].commodityCode
- orderInformation.shipTo.address1
- orderInformation.shipTo.address2
- orderInformation.shipTo.address3
- orderInformation.shipTo.address4
- orderInformation.shipTo.country
- orderInformation.shipTo.administrativeArea
- orderInformation.shipTo.firstName
- orderInformation.shipTo.lastName
- orderInformation.shipTo.locality
- orderInformation.shipTo.postalCode
- paymentInformation.card.type
- paymentInformation.method
REST Example: Processing a Refund with Level III Data
Request
{ "clientReferenceInformation": { "code": "Simple Refund Invoice" }, "processingInformation": { "purchaseLevel": "3" }, "orderInformation": { "amountDetails": { "totalAmount": "112.00", "currency": "GBP", "taxAmount": "18.67" }, "billTo": { "firstName": "Buyer", "lastName": "OfGoods", "company": { "name": "Acme Inc" }, "address1": "1 High Street", "locality": "Belfast", "postalCode": "BT1 2AB", "country": "UK", "email": "[email protected]" }, "lineItems": [ { "productName": "Widgets", "productSku": "WID1", "quantity": "7", "unitPrice": "10.00", "unitOfMeasure": "EA", "totalAmount": "70.00", "taxAmount": "14.00", "taxRate": "20.00", "taxTypeCode": "S" }, { "productName": "Freight", "productSku": "ABC123", "quantity": "1", "unitPrice": "23.33", "unitOfMeasure": "EA", "totalAmount": "23.33", "taxAmount": "4.67", "taxRate": "20.00", "taxTypeCode": "S" } ], "invoiceDetails": { "purchaseOrderNumber": "PO21122", "purchaseOrderDate": "20220601", "costCenter": "WE21122", "invoiceDate": "20220601000000", "supplierOrderReference": "ACME1234" } }, "buyerInformation": { "merchantCustomerId": "TESTBBREFACD21122", "vatRegistrationNumber": "GB123421100" }, "merchantInformation": { "merchantDescriptor": { "name": "Widgets Inc", "contact": "02890491491", "address1": "1 Main Street", "locality": "Belfast", "country": "UK", "postalCode": "BT1 2AB" }, "vatRegistrationNumber": "GB987654321" } }
Successful Response
{ "_links": { "void": { "method": "POST", "href": "/pts/v2/refunds/6799463712606276304953/voids" }, "self": { "method": "GET", "href": "/pts/v2/refunds/6799463712606276304953" } }, "clientReferenceInformation": { "code": "Simple Sale Invoice" }, "id": "6799463712606276304953", "orderInformation": { "invoiceDetails": { "level3TransmissionStatus": "Y" }, "amountDetails": { "currency": "GBP" } }, "paymentAccountInformation": { "card": { "type": "001" } }, "paymentInformation": { "tokenizedCard": { "type": "001" }, "card": { "type": "001" } }, "processorInformation": { "approvalCode": "888888", "responseCode": "100" }, "reconciliationId": "70383210IFKZFMTP", "refundAmountDetails": { "currency": "GBP", "refundAmount": "112.00" }, "status": "PENDING", "submitTimeUtc": "2023-03-27T19:46:11Z" }
REST Example: Processing a Tax-Only Refund with Level III Data
Request
{ "clientReferenceInformation": { "code": "Tax Only Refund Invoice" }, "processingInformation": { "purchaseLevel": "3" }, "orderInformation": { "amountDetails": { "totalAmount": "72.87", "currency": "GBP", "taxAmount": "0.00" }, "billTo": { "firstName": "Buyer", "lastName": "OfGoods", "company": { "name": "Acme Inc" }, "address1": "1 High Street", "locality": "Belfast", "postalCode": "BT1 2AB", "country": "UK", "email": "[email protected]" }, "lineItems": [ { "productName": "NET-ADJUST", "productSku": "XYZ123", "quantity": "1", "unitPrice": "72.87", "unitOfMeasure": "FOC", "totalAmount": "72.87", "taxAmount": "0.00", "taxRate": "0.00", "taxTypeCode": "Z" } ], "invoiceDetails": { "purchaseOrderNumber": "PO21122", "purchaseOrderDate": "20220601", "costCenter": "WE21122", "invoiceDate": "20220601000000", "supplierOrderReference": "ACME1234" } }, "buyerInformation": { "merchantCustomerId": "TESTBBREFACD21122", "vatRegistrationNumber": "GB123421100" }, "merchantInformation": { "merchantDescriptor": { "name": "Widgets Inc", "contact": "02890491491", "address1": "1 Main Street", "locality": "Belfast", "country": "UK", "postalCode": "BT1 2AB" }, "vatRegistrationNumber": "GB987654321" } }
Successful Response
{ "_links": { "void": { "method": "POST", "href": "/pts/v2/refunds/6799464736446300004953/voids" }, "self": { "method": "GET", "href": "/pts/v2/refunds/6799464736446300004953" } }, "clientReferenceInformation": { "code": "Tax Only Refund Invoice" }, "id": "6799464736446300004953", "orderInformation": { "invoiceDetails": { "level3TransmissionStatus": "Y" }, "amountDetails": { "currency": "GBP" } }, "processorInformation": { "approvalCode": "888888", "responseCode": "100" }, "reconciliationId": "70383211IFKZFMTQ", "refundAmountDetails": { "currency": "GBP", "refundAmount": "72.87" }, "status": "PENDING", "submitTimeUtc": "2023-03-27T19:47:53Z" }