v1
latestOpenAPI 3.0.02026-07-26168846732.2 KBSubscriptions
Subscription - Create and Confirm
Creates and confirms a subscription in a single request.
post/subscriptions
Headers
X-Profile-Idstring required
Profile ID for authentication
Request body
Example request
{
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
}
},
"shipping": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
}
},
"payment_details": {
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "24",
"card_exp_year": "24",
"card_holder_name": "John Test",
"card_cvc": "242",
"card_issuer": "chase",
"card_type": "CREDIT",
"card_issuing_country": "INDIA",
"card_issuing_country_code": "IN",
"bank_code": "JP_AMEX",
"nick_name": "John Test"
},
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
}
}
},
"customer_acceptance": {
"accepted_at": "2022-09-10T10:11:12Z",
"online": {
"ip_address": "123.32.25.123"
}
},
"payment_method_id": "pm_01926c58bc6e77c09e809964e72af8c8"
}
}Response
Subscription created and confirmed successfully
Example response
{
"payment": {
"payment_method_id": "pm_01926c58bc6e77c09e809964e72af8c8",
"next_action": {
"redirect_to_url": "https://example.com/redirect"
},
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
}
},
"shipping": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
}
},
"payment_token": "token_sxJdmpUnpNsJk5VWzcjl"
},
"invoice": {
"payment_method_id": "pm_01926c58bc6e77c09e809964e72af8c8"
}
}