question

Prasad avatar image
Prasad asked Prasad commented

What is the Exact Flow to Place a Credit card Order in Clover ?

Hi Guys,

I Successfully Placing order on Sanbox with CASH and tender as cash. Thanks to developers who Helped me with the Suggestion when i Stuck up .

Now i started working with Credit card part . Actually I am a newcomer to this topic @ Clover . Previously we used Stripe.

The Flow I Understood on Clover :

  Create Order 
        Create Line Items
            Create Discount of Order 
                  Create Payment with tender and Line Items Tax-Amount 
                       Update the  Order with  payments discount etc and Lock it

As per the above flow Cash is Straight forward thing . But For Credit card i understood was

Create order 
        ............
        Create payment with tender as Credit Card 
           create an authorization

Here while iam trying to create an authorization it is not accepting the Payment created prior of authorization. Leading to Error :-

Payload :-

{
    "authcode": "FDHDFGDFG",
     "last4": 1111,
     "note": "NONE",
     "amount": 2100,
     "cardType": "VISA",
     "payment": {
          "id": "VH4KBKEDJ27YG"
        },
      "type":"AUTH"

}

Error :-

 {
  "message": "Invalid payment."
}

So can any one help me with exact Flow of clover to Place successful order with Credit card transaction

Thanks, Prasad

Orders
4 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.

Prasad avatar image Prasad commented ·

Actually i have been using V3 related apis for creating all the Stuff. ok ... Sure

0 Likes 0 ·
Miguel avatar image Miguel commented ·

Processing credit card payments online is different from other tenders like cash. You will need to use our Developer Pay API.

0 Likes 0 ·
Prasad avatar image Prasad commented ·

Sure miguel .. Actually i am bit concerned is Using V3 apis for Inventory menu creation , Order Processing ,Cash Payment Processing , V2 For CC processing . Here i would like to ask a query :- Is V3 backward Compatible ? where i can make api call consistently to v2. I presume V2 is Legacy version Which is being used in Prod . V3 is Latest . Could you tell me is it Precise Miguel . This helps me to Change my apis to to Legacy Version instead Latest .... Thanks,Miguel

0 Likes 0 ·
Miguel avatar image Miguel commented ·

There is not currently a V3 version of our Developer Pay API. You will need to use the V2 version.

0 Likes 0 ·
Miguel avatar image
Miguel Deactivated answered Prasad commented

Are you trying to process credit card payments online? If so, have you looked at our documentation on Developer Pay: https://docs.clover.com/build/develop...

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.

Prasad avatar image Prasad commented ·

Yes this helped me to Cc Payment Processing . Thanks

0 Likes 0 ·
Prasad avatar image Prasad commented ·

Hi Miguel,

As per the Docs iam trying to Process CC payment Via Clover .. it is result an error ...

Code used :-

https://sandbox.dev.clover.com/v2/merchant/MID/pay?access_token=access_token

Payload :-

{
  "orderId": "OrderId", 
  "taxAmount": 9, 
  "zip": "94041", 
  "expMonth": 1, 
  "cvv": "837", 
  "amount": 100, 
  "currency": "usd", 
  "last4": "1111", 
  "expYear": 2015, 
  "first6": "4111111" 
}

Expected Result should be SUCCESSFUL Payment .

But it is Resulting an Error :-

{
    "message": "Invalid card data"
}

0 Likes 0 ·
devender avatar image
devender answered devender edited
Is there any sample code for processing CC payment in php. I am trying to do it using curl but i did not found the MID where i can find it ?
When i am trying to hit URL
https://sandbox.dev.clover.com/v2/merchant/SQ6XFW5...
it destroy the session and give me message
{"message": "logged out"}
10 |2000

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