FILTER BY TAG

Process a Sale

Send a sale request to authorize and capture a payment in the same request.
The redirect URL and a pending status indicate a successful request. Redirect the customer to the URL to allow the customer to complete the checkout using MB Way. When the customer completes the checkout, the customer is redirected to your merchant website based on the success URL you include in the
apSaleService_successURL
request field.
Cross-border billing and shipping is supported for credit cards issued in Portugal.
The customer must complete the checkout within 4 minutes of being redirected to the MB Way URL.

Transaction Restrictions

The maximum amount allowed for each transaction is 750€. Each customer account can send and receive a maximum of 2500€ each month. The maximum amount of transactions a customer is allowed to make each month is 50 and the customer's issuing bank reserves the right to adjust this amount.

Line Items

Line items can be included in a sale request. Line items correspond to the
item_#_
fields, starting with
item_0_
and increasing in numerical order.
For more information about how to properly format line items in your request, see Using Line Items.

Tax Amounts

You can include the tax amount for every type of purchased product in the
item_#_taxAmount
field when you request the sale service.

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

Response Statuses

Cybersource
responds to your sale request with one of these statuses in the
apSaleReply_status
field:
Sale Status
  • FAILED
    : The sale cannot be completed.
  • PENDING
    : The sale request is accepted but is not completed. Request the check status service every 60 minutes to retrieve status updates. See Check a Request Status.
The sale service also responds with a reason code in the
apSaleReply_reasonCode
field.
For more information about reason codes, see Reason Codes and Response Codes.
When you send a check status request to retrieve an updated sale status, these are the possible responses:
Check Status for a Sale
  • ABANDONED
    : The customer did not complete the payment using the redirect URL.
  • FAILED
    : The sale cannot be completed.
  • FUNDED
    : The settled amount is funded to the merchant bank account.
  • PENDING
    : The sale request is accepted but is not complete. Continue sending the check status request every 60 minutes.
  • SETTLED
    : The sale request is settled for the requested amount. You cannot receive a settled status until the customer has completed checking out.

Processing a Sale

Follow these steps to successfully process sale.
  1. Send a
    POST
    request to the
    https://ics2ws.ic3.com/commerce/1.x/transactionProcessor
    endpoint and include these required fields:
    Set to
    MBT
    .
    Set to the URL to which the customer is redirected after successfully completing the MB Way payment.
    Add
    ?action=cancel
    to the end of the URL to help identify the response.
    Set to the URL to which the customer is redirected after successfully completing the MB Way payment.
    Add
    ?action=failure
    to the end of the URL to help identify the response.
    Set to the URL to which the customer is redirected after successfully completing the MB Way payment.
    Add
    ?action=success
    to the end of the URL to help identify the response.
    Set to
    true
    .
    Set to
    PT
    .
    Set to
    EUR
    .
    Maximum amount allowed for each transaction is 750€.
    For additional restriction information, see the Transaction Restrictions section.
  2. You can include these optional fields in the request:
    All phone numbers are accepted for customers using Portugal-issued credit cards.
    Replace the
    #
    character with a sequential number starting from
    0
    .
    Replace the
    #
    character with a sequential number starting from
    0
    .
    Replace the
    #
    character with a sequential number starting from
    0
    .
    Replace the
    #
    character with a sequential number starting from
    0
    .
    Replace the
    #
    character with a sequential number starting from
    0
    .
    Replace the
    #
    character with a sequential number starting from
    0
    .
    If this field is present, the
    purchaseTotals_currency
    field is optional.
    Replace the
    #
    character with a sequential number starting from
    0
    .
    Replace the
    #
    character with a sequential number starting from
    0
    .
  3. Redirect the customer to the returned URL in the
    merchantURL
    response field.
    <merchantURL>https://payment.limonetikqualif.com/MBWay/Order/PayPage/810336813948</merchantURL>
  4. When the customer completes the checkout using their MB Way credentials, the customer is redirected to the merchant website based on the URL that you included in the
    apSaleService_successURL
    field.
  5. Save the request ID in the
    requestID
    field from the sale response. Include the request ID in a check status request to confirm that the payment is complete.
    <requestID>6989535327666834103007</requestID>

Example: Processing a Sale

Request
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.215"> <merchantID>test_merchant</merchantID> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <billTo> <country>PT</country> </billTo> <purchaseTotals> <currency>EUR</currency> <grandTotalAmount>220.00</grandTotalAmount> </purchaseTotals> <apPaymentType>MBT</apPaymentType> <apSaleService run="true"> <cancelURL>https://www.test.com?action=cancel</cancelURL> <successURL>https://www.test.com?action=success</successURL> <failureURL>https://www.test.com?action=failure</failureURL> </apSaleService> </requestMessage>
Response to a Successful Request
<replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.215"> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <requestID>7110555694866199303007</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTgXbIeyRiqVNfANgZYjWmdmpRcVILmMnvv/C1A3pC/oH+MMmkmXoxX6rUJOBdsh7JGKpU18AAqCI/</requestToken> <purchaseTotals> <currency>EUR</currency> </purchaseTotals> <apSaleReply> <reasonCode>100</reasonCode> <paymentStatus>pending</paymentStatus> <responseCode>00001</responseCode> <merchantURL>https://payment.limonetikqualif.com/MBWay/Order/PayPage/379978098504</merchantURL> <processorTransactionID>379978098504</processorTransactionID> <reconciliationID>XFZ3YTQ8TA9F</reconciliationID> <amount>20.00</amount> <processorResponse>00001</processorResponse> <dateTime>2024-03-21T21:12:50Z</dateTime> </apSaleReply> </replyMessage>