Testing your hosted checkout integration (macOS/Linux)
You can test the hosted checkout experience without much code. These steps show how to test a checkout session using basic tools (cURL and a web browser).
- Copy the following cURL command:
curl --location --request POST 'https://sandbox.dev.clover.com/invoicingcheckoutservice/v1/checkouts' \
--header 'X-Clover-Merchant-Id: {merchantId}' \
--header 'Authorization: Bearer {privateKey}' \
--header 'Content-Type: application/json' \
--data-raw '{
"customer" : {
"email": "{emailAddress}",
"firstName" : "Example",
"lastName": "Customer",
"phoneNumber": "223-555-0002"
},
"shoppingCart" : {
"lineItems": [
{
"name": "Apple",
"unitQty": 1,
"price": 100
},
{
"name": "Orange",
"unitQty": 2,
"price": 75
}
]
}
}'
- In a text editor, paste the command and then replace the following placeholders:
merchantId
privateKey
emailAddress
- Copy the edited command.
- Start a terminal session.
- Paste the edited cURL command and press Enter to run it.
A response is returned. - Copy the URL value from the
href
field. - In a web browser, paste the URL and press Enter.
- On the checkout page, verify the following information is correct:
- The items and their quantities are correct
- The customer’s information is correct
- Enter the following card information:
- Card Number -
6011 3610 0000 6668
- MM/YY - any month and year in the future
- CVV - any three-digit number
- Zip - any five-digit number
- Card Number -
- Click Pay.
The payment is processed and a Payment Received message appears. - Verify a receipt was sent to your email address.
Updated over 1 year ago
Did this page help you?