Create Subscription
POST/api/v1/subscriptions/
Create Subscription
Request
- application/json
Body
customer objectrequired
Customer's First Name
Customer's Last Name
Customer's email
Possible values: Value must match regular expression (\+63|0)?([.\- ]?9[0-9]{2}[.\- ]?[0-9]{3}[.\- ]?[0-9]{4})
Customer's mobile number
billing_details object
Merchant can pre-fill customer's billing details. If not supplied, customer will be asked to fill up billing details during Splitmo checkout.
Default value: PH
redirect_urls objectrequired
Merchant can supply a redirect URL after a successful or failed transaction.
Default value: 4G-SBP-8F0E03B3
Responses
- 200
Successful response
- application/json
- Schema
- Example (from schema)
Schema
customer object
Customer's First Name
Customer's Last Name
Customer's email
Possible values: Value must match regular expression (\+63|0)?([.\- ]?9[0-9]{2}[.\- ]?[0-9]{3}[.\- ]?[0-9]{4})
Customer's mobile number
billing_details object
Merchant can pre-fill customer's billing details. If not supplied, customer will be asked to fill up billing details during Splitmo checkout.
Default value: PH
redirect_urls object
Merchant can supply a redirect URL after a successful or failed transaction.
plan objectnullable
Subscription Plan Details
Possible values: [MO, WE, BI]
Possible values: [INITIATED, FOR_VERIFICATION, FOR_AUTHENTICATION, SUCCESSFUL, FAILED TO CAPTURE, FAILED TO AUTHORIZE, CANCELLED, REFUNDED]
{
"customer": {
"first_name": "Juan",
"last_name": "Dela Cruz",
"email": "juan@example.com",
"mobile": "09980000000"
},
"billing_details": {
"full_address": "Rufino cor Leviste Street, Salcedo Village, Makati City, 1227",
"city": "Makati City",
"zip_code": "1227",
"region": "NCR",
"country_code": "PH"
},
"redirect_urls": {
"success_url": "https://yoursite.com/?status=success",
"failure_url": "https://yoursite.com/?status=failed",
"cancel_url": "https://yoursite.com/?status=canceled"
},
"plan": {
"plan_name": "Gym Subscription Monthly",
"price": 1000,
"billing_cycle": "MO",
"short_lead": "Monthly Gym Subscription that includes personal trainer",
"company": "Monsters Inc."
},
"reference_id": "4G-SB-AF6A091C",
"checkout_url": "http://sandbox.splitmo.co/portals/example/subscription/4G-SBP-8F0E03B3/checkout/?id=4G-SB-AF6A091C",
"payment_method": null,
"status": "INITIATED"
}