TourCMS, a leading online booking and channel management solution is operated by Palisis.

Contact Info

Palisis AG
Florastrasse 18A
8610 Uster
support@palisis.com
+41 44 533 40 40

Follow Us

home > support > API > Marketplace API > Complete Spreedly Transaction

Complete a Spreedly transaction

Part of TourCMS integration with Spreedly for processing tractions with 3D Secure 2.

Complete a "pending" 3D Secure 2 transaction created via the Create Spreedly Payment endpoint.

If you are implementing 3D Secure 2 using TourCMS Spreedly integration you should call this endpoint when the Spreedly documentation advises you to call the Spreedly "Complete" endpoint rather than calling Spreedly directly.

Differs from the Spreedly endpoint in that repeated or subsequent calls will return the latest status of the transaction rather than an error message.

Learn more about TourCMS Spreedly integration

REST info

Endpoint/c/booking/gatewaytransaction/spreedlycomplete
FormatsXML
ExampleURL: /c/booking/gatewaytransaction/spreedlycomplete.xml?id=49aa3e94-79ce-4912-acc3-9c26b75950e3
VerbPOST

Code samples

PHP examples use the PHP Client Library with SimpleXML

Description

object spreedly_complete_payment ( string $transaction_id, int $channel )


Parameters

$transaction_id
String containing the TourCMS transaction ID
$channel
Channel ID as per TourCMS API settings page

Example

// Set your Channel ID, as per the TourCMS API settings page
$channel = 3;

// Provide the transaction ID obtained from TourCMS Spreedly Create Payment
$transaction_id = '49aa3e94-79ce-4912-acc3-9c26b75950e3';

// Call TourCMS API, attempting to complete the transaction
$result = $tourcms->spreedly_complete_payment($transaction_id, $channel);
// No documentation currently available
// No documentation currently available
// No documentation currently available

Looking for sample code in a different language? TourCMS and community provided API libraries

Querystring parameters

Querystring parameters
ParamNotes
transaction_id String, TourCMS ID for this transaction, e.g. 49aa-3e94

 
Response fields

Response fields
XML NodeNotes
request Confirmation of the request that you sent
error An error response of "OK" indicates a transaction has succeeded, otherwise an error will be displayed indicating the issue
 
Check the //transaction/state and //transaction/required_action to decide how to continue.
account_id TourCMS account ID
channel_id TourCMS channel ID
booking

A booking node containing the following:

XML NodeNotes
booking_id TourCMS booking ID
transaction

A transaction node containing the following:

XML NodeNotes
transaction_id The TourCMS transaction_id.
state Spreedly state field, succeeded if the transaction is succeeded
message Spreedly message field, a human-readable string indicating the result of the transaction
message_key Spreedly message key field
required_action The required action in the 3DS 2 flow, e.g., none, device_fingerprint, challenge, etc
checkout_form HTML entity encoded checkout form.
checkout_url
challenge_url
device_fingerprint_form HTML entity encoded fingerprint form.

More information