Searching in here https://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_s2member_custom_fields()
There is nothing about coupon in above link. I edit user manually and put coupon code ‘coup333’. At the moment code is
<?php $user_detail[]= array( "coupon_code" => get_user_field ("s2member_coupon_code"),); ?>which gives me
“coupon_code”: false,
also tried
“coupon_code” => get_user_field (“coupon_code”)
but same result. For the rest of get_user_field parameter its fine.