On This Page
Create a Session
To create a session, you must include shipping fields in your request. The shipping field
values are included in the invoice Oney sends to the customer.
When the session request is complete, the response message includes a pre-approval token
from Oney. Use this pre-approval token when initializing the Oney authorization service.
The session response message also includes a redirection URL that remains available for
the customer up to 20 minutes after the session request.
Line Items
The session 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 on how to use line items, 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 sessions 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
apSessionsService_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 session service responds with one of these statuses as the
apSessionReply_status
field
value:- PENDING: The session is initiated and the customer may now checkout. Request the check status service to retrieve status updates. See Check a Transaction Status.
The session service also responds with a reason code as the
apSessionReply_reasonCode
responseCode
field value. For more information about reason codes, see the Reason Codes for the Simple Order
API.
Creating a Session
Follow these steps to successfully create a session.
- Send aPOSTrequest to thehttps://ics2ws.ic3.com/commerce/1.x/transactionProcessorendpoint and include these required fields:
- apSessionsService_cancelURL
- Set totrue.
- 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.
- Replace the#character with a sequential number starting from0.
- Replace the#character with a sequential number starting from0.
- Set toEUR.
- Include any of these optional fields in the request:
- billTo_company
- billTo_gender
- billTo_language
- shipTo_company
- merchantDefinedData_mddField_#
- Redirect the customer to the returned URL in themerchantURLresponse field.<merchantURL>https://payment.limonetikqualif.com/CreditCard/Order/PayPage/652049669092</merchantURL>
- When the customer completes the checkout using their Oney credentials, the customer is redirected to the merchant site based on the URL that you included in theapSessionsService_successURLfield.
- Save the returned pre-approval token contained in theapSessionReply_processorTokenresponse field. Include the pre-approval token in the authorization request to link the authorization to the session.<processorToken>555316958762</processorToken>
Example: Create Session
Request
<requestMessage xmlns="urn:schemas-cybersource-com:transaction-data-1.211"> <merchantID>test_merchant</merchantID> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <billTo> <firstName>John</firstName> <lastName>Smith</lastName> <street1>Happy</street1> <city>Paris</city> <postalCode>75001</postalCode> <country>FR</country> <phoneNumber>33623456789</phoneNumber> <email>test@thunes.com</email> </billTo> <shipTo> <firstName>John</firstName> <lastName>Smith</lastName> <street1>Happy</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> <apSessionsService run="true"> <cancelURL>https://www.test.com</cancelURL> <successURL>https://www.test1.com</successURL> <failureURL>https://www.test2.com</failureURL> <sessionsType>N</sessionsType> <paymentMethod_name>oney</paymentMethod_name> </apSessionsService> </requestMessage>
Response to a Successful Request
<replyMessage xmlns:c="urn:schemas-cybersource-com:transaction-data-1.211"> <merchantReferenceCode>Postman-1695181509</merchantReferenceCode> <requestID>6951815092646388803009</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTeNvQkneLRaXBANgZYjWmrWbQcsYrlgojmhl4070h9XwMvoZNJMvRiy0P/Sbxt6Ek7xaLS4IA/jY0</requestToken> <purchaseTotals> <currency>EUR</currency> </purchaseTotals> <apSessionsReply> <reasonCode>100</reasonCode> <responseCode>00001</responseCode> <merchantURL>https://payment.limonetikqualif.com/OneyInternational/order-aa/PayPage/555316958762?LmkData=dGhtPTN4</merchantURL> <processorToken>555316958762</processorToken> <amount>220.00</amount> <reconciliationID>XFZ55MP91E90</reconciliationID> <status>PENDING</status> <dateTime>2023-09-20T03:45:10Z</dateTime> </apSessionsReply> </replyMessage>