FILTER BY TAG

Authorize a Payment

The authorization service confirms a customer's account holds enough funds for the payment.
The authorization request requires the pre-approved token returned in the session response in the
apSessionReply_processorToken
field.
When a payment is authorized, it can be captured within 28 days.

Line Items

The authorization service requires you to include line items in your request. Line items correspond to the
item_#_
fields, starting with
item_0_
and increasing in numerical order. For more information, see Using Line Items.

Tax Amounts

Include the tax amount for every type of purchased product in the
item_#_taxAmount
field when you request the authorization 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
apAuthService_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

The authorization service responds with one of these statuses as the
apAuthReply_status
field value:
  • AUTHORIZED
    : The payment is successfully authorized.
  • FAILED
    : The authorization request failed.
  • PENDING
    : The authorization request is accepted but is not authorized. Either the authorization is being audited by Oney or the customer has not completed the checkout using the redirection URL. The merchant should send a check status request to retrieve status updates. Request the check status service to retrieve status updates. See Check a Transaction Status.
The authorization service also responds with a reason code as the
apAuthReply_reasonCode
field value. For more information about reason codes, see the Reason Codes for the Simple Order API.

Required Fields for Processing an Authorization

apAuthService_failureURL
apAuthService_preapprovalToken
Set the field value to the token generated by Thunes in the session service.
apAuthService_reconciliationID
Set the field value to
true
.
apAuthService_successURL
Set the field value to
ONY
.
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
.
paymentMethod_name
Set to
EUR
.
Set the field value to the value used for the
purchaseTotals_grandTotalAmount
field in the session service.

Optional Fields for Processing an Authorization

Choose from these optional fields to include additional information when authorizing a payment.
billTo_company
billTo_gender
billTo_language
Replace the
#
character with a sequential number starting from
0
.
Replace the
#
character with a sequential number starting from
0
.
merchantDefinedData_mddField_#
Replace the
#
character with a sequential number starting from
0
.
shipTo_company

Example: Processing an Authorization

Request
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantID>test_merchant</merchantID> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <billTo> <firstName>capyturereq</firstName> <lastName>R</lastName> <street1>Montorgueil</street1> <city>paris</city> <postalCode>75001</postalCode> <country>FR</country> <phoneNumber>+33623456789</phoneNumber> <email></email> </billTo> <shipTo> <firstName>John</firstName> <lastName>Smith</lastName> <street1>Montorgueil</street1> <city>Paris</city> <postalCode>75001</postalCode> <country>FR</country> <phoneNumber>+33623456789</phoneNumber> </shipTo> <item id="0"> <unitPrice>20</unitPrice> <quantity>10</quantity> <productCode>4564</productCode> <productName>Mobile</productName> <productSKU>testI</productSKU> <taxAmount>20</taxAmount> <totalAmount>220</totalAmount> <productDescription>MOBILE</productDescription> </item> <purchaseTotals> <currency>EUR</currency> <grandTotalAmount>220</grandTotalAmount> </purchaseTotals> <apPaymentType>ONY</apPaymentType> <apAuthService run="true"> <cancelURL>https://www.test.com</cancelURL> <successURL>https://www.test1.com</successURL> <failureURL>https://www.test2.com</failureURL> <preapprovalToken>555316958762</preapprovalToken> </apAuthService> </requestMessage>
Response to a Successful Request
<replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantReferenceCode>ref1695322932</merchantReferenceCode> <requestID>6953229325326859903007</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTeO9w75jQgCAfANgZYjWmjCbQhSaEywojmiG8+n0h9XwMwIZNJMvRiy0P/Sbx3uHfMaEAQD4A6xDV</requestToken> <purchaseTotals> <currency>EUR</currency> </purchaseTotals> <apAuthReply> <reasonCode>100</reasonCode> <status>AUTHORIZED</status> <processorResponse>00003</processorResponse> <amount>220.00</amount> <dateTime>2023-09-21T19:02:14Z</dateTime> <paymentStatus>authorized</paymentStatus> <responseCode>00003</responseCode> <authorizationCode>1000</authorizationCode> <reconciliationID>XFZ40MPBIPLX</reconciliationID> <processorTransactionID>315778574151</processorTransactionID> </apAuthReply> </replyMessage>