Analyzing the result of a token request

As for a payment, the Marketplace will be notified on the URL webhook_url of the evolution of a token request. The identifier thus transmitted will allow the Marketplace to make a GET TOKEN to recover the status of the token and therefore know if its creation succeeded.

During a payment with token creation, you will receive two notifications: one for the order and one for the token.

Example of a notification (webhook):

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

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": "Jean",
		"last_name": "Dupond",
		"phone_number": "012345678",
		"email": "jean.dupond@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"
}