Docs

Docs

  • Support

›Travel SDK

Ticket Cancellation SDK

  • Introduction
  • Configuration
  • Insurance Recommendation
  • Finalise Purchase
  • Example

Ticket Cancellation API

  • Quote
  • Policy

Device SDK

  • Introduction
  • Configuration
  • Insurance Recommendation
  • Finalise Purchase

Device API

  • Quote
  • Policy

Home SDK

  • Introduction
  • Configuration
  • Insurance Recommendation
  • Finalise Purchase

Home API

  • Quote
  • Policy

Travel SDK

  • Introduction
  • Configuration
  • Insurance Recommendation
  • Finalise Purchase

Travel API

  • Configuration Params
  • Quote
  • Quote by Product
  • Policy

Authentication

  • Authentication

Support

  • Support

Notifications

  • Get notified

Finalise Purchase

Notify after payment

Once the customer successfully paid the price of their cart and insurance, you will have to notify us via a webhook. This way, we will know, that payment for the insurance was fulfilled and we can request an official policy from the insurance company. Please note that the request contains your secret key, therefore this should only be called from your backend!

This message should contain the previously returned quote identifier, the details of the customer and additional identification information of the trip in the following structure:

If the payment was unsuccessful you can either avoid this request or call it with paymentCaptured = false, so we are able to log that the policy will not be finalised.

cURL
node.js
curl -X POST \
-d'secretKey=<secret key>' \
-d'paymentCaptured=<true or false, whether the payment was captured successfully>' \
-d'quoteId=<quote id>' \
-d'zip=<zip code>' \
-d'city=<city>' \
-d'address=<address>' \
-d'country=<country>' \
-d'email=<email>' \
-d'firstName=<first name>' \
-d'lastName=<last name>' \
-d'name=<if the buyer is a company>' \
-d'vat=<vat id if any>' \
https://api.travel.staging.vernsurance.com/finalize
const got = require('got');
got.post('https://api.travel.staging.vernsurance.com/finalize', {
json: {
secretKey: '<secret key>',
paymentCaptured: '<true or false, whether the payment was captured successfully>',
quoteId: '<quote id>',
zip: '<zip code>',
city: '<city>',
address: '<address>',
country: '<country>',
email: '<email>',
firstName: '<first name>',
lastName: '<last name>',
name: '<if the buyer is a company>',
vat: '<vat id if any>'
}
});

Where:

  • secretKey: secret key of the sales partner
  • paymentCaptured: is indicating if the payment was successful. If false the policy will be not created.
  • quoteId: the identifier of the quote returned after recommendation
  • zip: zip code of the customer
  • city: city of the customer
  • address: address of the customer
  • country: country of the customer
  • email: email of the customer
  • firstName: firstName of the customer
  • lastName: lastName of the customer
  • name: name of the company, when there is a billing persona provided (optional)
  • vat: vat number of the company, when there is a billing persona provided (optional)
← Insurance RecommendationConfiguration Params →
  • Notify after payment
Docs
Docs
SDK
Copyright © 2019 Vernsurance