Skip to content

Cancel a Subscription

PUT
/subscriptions/
curl --request PUT \
--url http://pay.caspeco.net/subscriptions/ \
--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/subscriptions/' \
--data '{ "Id": "b87ca816-cbe2-47c3-9b01-d90a8a88f770" }'

Cancel a subscription with sepcific parameters

Location
string
Example
http://pay.caspeco.net/v1/subscriptions/
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
Id
string
Example
{
"Id": "b87ca816-cbe2-47c3-9b01-d90a8a88f770"
}

Created

Media typeapplication/json
object
BuyerId
integer
MerchantId
integer
SubscriptionId
string
Charges
Array<object>
object
Id
string
Captured
boolean
Refunded
boolean
Amount
decimal
Currency
string
Merchant
integer
Customer
string
Order
string
OrderDescription
string
CreatedDate
string
LastCharge
string
NextCharge
string
Status
string
OrderNumber
string
PlanId
string
Examples
Exampleresponse
{
"BuyerId": 12922,
"MerchantId": 1215,
"SubscriptionId": "owjdaosdjq832u3jei",
"Charges": [
{
"Id": "aaa111",
"Captured": true,
"Refunded": false,
"Amount": 10000,
"Currency": "SEK",
"Merchant": 1234,
"Customer": "9d211740",
"Order": "ABC123",
"OrderDescription": "Silverpaketet"
}
],
"CreatedDate": "2016-03-31",
"LastCharge": "2016-03-31",
"NextCharge": "2016-03-31",
"Status": "Firstfailed",
"OrderNumber": "12312300",
"PlanId": "64f7d444-67f3-47b9-b4b3-7207a4043d9a"
}