On This Page
Process a Sale
This section describes how to send a sale request to process a payment.
A sale request authorizes and captures a payment in the same request. A successful sale
response includes an Multibanco redirect URL and a
PENDING
status.
Redirect the customer to the Multibanco URL to allow the customer to complete the
checkout using their Multibanco account. When the customer completes the checkout, the
customer is redirected to your website.When you receive a successful response, save the sale request ID in the
requestID
response
field to perform a follow-on check status request or refund request.Calculating the Grand Total
Include the grand total in the request by using the
purchaseTotals_grandTotalAmount
field. For information about how to calculate the grand total, see Calculating the Grand Total for Line Items.
Endpoints
Set the
apSaleService_run
field to
true
, and send the request to one of these
endpoints:Production:
https://ics2ws.ic3.com/commerce/1.x/transactionProcessor
Test:
https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor
Processing a Sale
Follow these steps to successfully process sale.
- Send aPOSTrequest to thehttps://ics2ws.ic3.com/commerce/1.x/transactionProcessorendpoint and include these required fields:
- Set toMBB.
- Set to the URL to which the customer is redirected after the payment is cancelled.
- Add?action=cancelto the end of the URL to help identify the response.
- Set to the URL to which the customer is redirected after the payment fails to complete.
- Add?action=failureto the end of the URL to help identify the response.
- Set to the URL to which the customer is redirected after successfully completing the payment.
- Add?action=successto the end of the URL to help identify the response.
- Set totrue.
- Set toPT.
- Set toEUR.
- You can include these optional fields in the request:
- Replace the#character with a sequential number starting from0.
- Replace the#character with a sequential number starting from0.
- Replace the#character with a sequential number starting from0.
- Replace the#character with a sequential number starting from0.
- Replace the#character with a sequential number starting from0.
- Replace the#character with a sequential number starting from0.
- If this field is present, thepurchaseTotals_currencyfield is optional.
- Replace the#character with a sequential number starting from0.
- Replace the#character with a sequential number starting from0.
- Redirect the customer to the returned URL in themerchantURLresponse field.<successURL>https://www.testsuccess.com?action=success</successURL>
- When the customer completes the checkout using their Multibanco credentials, the customer is redirected to the merchant website based on the URL that you included in theapSaleService_successURLrequest field.
- Save the request ID in therequestIDfield from the sale response. Include the request ID in a check status request to confirm that the payment is complete.<requestID>7478635704886789703607</requestID>
Example: Processing a Sale
Request
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.211"> <merchantID>nrphotography</merchantID> <merchantReferenceCode>Sale</merchantReferenceCode> <billTo> <firstName>Test</firstName> <lastName>Testerson</lastName> <country>PT</country> <email>test@email.com</email> </billTo> <purchaseTotals> <currency>EUR</currency> <grandTotalAmount>1000.00</grandTotalAmount> </purchaseTotals> <apPaymentType>MBB</apPaymentType> <apSaleService run="true"> <cancelURL>https://www.testcancel.com?action=cancel</cancelURL> <successURL>https://www.testsuccess.com?action=success</successURL> <failureURL>https://www.testfailure.com?action=failure</failureURL> </apSaleService> </requestMessage>
Response to a Successful Request
<replyMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.211"> <merchantReferenceCode>Sale</merchantReferenceCode> <requestID>7533031967496396004603</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTmF3Rtrlcntz7ANgZYjWmdmJGZNGddmnvzZ9/ynpEcNQKKkMmkmXoxhlhfpOYXdG2uVye3PsAoEWX</requestToken> <purchaseTotals> <currency>EUR</currency> </purchaseTotals> <apSaleReply> <reasonCode>100</reasonCode> <paymentStatus>pending</paymentStatus> <responseCode>00001</responseCode> <merchantURL>https://payment.limonetikqualif.com/IfThenPay/Order/PayPage/452092022335</merchantURL> <processorTransactionID>452092022335</processorTransactionID> <reconciliationID>XFZ3YDF243W3</reconciliationID> <amount>1000.00</amount> <processorResponse>00001</processorResponse> <dateTime>2025-07-23T20:39:58Z</dateTime> </apSaleReply> </replyMessage>
Response Statuses for Processing a Sale
Cybersource
responds to your sale request with one of these statuses
in the field:- FAILED: The sale cannot be completed.
- PENDING: The sale request is accepted but is not completed. Send a check status request as often as necessary to obtain the information that you need. For more information, see Check a Status.