# Create

In order to create an Authorization, first send a request with the body of the request set as an Authorization creatable.

Example Authorization request:

 
















POST /v1/authorization

Host: merchant.intergiro.com
Content-Type: application/json
Authorization: Bearer <public.api.key> or <customer.api.key>

{
	"number": "a_unique_identifier",
	"amount": 23,
	"currency": "EUR",
	"card": {
		"pan": "4111111111111111",
		"expires": [2, 22],
		"csc": "987"
	}
}

Example Response:

 























HTTP 200 OK

{
	"id": "1234567890123456",
	"number": "a_unique_identifier",
	"merchant": "testtest",
	"amount": 23,
	"currency": "EUR",
	"history": [],
	"change": [],
	"capture": [],
	"refund": [],
	"created": "2021-04-01T09:00:00.000Z",
	"reference": "12341234",
	"card": {
		"csc": "matched",
		"expires": [2, 22],
		"iin": "411111",
		"last4": "1111",
		"scheme": "visa",
		"type": "debit",
	},
}

If a verification required error is returned, proceed to the verification endpoint. The important field to look for is the error: "verification required".

Example of a verification required response:

 













 


HTTP 400 Bad Request

{
	"status": 400,
	"type": "flawed content",
	"content": {
		"type": "verification required",
		"flaws": [
			{
				"type": "reject",
				"condition": "authorization.amount>15 !(authorization.verification:verified) !(authorization.recurring:subsequent)"
			}
		]
	},
	"error": "verification required"
}

After a successful Verification response has been returned, append it to the Authorization creatable in the card.verification property.

Example Authorization request appended with Verification response:

 



























POST /v1/authorization

Host: merchant.intergiro.com
Content-Type: application/json
Authorization: Bearer <public.api.key> or <customer.api.key>

{
	"number": "a_unique_identifier",
	"amount": 23,
	"currency": "EUR",
	"card": {
		"pan": "4111111111111111",
		"expires": [2, 22],
		"csc": "987",
		"verification": {
			"type": "challenge",
			"data": {
				"authentication": "spwg/pFPMex1AmPleL2eiVQ9OBc8=",
				"status": "Y",
				"reference": {
					"server": "00000000-0000-0000-0000-000000000000",
					"directory": "11111111-1111-1111-1111-111111111111",
				}
			}
		}
	}
}