Create a payment
POST
/api/payments
Header Parameters
- Idempotency-KeystringrequiredDescription
Body Parameters
- bodyCreatePaymentDTOrequiredDescription
- orderIdstringrequiredExampleDescription
- amountnumberrequiredExampleDescriptionMinimum1
- currencystring<AED | ALL | AMD | ANG | AOA | ARS | AUD | AWG | AZN | BAM | BBD | BDT | BGN | BHD | BIF | BMD | BND | BOB | BRL | BSD | BWP | BYN | BZD | CAD | CHF | CLP | CNY | COP | CRC | CUP | CVE | CZK | DJF | DKK | DOP | DZD | EGP | ETB | EUR | FJD | FKP | GBP | GEL | GHS | GIP | GMD | GNF | GTQ | GYD | HKD | HNL | HRK | HTG | HUF | IDR | ILS | INR | IQD | JMD | JOD | JPY | KES | KGS | KHR | KMF | KRW | KWD | KYD | KZT | LAK | LBP | LKR | LRD | LSL | LYD | MAD | MDL | MGA | MKD | MMK | MNT | MOP | MRU | MUR | MVR | MWK | MXN | MYR | MZN | NAD | NGN | NIO | NOK | NPR | NZD | OMR | PAB | PEN | PGK | PHP | PKR | PLN | PYG | QAR | RON | RSD | RUB | RWF | SAR | SBD | SCR | SEK | SGD | SHP | SLE | SLL | SOS | SRD | SSP | STN | SVC | SZL | THB | TND | TOP | TRY | TTD | TWD | TZS | UAH | UGX | USD | UYU | UZS | VES | VND | VUV | WST | XAF | XCD | XOF | XPF | YER | ZAR | ZMW>requiredExampleDescriptionAllowedAEDALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBRLBSDBWPBYNBZDCADCHFCLPCNYCOPCRCCUPCVECZKDJFDKKDOPDZDEGPETBEURFJDFKPGBPGELGHSGIPGMDGNFGTQGYDHKDHNLHRKHTGHUFIDRILSINRIQDJMDJODJPYKESKGSKHRKMFKRWKWDKYDKZTLAKLBPLKRLRDLSLLYDMADMDLMGAMKDMMKMNTMOPMRUMURMVRMWKMXNMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPGKPHPPKRPLNPYGQARRONRSDRUBRWFSARSBDSCRSEKSGDSHPSLESLLSOSSRDSSPSTNSVCSZLTHBTNDTOPTRYTTDTWDTZSUAHUGXUSDUYUUZSVESVNDVUVWSTXAFXCDXOFXPFYERZARZMW
- captureMethodstring<automatic | manual>ExampleDescriptionDefaultautomaticAllowedautomaticmanual
- confirmbooleanDescriptionDefaultfalse
- channelstring<web | mobile>ExampleDescriptionDefaultwebAllowedwebmobile
- connectionInformationobjectrequired
- ConnectionInformationDto
- customerIPstringrequiredExampleDescription
- forterTokenCookiestringExampleDescription
- forterMobileUIDstringExampleDescription
- browserInfoobjectrequired
- BrowserInfoDto
- acceptHeaderstringExampleDescription
- languagestringExampleDescription
- screenHeightnumberExampleDescription
- screenWidthnumberExampleDescription
- colorDepthnumberExampleDescription
- userAgentstringrequiredExampleDescription
- timeZonenumberExampleDescription
- javaEnabledbooleanDescription
- javaScriptEnabledbooleanExampleDescription
- cartItemsCartItemDto[]requiredDescription
- namestringrequiredExampleDescription
- pricenumberrequiredExampleDescription
- quantitynumberrequiredExampleDescription
- typestring<tangible | non_tangible>requiredExampleDescriptionAllowedtangiblenon_tangible
- categorystringExampleDescription
- idstringExampleDescription
- shippingobjectrequired
- ShippingDto
- addressobject
- AddressDto
- countrystringrequiredExampleDescription
- line1stringExampleDescriptionMax Length255
- line2stringExampleDescriptionMax Length255
- postalCodestringExampleDescriptionMax Length20
- citystringExampleDescriptionMax Length200
- regionstringExampleDescriptionMax Length200
- deliveryMethodstringrequiredExampleDescription
- deliveryTypestring<digital | physical | hybrid>requiredExampleDescriptionAlloweddigitalphysicalhybrid
- deliveryPricenumberExampleDescription
- deliveryCommentsstringExampleDescription
- shipsFromPostalCodestringExampleDescription
- savedDataobject
- SavedDataDto
- usedbooleanDescription
- choseToSavebooleanDescription
- billingobject
- BillingDto
- addressobject
- AddressDto
- countrystringrequiredExampleDescription
- line1stringExampleDescriptionMax Length255
- line2stringExampleDescriptionMax Length255
- postalCodestringExampleDescriptionMax Length20
- citystringExampleDescriptionMax Length200
- regionstringExampleDescriptionMax Length200
- customerobjectrequired
- CustomerDto
- emailstringrequiredExampleDescription
- firstNamestringrequiredExampleDescription
- lastNamestringrequiredExampleDescription
- phonestringExampleDescription
- accountInfoobject
- AccountInfoDto
- idstringExampleDescriptionMax Length100
- createdAtnumberExampleDescription
- pastOrdersCountnumberExampleDescription
- pastOrdersSumnumberExampleDescription
- statusstringExampleDescription
- typestringDescription
- customerEngagementobject
- CustomerEngagementDto
- wishlistobject
- CustomerEngagementItemDto
- inUsebooleanDescription
- itemInListCountnumberDescription
- reviewsWrittenobject
- CustomerEngagementItemDto
- inUsebooleanDescription
- itemInListCountnumberDescription
- newslettersobject
- CustomerEngagementNewslettersDto
- inUsebooleanDescription
- taxobject
- TaxDto
- amountnumberExampleDescriptionMinimum0
- exemptbooleanDescription
- paymentMethodobjectrequired
- RedactedCardPaymentMethodDTO
- typestring<token | card | network_token>requiredExampleDescriptionAllowedtokencardnetwork_token
- cardobjectrequired
- CardDto
- numberstringrequiredExampleDescription
- expirationMonthnumberrequiredExampleDescriptionMinimum1Maximum12
- expirationYearnumberrequiredExampleDescriptionMinimum2000
- holderNamestringrequiredExampleDescription
- cvcstringrequiredExampleDescriptionMin Length3
- TokenPaymentMethodDTO
- typestring<token | card | network_token>requiredExampleDescriptionAllowedtokencardnetwork_token
- forterTokenStringstringExampleDescriptionMin Length36Max Length36
- forterTokenAliasKeystringExampleDescription
- forterTokenAliasValuestringExampleDescription
- forterCvcTokenStringstringDescription
- metadatamap<string, string>Example
{ "source": "web" }Description - additionalIdentifiersobjectDescription
- discountsDiscountDto[]Description
- codestringrequiredExampleDescription
- amountnumberrequiredExampleDescription
- managedOrderTokenstringExampleDescription
- forterDecisionCorrelationIdstringExampleDescription
Responses
201
- PaymentResponseDTODescription
- idstringrequiredDescription
- orderIdstringrequiredExampleDescription
- amountnumberrequiredExampleDescription
- capturedAmountnumberExampleDescription
- authorizedAmountnumberExampleDescription
- refundedAmountnumberDescription
- capturedAtstring<date-time>DescriptionFormatdate-time
- refundedAtstring<date-time>DescriptionFormatdate-time
- authorizedAtstring<date-time>DescriptionFormatdate-time
- authorizationExpiresAtstring<date-time>DescriptionFormatdate-time
- createdAtstring<date-time>ExampleDescriptionFormatdate-time
- currencystring<AED | ALL | AMD | ANG | AOA | ARS | AUD | AWG | AZN | BAM | BBD | BDT | BGN | BHD | BIF | BMD | BND | BOB | BRL | BSD | BWP | BYN | BZD | CAD | CHF | CLP | CNY | COP | CRC | CUP | CVE | CZK | DJF | DKK | DOP | DZD | EGP | ETB | EUR | FJD | FKP | GBP | GEL | GHS | GIP | GMD | GNF | GTQ | GYD | HKD | HNL | HRK | HTG | HUF | IDR | ILS | INR | IQD | JMD | JOD | JPY | KES | KGS | KHR | KMF | KRW | KWD | KYD | KZT | LAK | LBP | LKR | LRD | LSL | LYD | MAD | MDL | MGA | MKD | MMK | MNT | MOP | MRU | MUR | MVR | MWK | MXN | MYR | MZN | NAD | NGN | NIO | NOK | NPR | NZD | OMR | PAB | PEN | PGK | PHP | PKR | PLN | PYG | QAR | RON | RSD | RUB | RWF | SAR | SBD | SCR | SEK | SGD | SHP | SLE | SLL | SOS | SRD | SSP | STN | SVC | SZL | THB | TND | TOP | TRY | TTD | TWD | TZS | UAH | UGX | USD | UYU | UZS | VES | VND | VUV | WST | XAF | XCD | XOF | XPF | YER | ZAR | ZMW>requiredExampleDescriptionAllowedAEDALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBRLBSDBWPBYNBZDCADCHFCLPCNYCOPCRCCUPCVECZKDJFDKKDOPDZDEGPETBEURFJDFKPGBPGELGHSGIPGMDGNFGTQGYDHKDHNLHRKHTGHUFIDRILSINRIQDJMDJODJPYKESKGSKHRKMFKRWKWDKYDKZTLAKLBPLKRLRDLSLLYDMADMDLMGAMKDMMKMNTMOPMRUMURMVRMWKMXNMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPGKPHPPKRPLNPYGQARRONRSDRUBRWFSARSBDSCRSEKSGDSHPSLESLLSOSSRDSSPSTNSVCSZLTHBTNDTOPTRYTTDTWDTZSUAHUGXUSDUYUUZSVESVNDVUVWSTXAFXCDXOFXPFYERZARZMW
- statusstring<requires_payment_method | requires_confirmation | requires_action | processing | requires_capture | canceled | succeeded | failed>requiredExampleDescriptionAllowedrequires_payment_methodrequires_confirmationrequires_actionprocessingrequires_capturecanceledsucceededfailed
- nextActionobject
- PaymentNextActionDTO
- typestring<use_sdk>requiredExampleDescriptionAlloweduse_sdk
- useSdkobject
- UseSdkActionDTO
- tokenstringrequiredExampleDescription
- captureMethodstring<automatic | manual>ExampleDescriptionDefaultautomaticAllowedautomaticmanual
- paymentMethodobject
- PaymentMethodResponseDTO
- typestring<token | card | network_token>requiredExampleDescriptionAllowedtokencardnetwork_token
- cardobject
- PaymentMethodCardDTO
- brandstringrequiredExampleDescription
- last4stringrequiredExampleDescription
- expirationMonthstringrequiredExampleDescription
- expirationYearstringrequiredExampleDescription
- cardholderNamestringExampleDescription
- networkTokenobject
- NetworkTokenDTO
- usedbooleanrequiredDescription
- processorTokenstringExampleDescription
- processorobject
- ProcessorDTO
- namestring<stripe | adyen | braintree | airwallex | connexpay | echo | fiserv>DescriptionAllowedstripeadyenbraintreeairwallexconnexpayechofiserv
- transactionIdstringExampleDescription
- chargeIdstringExampleDescription
- authorizationobject
- AuthorizationDTO
- authorizationCodestringExampleDescription
- rawResponseCodestringExampleDescription
- rawResponseMessagestringExampleDescription
- processorResponseCodestring<approved | do_not_honor | generic_decline | insufficient_funds | limit_exceeded | expired_card | invalid_card_number | cvv_mismatch | avs_mismatch | invalid_account | call_issuer | lost_or_stolen_card | fraudulent | pickup_card | transaction_not_allowed | processor_unavailable | duplicate_transaction | invalid_amount | invalid_request | card_type_not_supported | configuration_error>ExampleDescriptionAllowedapproveddo_not_honorgeneric_declineinsufficient_fundslimit_exceededexpired_cardinvalid_card_numbercvv_mismatchavs_mismatchinvalid_accountcall_issuerlost_or_stolen_cardfraudulentpickup_cardtransaction_not_allowedprocessor_unavailableduplicate_transactioninvalid_amountinvalid_requestcard_type_not_supportedconfiguration_error
- checksobject
- CardChecksDTO
- addressCheckstring<pass | fail | unavailable | unchecked>DescriptionAllowedpassfailunavailableunchecked
- cvcCheckstring<pass | fail | unavailable | unchecked>DescriptionAllowedpassfailunavailableunchecked
- authenticationobject
- AuthenticationDTO
- threeDSecureobject
- ThreeDSecureResultsDTO
- statusstring<authenticated | attempted | failed | rejected | challenge_required | unavailable>DescriptionAllowedauthenticatedattemptedfailedrejectedchallenge_requiredunavailable
- versionstring<1.0.2 | 2.1.0 | 2.2.0 | 2.3.1>ExampleDescriptionAllowed1.0.22.1.02.2.02.3.1
- ecistring<00 | 01 | 02 | 04 | 05 | 06 | 07>ExampleDescriptionAllowed00010204050607
- metadataobjectDescription
- fraudobject
- PaymentFraudDTO
- preAuthobject
- FraudDecisionDTO
- decisionstring<approve | decline | not_reviewed>requiredDescriptionAllowedapprovedeclinenot_reviewed
- postAuthobject
- FraudDecisionDTO
- decisionstring<approve | decline | not_reviewed>requiredDescriptionAllowedapprovedeclinenot_reviewed
400
401
curl
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
}
]
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("idempotency-key", "string");
var raw = JSON.stringify({
"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
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/api/payments", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/api/payments")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["idempotency-key"] = "string"
request.body = JSON.dump({
"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
}
]
})
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/payments"
payload = json.dumps({
"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
}
]
})
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'idempotency-key': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
201
// Payment created
{
"id": "",
"orderId": "order-abc-123",
"amount": 9876,
"capturedAmount": 9876,
"authorizedAmount": 9876,
"refundedAmount": 0,
"capturedAt": "",
"refundedAt": "",
"authorizedAt": "",
"authorizationExpiresAt": "",
"createdAt": "2025-07-14T12:34:56.789Z",
"currency": "GBP",
"status": "succeeded",
"nextAction": {},
"captureMethod": "automatic",
"paymentMethod": {},
"processor": {},
"authorization": {},
"authentication": {},
"metadata": {},
"fraud": {}
}400
// Bad request
401
// Unauthorized