Payment Flow
You must program your server so that it will call our web services running the various payment operations.
Payment Flow Summary:
-
You create a payment order by calling the PaymentOrder/Create web service
-
You redirect the user to the payment page (URL provided by Thunes), where the payment method details will be captured. Then Thunes Collections orchestrates the payment with the payment method(s) involved.
-
Upon getting the authorization from the one or the many Payment Methods involved in the payment, you must check the payment order status by calling the PaymentOrder/Detail web service.
-
The authorized amount can then be charged and/or cancelled within a defined validity period (the length of which depends on the payment method used). All amounts charged may subsequently be refunded. Charging operations, cancellations and refunds may be partial. You can cancel part of a payment and charge the remainder, or charge/refund in several instalments, etc.
NOTE: The operations you see with Thunes are not necessarily the same as those handled by Thunes with the user's payment methods.
Payment Flow description:
Please note that users may pay with one or several payment methods, depending on the situation. In the description below, the diagrams illustrate a payment with a single payment method (Credit Card). However, keep in mind that Thunes collections allows also payment with multiple payment methods (e.g. Gift Cards + Credit Card).
Step 1: Creating the payment order:
-
On your payment method selection page, the user selects a payment method managed by Thunes' solution (e.g., Credit Card in the above diagram).
-
If the selected payment method is managed by Thunes Collections, you must call the PaymentOrder/Create web service to create a payment order (with parameters like identifiers, Return URLs, etc...).
-
Thunes Collections then creates the payment order and returns a URL to the appropriate payment page.
-
At this point you can flag the order as “pending payment validation”.
Step 2: Payment Orchestration by Thunes:
-
You redirect the user to the payment page using the URL provided by Thunes (in Step 1).
-
The user enters the identification numbers required for payment. Please note that a user may use one or more payment methods in some cases. A user has indeed the possibility, for instance, to pay a part of the due amount with Gift Cards and the remainder with a Credit Card. It is important to keep this in mind for the Authorization phase in Step 3.
-
From there, there are three possible scenarios:
- If the user cancels the payment, Thunes Collections redirects the user to the cancellation URL (AbortedUrl) provided in Step 1, where you can display an appropriate message and cancel the order.
- If the user closes the web browser without clicking on the cancel button, the payment order will be cancelled automatically (no later than 120 minutes after the payment), and you will be notified of this operation.
- If the user confirms the payment, Thunes Collections "orchestrates" payment with various authorization servers in order to reserve the due ordered amount.
Step 3: Payment Result:
-
If an error occurs, Thunes Collections redirects the user to the error URL provided when the payment order was created (ErrorUrl). Here you can display an appropriate message and cancel the order.
-
If one of the payment methods refuses payment (inadequate balance, risk of fraud, etc.), Thunes Collections redirects the user to the cancellation URL (AbortedUrl), which is also used when the user voluntarily cancels the order. The status of the payment order will then be updated to “Refused”.
-
If all payment methods involved accept the payment, Thunes Collections redirects the user to the “return URL” provided (ReturnUrl). You must then check the payment order status by calling the PaymentOrder/Detail web service. This call is required for security reasons. The status may be either Authorized or Authorizing:
- If the status is Authorized, you can confirm the order, display a successful payment message, and send out a confirmation email. You can then charge, cancel or refund the payment, as described in Step 4 below.
- If the status is Authorizing, one of the payment methods involved needs more time to validate the payment (e.g., fraud scoring for facility of payment). You may display a message and send out an email stating that the order has been registered. You should, however, wait until the order is given Authorized status before confirming it. If you do not use our notification system, we advise you to consult the payment order status once a day, using the PaymentOrder/Detail web service.
-
When the user is redirected to the ReturnUrl, Thunes Collections notifies you that the payment result is known. Therefore, in case of interruption in the user clickstream, you will still be able to follow through on the order. Thunes Collections strongly advises you to initiate your order confirmation processing operations on the first feedback you receive (ReturnUrl via the user, or ServerNotificationUrl).
Step 4: Post-Payment Operations:
-
Once the status of the payment order is “Authorized”, several options are available to you for managing payment in your order processing cycle:
- Total or partial cancellation (PaymentOrder/Cancel): Calling this web service is essential to service quality since it enables us to release the reserved funds to the user. If you omit this call, the amount will only be released at the end of the reservation period, which may be prolonged.
- Total or partial charging operation (PaymentOrder/Charge): we make every effort to ensure that all payment methods involved in a transaction always issue a positive response to a charging request within 6 days, as for credit or debit card operations. However, we advise you to check the response to your charge request before following through on the order, whether or not the response is given within six days.
- Total or partial refund (PaymentOrder/Refund), ffor amounts that have already been charged.
Please refer to the Status descriptions table for a list of the possible actions associated with each payment order status.
Once your project starts, Thunes Collections guides you through the integration process and explain the connection to the different payment methods.
Updated over 1 year ago
Please read the following links in order to go further!