CardConnect Payments

CardConnect integration supports the purchase, authorize and capture payment methods.

post
Pay by card

https://api.moltin.com/v2/orders/:orderId/payments
Request
Response
Path Parameters
orderId
required
string
The UUID of the order you want to pay for
Headers
Authorization
required
string
The Bearer token to grant access to the API
Body Parameters
verification_value
required
string
The CVV/CVC code from the back of the card
year
required
string
The expiry year of the card
month
required
string
The expiry month of the card
number
required
string
The full card number
last_name
required
string
The last name of the card owner
first_name
required
string
The first name of the card owner
method
required
string
purchase, authorize or capture
gateway
required
string
You will use card_connect in this case
200: OK
{
"data": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "transaction",
"reference": "card_connect",
"gateway": "card_connect",
"amount": 100,
"currency": "USD",
"transaction-type": "purchase",
"status": "complete",
"relationships": {
"order": {
"data": {
"type": "order",
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}
},
"meta": {
"display_price": {
"amount": 100,
"currency": "USD",
"formatted": "$100.00"
},
"created_at": "2019-01-31T17:20:39.378Z"
}
}
}
cURL
JavaScript SDK
curl -X POST https://api.moltin.com/v2/orders/:order_id/payments \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"gateway": "card_connect",
"method": "purchase",
"first_name": "John",
"last_name": "Smith",
"number": "4242424242424242",
"month": "10",
"year": "2021",
"verification_value": "123"
}
}'
const MoltinGateway = require('@moltin/sdk').gateway
const Moltin = MoltinGateway({
client_id: 'X'
})
const orderId = 'XXXX'
Moltin.Orders.Payment(orderId, {
gateway: 'card_connect',
method: 'purchase',
first_name: 'John',
last_name: 'Smith',
number: '4242424242424242',
month: '10',
year: '2021',
verification_value: '123'
}).then(() => {
// Do something
})