Subscription is the process of recurring payments by a interval.
Subscription is useful for charging consumers a fixed sum of money, e.g. $10.99 per month, or any kind of future payments with a chosen sum.
POST
https://api.sensepass.com/api/transactions/init
Refer to the Subscritption entity at Subscription Model for additional information.
Name | Type | Description |
---|---|---|
timeOut
number
600
amount
number
1000
deviceId*
string
2ooeww5ufzg3nkuf8a10g15i5epu8o58jv1rznif3o1tr6xsb1rm
methodType*
string
subscription
callbackURL
string
https://your-domain.com/some-post-method-callback-endpoint
subscription.interval
string
Examples: 1day, 14day, 1month, 3month, 1year.
Default value: 1month
subscription.expiration
string
2024-01-01T12:00:00Z
subscription.dueDate
string
2023-01-01T12:00:00Z
SensePass sends callbacks about any change regarding subscription item.
The callback endpoint can be configured using "callbackURL" field on "Init" API of subscriptions.
Main model structure is identical to transaction status model
"parentTransaction" field was added for subscriptions, this field represents the orginal subscription transaction information
"parentTransaction.subscription" field was added with the subscription object, according to Subscription Model
Fetch a subscription by subscription ID.
It is required to send one authentication header, only one header key is required for the request in the example below
GET
https://api.sensepass.com/api/subscription/:subscriptionUid
Refer to the Subscritption entity at Subscription Model for additional information.
Update the subscription item to pause, resume or cancel its due payments.
Subscription with status canceled
can't be updated.
These are the available values for the status
parameter in the request body.
Only one header key is required for the request in the example below
PATCH
https://api.sensepass.com/api/subscription/:subscriptionUid
available status values are: active
, paused
, canceled
Refer to the Subscritption entity at Subscription Model for additional information.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
status | description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
subscriptionUid
string
bf8b7e01-466d-4996-b9a2-fc0880923359
subscription ID received from the Create a Transaction response
deviceId
string
2ooeww5ufzg3nkuf8a10g15i5epu8o58jv1rznif3o1tr6xsb1rm
merchantApiKey
string
xvRKKxOWAYbTH2yKQLlzkta2eovvkzlzTW98NcA9KVfwrOF22GA7bBOHHAeooQrmKelv0TU3Q7c8wiJgTQweKCbXR5ohC6JtCygJ
branchApiKey
string
mQzMLLSpqjRZfWBgQcAej5Dus7HHvmRsSsrN6FYoeWWUAehm3RjD596pZb9gfrxx4jQOP2MCQgoLaaU9SAdlzVsWnR63ZETqALpn
active
default value that sets the subscription to active status
paused
pauses the subscription untill set back to active
canceled
canceles the subscription indefinitly
subscriptionUid
string
bf8b7e01-466d-4996-b9a2-fc0880923359.
subscription ID received from the Create a Transaction response
deviceId*
string
2ooeww5ufzg3nkuf8a10g15i5epu8o58jv1rznif3o1tr6xsb1rm
branchApiKey*
string
mQzMLLSpqjRZfWBgQcAej5Dus7HHvmRsSsrN6FYoeWWUAehm3RjD596pZb9gfrxx4jQOP2MCQgoLaaU9SAdlzVsWnR63ZETqALpn
merchantApiKey*
string
xvRKKxOWAYbTH2yKQLlzkta2eovvkzlzTW98NcA9KVfwrOF22GA7bBOHHAeooQrmKelv0TU3Q7c8wiJgTQweKCbXR5ohC6JtCygJ
status*
string
active,paused,canceled