Skip to content

Create a Subscription

POST
/subscriptions/
curl --request POST \
--url http://pay.caspeco.net/subscriptions/ \
--header 'Content-Type: application/json' \
--data '{ "Buyer": 12922, "PlanId": "64f7d444-67f3-47b9-b4b3-7207a4043d9a", "InstantCharge": "true", "StartDate": "2016-03-31", "EndDate": "2017-03-31", "Ordernumber": "12312300" }'

Register a new subscription.

Media typeapplication/json
object
Buyer
number
PlanId
string
InstantCharge
string
StartDate
string
EndDate
string
Ordernumber
string
Example
{
"Buyer": 12922,
"PlanId": "64f7d444-67f3-47b9-b4b3-7207a4043d9a",
"InstantCharge": "true",
"StartDate": "2016-03-31",
"EndDate": "2017-03-31",
"Ordernumber": "12312300"
}

Created

Media typeapplication/json
object
BuyerId
integer
MerchantId
integer
SubscriptionId
string
Charges
Array<object>
object
Id
string
Captured
boolean
Refunded
boolean
Amount
integer
Currency
string
Merchant
integer
Customer
string
Order
string
OrderDescription
string
CreatedDate
string
LastCharge
string
NextCharge
string
Status
string
OrderNumber
string
PlanId
string
Error
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",
"Error": ""
}