Skip to content

Create a Charge

POST
/charges
curl --request POST \
--url http://pay.caspeco.net/charges \
--header 'Content-Type: application/json' \
--header 'Date: Tue, 15 Nov 2014 08:12:31 GMT' \
--header 'Digest: SHA-256=7oaYBB1oQVPy1BvP2ndYtxdD5EWNynt9lxCHzOdXb1A=' \
--header 'Host: pay.caspeco.net' \
--header 'Location: http://pay.caspeco.net/v1/charges/' \
--data '{ "Amount": 10000, "AmountVat": 2500, "Customer": "9d211740", "Currency": "SEK", "Order": "ABC123", "OrderDescription": "Test Purchase", "Merchant": 1234, "ReturnUrl": "https://www.example-shop.com/payment-done", "ReplaceCard": true, "ProcessAggregatedPayment": false, "Capture": true, "PersonalIdentityNumber": "9000000000", "AuthenticationToken": "25fd41b0-8694-4046-9e6d-360065eabfb0", "Type": 1 }'

Create a new charge from a customer to a recipient merchant. Note: If the Capture parameter is not set to true, the customer’s card won’t actually be charged until a Capture is posted for this charge.

Location
string
Example
http://pay.caspeco.net/v1/charges/
Host
string

E.g. pay.caspeco.net

Example
pay.caspeco.net
Date
string

E.g. Tue, 15 Nov 2014 08:12:31 GMT

Example
Tue, 15 Nov 2014 08:12:31 GMT
Digest
string

E.g. SHA-256=7oaYBB1oQVPy1BvP2ndYtxdD5EWNynt9lxCHzOdXb1A=

Example
SHA-256=7oaYBB1oQVPy1BvP2ndYtxdD5EWNynt9lxCHzOdXb1A=
Media typeapplication/json
object
Amount
number
AmountVat
number
Customer
string
Currency
string
Order
string
OrderDescription
string
Merchant
number
ReturnUrl
string
ReplaceCard
boolean
ProcessAggregatedPayment
boolean
Capture
boolean
PersonalIdentityNumber
string
AuthenticationToken
string
Type
number
Example
{
"Amount": 10000,
"AmountVat": 2500,
"Customer": "9d211740",
"Currency": "SEK",
"Order": "ABC123",
"OrderDescription": "Test Purchase",
"Merchant": 1234,
"ReturnUrl": "https://www.example-shop.com/payment-done",
"ReplaceCard": true,
"ProcessAggregatedPayment": false,
"Capture": true,
"PersonalIdentityNumber": "9000000000",
"AuthenticationToken": "25fd41b0-8694-4046-9e6d-360065eabfb0",
"Type": 1
}

Created

Media typeapplication/json
object
Id
string
Amount
number
AmountVat
number
Captured
boolean
Refunded
boolean
Customer
string
Currency
string
Order
string
OrderDescription
string
Merchant
number
ReturnUrl
string
MaskedCardNumber
string
PaymentMethod
string
Status
number
AuthenticationToken
string
Error
string
HasError
boolean
VerificationNeeded
boolean
VerificationUrl
boolean
CustomerHasCard
boolean
TerminalUrl
string
PersonalIdentityNumber
string
Examples
Exampleresponse
{
"Id": "aaa111",
"Amount": 10000,
"AmountVat": 2500,
"Captured": false,
"Refunded": false,
"Customer": "9d211740",
"Currency": "SEK",
"Order": "ABC123",
"OrderDescription": "Test Purchase",
"Merchant": 1234,
"ReturnUrl": "https://www.example-shop.com/payment-done",
"MaskedCardNumber": "5413******1000",
"PaymentMethod": "card",
"Status": 1,
"AuthenticationToken": "25fd41b0-8694-4046-9e6d-360065eabfb0",
"Error": "",
"HasError": "false",
"VerificationNeeded": true,
"VerificationUrl": "https://pay.caspeco.se/Charge/aaa111/Verify",
"CustomerHasCard": true,
"TerminalUrl": "https://epayments.nets.eu",
"PersonalIdentityNumber": "9000000000"
}