Create a payment
POST
/api/payments
acceptstringGenerated from available response content types
Idempotency-Keystring<p>Client-supplied key to safely retry the request without duplicating the operation.</p>
bodyobjectCreate a payment request
201Payment created
400Bad request
401Unauthorized
curl --request POST \
--url /api/payments \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'idempotency-key: string' \
--data-raw '{
"orderId": "order-abc-123",
"amount": 1000,
"currency": "GBP",
"captureMethod": "automatic",
"channel": "web",
"connectionInformation": {
"customerIP": "192.168.1.1"
},
"browserInfo": {
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
},
"cartItems": [
{
"name": "Wireless Mouse",
"price": 2999,
"quantity": 2,
"type": "tangible"
}
],
"shipping": {
"address": {
"country": "US"
},
"deliveryMethod": "FedEx Overnight",
"deliveryType": "physical",
"savedData": {}
},
"billing": {
"address": {
"country": "US"
}
},
"customer": {
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe"
},
"accountInfo": {
"customerEngagement": {
"wishlist": {},
"reviewsWritten": {},
"newsletters": {}
}
},
"tax": {},
"paymentMethod": {
"type": "card",
"card": {
"number": "4111111111111111",
"expirationMonth": 12,
"expirationYear": 2028,
"holderName": "John Doe",
"cvc": "123"
}
},
"discounts": [
{
"code": "SUMMER20",
"amount": 2000
}
]
}'