You need to allocate the Credit object using the new operator so that unique_ptr can delete it later. You are declaring c as a local variable, not via new. So even if the code could compile, it would not behave correctly at runtime.
std::unique_ptr does not have an operator= that takes a raw pointer as input, only another unique_ptr. That is why you are getting the compiler error.
If you have only a raw pointer available, you can use the unique_ptr::reset() method, eg:
unique_ptr<Payment> p;
...
Credit *c = new Credit("<cardnumber>", "<expdate>", 9999.99);
p.reset(c);
But it is better to not use a raw pointer at all, it should be wrapped in a unique_ptr from the very beginning, eg:
unique_ptr<Payment> p(new Credit("<cardnumber>", "<expdate>", 9999.99));
Or:
unique_ptr<Payment> p = std::make_unique<Credit>("<cardnumber>", "<expdate>", 9999.99);
If you want to declare and assign p separately, you can do that too, eg:
unique_ptr<Payment> p;
...
p = std::unique_ptr<Payment>(new Credit("<cardnumber>", "<expdate>", 9999.99));
Or:
unique_ptr<Payment> p;
...
p = std::make_unique<Credit>("<cardnumber>", "<expdate>", 9999.99);