x

One-time credit card payment showing "Paid by: Unknown Name" in Square Dashboard

I have a simple form that processes one-time credit card payments. I'm able to charge a card successfully however I am not sure how to associate their name with the transaction. 

 

I don't want to store or create customers since these are one-time payments. I'm using PHP and process-card.php. How do I send their name so that it shows up in the Square dashboard when I charge the card?

 

Screen Shot 2019-05-05 at 10.50.36 AM.png

 

In process-card.php I am wondering if I can just modify this block of code? For example, could I just add "family_name" to the $request_body? I have their name stored in a session as $_SESSION['name']

 

$request_body = array (
  
  "card_nonce" => $nonce,

  "amount_money" => array (
    "amount" => 100,
    "currency" => "USD"
  ),

  "idempotency_key" => uniqid()

);
1,159 Views
Message 1 of 3
Report
2 REPLIES 2
Admin

Hey @gryd. I escalated your post to our API team and currently there isn't a way to save a name like this. You would need to create a customer (using `CreateCustomer` endpoint) and then include the customer_id in the $request_body that you showed. There's more information about linking customers to transactions in the API documentation.

️ Helen
Seller Community Manager

Did you find help in the Seller Community? Mark a Best Answer to help others.
1,120 Views
Message 2 of 3
Report

Ok thanks for the reply I'll use the CreateCustomer endpoint and send their ID and name with the transaction. 

1,115 Views
Message 3 of 3
Report