Skip to main content

Send cardholder name


Strong CustomerAuthentication and PSD2 normative requires cardholder name to be sent for each transaction.

You can send cardholder name when you are confirming your payment on the client or on the server.

Confirm the payment (monei.js) Client-side#

// Confirm the paymentfunction moneiTokenHandler(token) {  return monei    .confirmPayment({      paymentId: '{{payment_id}}',      paymentToken: token,      paymentMethod: {card: {cardholderName: 'JOHN DOE'}}    })    .then(function (result) {      // At this moment you can show a customer the payment result      // But you should always rely on the result passed to the callback endpoint on your server      // to update the order status      console.log(result);    })    .catch(function (error) {      console.log(error);    });}

Confirm the payment (html form) Client-side#

<form  action="{{payment_id}}/confirm"  method="post"  id="payment-form">  <input type="hidden" name="paymentToken" value="7cc38b08ff471ccd313ad62b23b9f362b107560b" />  <input type="hidden" name="paymentMethod.card.cardholderName" value="JOHN DOE" />  <button type="submit" id="payment-button">Submit payment</button></form>

Confirm the payment Server-side#

curl --request POST '' \--header 'Authorization: pk_test_3c140607778e1217f56ccb8b50540e00' \--header 'Content-Type: application/json' \--data-raw '{  "paymentToken": "7cc38b08ff471ccd313ad62b23b9f362b107560b",  "paymentMethod": {    "card": {      "cardholderName": "JOHN DOE"    }  }}'