No wonder there is confusion about this.
There are three existing threads asking similar questions about the same family
Threads merged.
From one of these I see that William Co(u)pland died in 1893, and that his death certificate says that his parents were William Co(u)pland and Agnes Smith. Does it say 'Agnes Co(u)pland MS Smith' or simply 'Agnes Smith'? And who was the informant? This matches the baptism on 29 June 1817 so I think it is safe enough to say that it is the same person. Have you seen the original baptism record? What does it say?
From another of these threads you say that you have the death certificate of William Co(u)pland who died in 1863, saying that his father's name was John and his mother's name was Agnes Co(u)pland. What is the name of his wife according to that certificate? And who was the informant? How exactly is his mother's name recorded?
An IGI listing is not to be trusted. Contrary to what it claims, it is not a record, it is an index listing. The one you have found is submitted, not indexed from an original record, so it is useful as a finding aid but cannot be relied on to be accurate. I see that is gives a marriage date of 1812, not on a specific date in that year or in a specific parish, which would have been stated if it had been indexed from an original document. There is no corresponding marriage record on Scotland's People. You need to track down the source of this marriage record to find out whether it actually exists and is not a guesstimate by the person who submitted it.
The index listing on SP of the death of William Co(u)pland in 1863 says he was 77. If that is accurate, that means that he was born some time in 1785 or 1786. The 1861 census says he was 75. That also implies a birth in 1785 or 1786. It also says that he was born in Kirkmahoe. The 1851 census says he was 65 and born in Kirkmahoe. All these pieces of information point to him being born in Kirkmahoe in 1785 or 1786.
There is a baptism of William Grey Coupland, son of John Coupland, in Kirkmahoe on 1 January 1786, who exactly matches the information you have about William Co(u)pland who died in 1863. Do you have any reason (other than the unreliable index listing in the IGI) to think that this William Grey Coupland is not the one you are looking for?