Skip to content

Get a Subscription

GET
/subscriptions/
curl --request GET \
--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": "12923" }'

Get subscription status and details. If the subscription plan is not registered, a 404 Not Found is returned.

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": "12923"
}

OK

Media typeapplication/json
object
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
Examples
Exampleresponse
{
"MerchantId": 12923,
"SubscriptionId": "b87ca816-cbe2-47c3-9b01-d90a8a88f770",
"Charges": [
{
"Id": "aaa111",
"Captured": true,
"Refunded": false,
"Amount": 10000,
"Currency": "SEK",
"Merchant": 1234,
"Customer": "9d211740",
"Order": "ABC123",
"OrderDescription": "Silverpaketet"
}
],
"CreatedDate": "2016-01-01",
"LastCharge": "2016-01-02",
"NextCharge": "2016-01-10",
"Status": "Active",
"OrderNumber": "12312300"
}