After the battle with the kings, Abram had a vision and received a promise from God
Genesis 15:1 After these things the word of the LORD came unto Abram in a vision, saying, Fear not, Abram: I am thy shield, and thy exceeding great reward.
Abram then asked God for a son; as his only heir then was his nephew Lot.
15:2 And Abram said, LORD God, what wilt thou give me, seeing I go childless, and the steward of my house is this Eliezer of Damascus? 15:3 And Abram said, Behold, to me thou hast given no seed: and, lo, one born in my house [Abram’s brother’s son Lot] is mine heir.
God promised Abram a multitude of his own descendants.
15:4 And, behold, the word of the LORD came unto him, saying, This [Lot] shall not be thine heir; but he that shall come forth out of thine own bowels shall be thine heir. 15:5 And he brought him forth abroad [outside the tent to see the stars], and said, Look now toward heaven, and tell the stars, if thou be able to number them: and he said unto him, So shall thy seed be.
15:6 And he believed in the LORD; and he [God] counted it [the belief; the faith of Abram was counted as righteousness because that belief was married to the works of faith] to him for righteousness.
Now the Elohim that became Jesus Christ reveals that he had caused Terah the Chaldean to leave Ur with his sons to bring them to Haran, so that Abram could be called from Haran to Canaan; to give Canaan to Abram for his descendants.
15:7 And he said unto him, I am the LORD that brought thee out of Ur of the Chaldees, to give thee this land to inherit it.
Abram then asked God for a sign and Abram is commanded to make a certain special offering; and Abram obeyed God.
15:8 And he said, LORD God, whereby shall I know that I shall inherit it? 15:9 And he said unto him, Take me an heifer of three years old, and a she goat of three years old, and a ram of three years old, and a turtledove, and a young pigeon. 15:10 And he took unto him all these, and divided [cut up] them in the midst, and laid each piece one against another: but the birds divided he [did not cut up but left whole] not. 15:11 And when the fowls [flesh eaters like crows, ravens and vultures] came down upon the carcases, Abram drove them away. [Abram had not burned the sacrifice]
God caused Abram to fall into a deep sleep and gave him a prophecy by a dream.
15:12 And when the sun was going down, a deep sleep fell upon Abram; and, lo, an horror of great darkness fell upon him.
In the prophetic dream God tells Abram that his descendants will wander without a land of their own for 400 years and will then be delivered by the power of God.
15:13 And he said unto Abram, Know of a surety that thy seed shall be a stranger in a land that is not their’s [they will be wanderers in Canaan and then will be in Egypt for 400 years before they inherit the land], and shall serve them; and they shall afflict them four hundred years;
The belief that the children of Israel were slaves in Egypt for 400 years is largely based upon these two verses.
“And he said unto Abram, Know of a surety that thy seed shall be a stranger in a land that is not theirs [which includes all the time that they were wanderers in Palestine and lived in Egypt – from the birth of Isaac – before actually inheriting the land], and shall serve them; and they shall afflict them four hundred years …” (Genesis 15:13). “And God spake on this wise, That his seed should sojourn in a strange land [a land that is not theirs, meant both Canaan and Egypt]; and that they should bring them into bondage, and entreat them evil four hundred years“ (Acts 7:6).
Here is the meaning; thy seed refers to the children of Abraham beginning with Isaac the son of promise, who would be wanderers having no land of their own for four hundred years beginning with the birth of Isaac.
Isaac was born when Abraham was one hundred years old; therefore the exodus and the Sinai Covenant would take place four hundred years after the birth of Isaac or five hundred years after the birth of Abraham!
Abraham was born in 2008 A.M. (c 1940 B.C.): therefore the Exodus was 500 years later in 2508 A.M. (c 1440 B.C.) with a margin of possible error of a few years.
God also tells Abram that Egypt would be judged and that Abram’s descendants will be brought out with much spoil.
15:14 And also that nation, whom they shall serve, will I judge: and afterward shall they come out with great substance.
Abram is told that he will die, but that in their fourth generation after going into Egypt his descendants will return to inherit the land.
15:15 And thou shalt go to thy fathers in peace; thou shalt be buried in a good old age. 15:16 But in the fourth generation [after entering Egypt] they [the family of Abram] shall come hither again: for the iniquity of the Amorites is not yet full.
In the darkness of the night a great light passed over the altar and God made his promise that the land of Canaan would be given to the descendants of Abram through Isaac. Those who are of faith and submissive to live by every Word of God like Abraham was, are Abraham’s spiritual seed and have God’s promise of the inheritance of the spiritual Promised Land of eternal life: IF we are zealous to live by every Word of God.
15:17 And it came to pass, that, when the sun went down, and it was dark, behold a smoking furnace, and a burning lamp that passed between those pieces.
15:18 In the same day the LORD made a covenant with Abram, saying, Unto thy seed have I given this land, from the river of Egypt [El Arish] unto the great river, the river Euphrates: 15:19 The Kenites, and the Kenizzites, and the Kadmonites, 15:20 And the Hittites, and the Perizzites, and the Rephaims, 15:21 And the Amorites, and the Canaanites, and the Girgashites, and the Jebusites [of Jerusalem].
Sarai gives Abram her maid; in fact Abram was a rich man and already had many concubines (Gen 25:6); but the story of Sarai and Hagar was recorded as a special allegory for us today.
Hagar was a slave and was forced to do what she did, thereby Ishmael was the son of the slave as a type of being enslaved by sin and enslaved by the penalty of the law for sin. which penalty is death: While Sarai as a free and willing legal wife was an allegory of the bride of Christ who is freed from enslavement and bondage to sin and death.
Galatians 4:23 But he who was of the bondwoman was born after the flesh; but he of the freewoman was by promise [of God].
The Mosaic Covenant was a physical covenant with physical promises; its physical sacrifices could atone physically and maintain the physical Mosaic Covenant; but they could not free anyone from their sins to inherit any spiritual promises which is why the New Covenant of Jermiah 31:31 was needed.
Hagar the bond woman was an allegory of the Mosaic Covenant, while Sarai as the free woman, was an allegory of the New Covenant, in which the wages of our past sins if sincerely repented of have been paid by our Deliverer and we have been redeemed from bondage to sin and reconciled to God the Father in heaven.
Galatians 4:24 Which things are an allegory: for these are the two covenants; the one from the mount Sinai, which gendereth to bondage, which is Agar. 4:25 For this Agar is mount Sinai in Arabia, and answereth to [physical] Jerusalem which now is [the Mosaic Covenant , and is in [spiritual bondage to sin] bondage with her children.
The promise to Sarai is an allegory of the New Covenant.
4:26 But [the heavenly Jerusalem of God the Father] Jerusalem which is above is free, which is the mother of us all. 4:27 For it is written, Rejoice, thou barren that bearest not; break forth and cry, thou that travailest not: for the desolate hath many more children than she which hath an husband.
Isaac was a child of God’s promise and is an allegory of God’s promises to the spiritually called out and redeemed from sin.
4:28 Now we, brethren, as Isaac was, are the children of promise.
Paul speaks of the Mosaic Covenant persecuting the spiritual New Covenant called out in his day. This is also fulfilled by the worldly persecuting the spiritually faithful in this society; and by the lax and lukewarm within today’s Ekklesia persecuting their more zealous brethren.
4:29 But as then he that was born after the flesh persecuted him that was born after the Spirit, even so it is now.
Nevertheless the spiritually called out of the New Covenant who are faithful, are the true spiritual sons of Abraham.
4:30 Nevertheless what saith the scripture? Cast out the bondwoman and her son: for the son of the bondwoman shall not be heir with the son of the freewoman. 4:31 So then, brethren, we [the sincerely repentant and faithful] are not children of the bondwoman, but of the free.
Genesis 16:1 Now Sarai Abram’s wife bare him no children: and she had an handmaid, an Egyptian, whose name was Hagar.
16:2 And Sarai said unto Abram, Behold now, the LORD hath restrained me from bearing: I pray thee, go in unto my maid; it may be that I may obtain children by her. And Abram hearkened to the voice of Sarai. 16:3 And Sarai Abram’s wife took Hagar her maid the Egyptian, after Abram had dwelt ten years in the land of Canaan, and gave her to her husband Abram to be his wife.
Immediately after Hagar conceived, Hagar was filled with contempt for the barrenness of her mistress Sarai.
This sin was typical of the self-righteousness of those who become filled with pride in themselves and their own ways and reject any zeal to live by every Word of God. As Hagar was raised up above her mistress in her mind by her pride, so many have become proud and have exalted themselves above living by every Word of our Master to live by their own ways.
16:4 And he went in unto Hagar, and she conceived: and when she [Hagar] saw that she had conceived, [Hagar despised Sarai] her mistress was despised in her eyes.
Sarai then complains to her husband Abram about the attitude of Hagar.
16:5 And Sarai said unto Abram, My wrong be upon thee: I have given my maid into thy bosom; and when she saw that she had conceived, I was despised in her eyes: the LORD judge between me and thee.
Abram then gives Sarai his consent to treat Hagar as she pleased; and the harshness of Sarai for the sin of Hagar drove Hagar to flee from Sarai.
16:6 But Abram said unto Sarai, Behold, thy maid is in thine hand; do to her as it pleaseth thee. And when Sarai dealt hardly with her, she fled from her face.
Then Melchizedek [who later gave up his Godhood to become flesh as Jesus Christ] appears to Hagar and bids her to return and to submit to Sarai.
16:7 And the angel of the LORD found her by a fountain of water in the wilderness, by the fountain in the way to Shur. 16:8 And he said, Hagar, Sarai’s maid, whence camest thou? and whither wilt thou go? And she said, I flee from the face of my mistress Sarai.
16:9 And the angel of the LORD said unto her, Return to thy mistress, and submit thyself under her hands.
Hagar also receives a physical promise and blessing from God.
16:10 And the angel of the LORD said unto her, I will multiply thy seed exceedingly, that it shall not be numbered for multitude. 16:11 And the angel of the LORD said unto her, Behold, thou art with child and shalt bear a son, and shalt call his name Ishmael; because the LORD hath heard thy affliction. 16:12 And he will be a wild man; his hand will be against every man, and every man’s hand against him; and he shall dwell in the presence of all his brethren.
16:13 And she called the name of the LORD that spake unto her, Thou God seest me: for she said, Have I also here looked after him that seeth me? 16:14Wherefore the well was called Beerlahairoi; behold, it is between Kadesh and Bered.
16:15 And Hagar bare Abram a son: and Abram called his son’s name, which Hagar bare, Ishmael. 16:16 And Abram was fourscore and six years  old, when Hagar bare Ishmael to Abram.