question

manu avatar image
manu asked dalton85 answered

Clover Hosted iFrame - Warning Message

Hi Support,

I have few questions regarding the Clover Hosted iFrame Solution.

1. How to generate a multi-pay token?

I know that based on documentation, we need to create a customer profile and then use the customerID for subsequent future transactions. But is there any other way of generating a multi-pay token?

I came across this question "https://community.clover.com/questions/34645/how-to-generate-a-multi-pay-token-with-the-ecomm-i.html" and in their it mention a way to generate multi-pay token without creating a customer profile.

clover.createToken({ isMultipayToken: true }).then((result) => {}

Above is set at frontend and it seems to be working in sandbox. I am not sure if this will work in production. Can you please confirm if we can use this method?

2. If we save multiple cards in the customer profile, how can we select the card to charge as we are only setting the "source" to customer ID, is there a way to set the card as well?

3. When creating a charge using customerID, I am getting a warning message in the response "Subsequent credential on file pay request sent for without Initial credential on file pay request"

In the request "invoice_number" is set to the original "ref_num" we get back when we charge the customer ID the very first time.

Request
{
  "amount": 276,
  "currency": "USD",
  "source": "XHJT9X08Y0JM0",
  "external_reference_id": "900000196",
  "capture": true,
  "stored_credentials": {
    "sequence": "SUBSEQUENT",
    "initiator": "MERCHANT",
    "is_scheduled": true,
    "installment_info": {
            "bill_pay_indicator": "Recurring",
            "invoice_number": "1059863073"
        }
  }
}

Response
{
  "id" : "GS0GZBC90WPQC",
  "amount" : 276,
  "payment_method_details" : "card",
  "amount_refunded" : 0,
  "currency" : "USD",
  "created" : 1687563199958,
  "captured" : true,
  "ref_num" : "106579074",
  "auth_code" : "112674",
  "warning_message" : "Subsequent credential on file pay request sent for without Initial credential on file pay request.",
  "outcome" : {
    "network_status" : "approved_by_network",
    "type" : "authorized"
  },
  "paid" : true,
  "status" : "succeeded",
  "source" : {
    "id" : "XHJT9X08Y0JM0",
    "address_zip" : "30321",
    "brand" : "AMEX",
    "exp_month" : "12",
    "exp_year" : "2025",
    "first6" : "378282",
    "last4" : "0005"
  },
  "external_reference_id" : "900000196"
}
ecommerce
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bryanvargas avatar image
bryanvargas answered bryanvargas commented

1. clover.createToken({ isMultipayToken: true }).then((result) => {} is a working code in PROD but as an FYI. We do recommend using the proper way to create a multipay token by a customer profile by following: https://docs.clover.com/docs/ecommerce-saving-card


2. Clover choses the first CToken in the list if the customer has multiple cards on file if you only use the customerId as the source. You can run the /v3/merchants/{ {mid}}/customers/{customerId}}?expand=cards to get the source CToken and use that as the source for payment. An good explanation can be found here: https://community.clover.com/questions/28318/how-to-select-one-of-multiple-saved-cards.html

3. 'Subsequent credential on file pay request sent for without Initial credential on file pay request' is not failure msg it is just warning message which is thrown if clients are directly submitting card on file payment request without doing initial transaction.

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

manu avatar image manu commented ·

@ How to submit an initial transaction using "Card on File"?

This is what we currently doing after saveing the card on file for a customer for the first time, we create a charge using the folowing request:

  1. {
  2. "amount": 276,
  3. "currency": "USD",
  4. "source": "XHJT9X08Y0JM0",
  5. "external_reference_id": "900000196",
  6. "capture": true,
  7. "stored_credentials": {
  8. "sequence": "FIRST",
  9. "initiator": "CARDHOLDER",
  10. "is_scheduled": false
  11. }
  12. }
0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ manu commented ·

I would recommend going through our Create a Charge doc to show you step by step on how to create a charge: https://docs.clover.com/docs/create-a-charge

0 Likes 0 ·
dalton85 avatar image
dalton85 answered

I can offer some general guidance that may help you with your questions

Generating a multi-pay token The method you mentioned, clover.createToken({ isMultipayToken: true }), seems to be a specific implementation in the frontend code. It's best to refer to the official Clover documentation or contact their support directly to confirm if this method is suitable for use in a production environment.

Selecting a specific card for charging When using the customer profile with multiple cards saved, you typically need to specify the card's unique identifier or token as the payment source along with the customer ID. This way, you can select the specific card you want to charge from the customer's profile. MaryKayInTouch

Warning message "Subsequent credential on file pay request sent for without Initial credential on file pay request" This warning suggests that you may need to initiate an "Initial credential on file pay request" before sending subsequent payments. It's important to follow the proper sequence and adhere to any requirements or guidelines provided by Clover's documentation to avoid such warning messages.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community