Analyzing the result of a token request

As with a payment, the Marketplace will be notified via the webhook_url about the progress of a token request.

Example of a notification (webhook):

 {"token":"d3329266-c8d6-421c-8d2a-10a8ffbcaef6"}

The transmitted identifier will enable the Marketplace to execute a GET TOKEN to see if the token was successfully created.

Note:

During a payment with token creation, you will receive two notifications: one upon creating the Order and one upon creating the token (use the ID of the token returned in the notification to find the corresponding token).

Example of a GET TOKEN call:

 GET https://secure.lyra.com/marketplace/tokens/d3329266-c8d6-421c-8d2a-10a8ffbcaef6

Example of a GET TOKEN response:

{
	"uuid": "d3329266-c8d6-421c-8d2a-10a8ffbcaef6",
	"created_at": "2018-11-20T12:53:51.547541Z",
	"updated_at": "2018-11-20T12:53:52.513541Z",
	"marketplace": "9537e049-8862-400a-ae8d-da2ec9ca6051",
	"buyer": {
		"reference": "Buyer_1",
		"address": "MR",
		"type": "PRIVATE",
		"first_name": "John",
		"last_name": "Smith",
		"phone_number": "012345678",
		"email": "john.smith@lyra.fr",
		"address": {
			"street_number": "37",
			"street": "rue Marcel Philippe",
			"district": null,
			"zipcode": "59259",
			"city": "Martin",
			"state": null,
			"country": "FR"
		}
	},
	"language": "fr",
	"url_return": "http://www.my-website.com/",
	"status": "SUCCEEDED",
	"alias": "1144951ea7ab42989c97159b3dfc0382",
	"alias_to_update": null,
	"payment_url": "https://secure.lyra.com/vads-payment/exec.refresh.a;jsessionid=CDb37C1CcfC5eA2BE82bDCA6?cacheId=913355311811206000040"
}