Deprecated API Reference

This API Reference is being deprecated. Please use the New API Reference.

Create Subscription Enrollment

A Subscription Enrollment details which Merchant gets charged, to what schedule, and when the subscription will start. The Subscription Enrollment must be associated with a Subscription Schedule.

Copy
Copied
curl https://finix.sandbox-payments-api.com/subscription/subscription_schedules/SUBSCHEDULE_uxsUJrgbQZEXsWm9toq6gZ/subscription_enrollments \
    -H "Content-Type: application/json" \
    -H 'Finix-Version: 2022-02-01' \
    -u  UStxEci4vXxGDWLQhNvao7YY:25038781-2369-4113-8187-34780e91052e \
    -d '
	{
	    "merchant": "MUucec6fHeaWo3VHYoSkUySM",
	    "nickname": "Security Fee",
	    "started_at": "2022-11-11T16:50:59.891Z",
	    "tags": {
	        "enrollment_info": "Security Fee Enrollment"
	    }
	}'

Example Response:

Copy
Copied
{
  "id" : "SUBENROLLMENT_mgGfnXiVyFGvVjKk4Q16Ho",
  "created_at" : "2022-10-10T02:38:36.73Z",
  "updated_at" : "2022-10-10T02:38:36.73Z",
  "created_by" : "UStxEci4vXxGDWLQhNvao7YY",
  "ended_at" : null,
  "merchant" : "MUucec6fHeaWo3VHYoSkUySM",
  "nickname" : "Security Fee",
  "started_at" : "2022-11-11T16:50:59.89Z",
  "subscription_schedule" : "SUBSCHEDULE_uxsUJrgbQZEXsWm9toq6gZ",
  "tags" : {
    "enrollment_info" : "Security Fee Enrollment"
  },
  "_links" : {
    "self" : {
      "href" : "https://finix.sandbox-payments-api.com/subscription/subscription_enrollments/SUBENROLLMENT_mgGfnXiVyFGvVjKk4Q16Ho"
    },
    "merchant" : {
      "href" : "https://finix.sandbox-payments-api.com/merchants/MUucec6fHeaWo3VHYoSkUySM"
    },
    "schedule" : {
      "href" : "https://finix.sandbox-payments-api.com/subscription/subscription_schedules/SUBSCHEDULE_uxsUJrgbQZEXsWm9toq6gZ"
    },
    "amounts" : {
      "href" : "https://finix.sandbox-payments-api.com/subscription/subscription_schedules/SUBSCHEDULE_uxsUJrgbQZEXsWm9toq6gZ/subscription_amounts"
    }
  }
}

HTTP Request

POST https://finix.sandbox-payments-api.com/subscription/subscription_schedules/:SUBSCRIPTION_SCHEDULE_ID/subscription_enrollments

URL Parameters

Parameter Description
:SUBSCRIPTION_SCHEDULE_ID ID of the Subscription Schedule

Request Arguments

Field Type Description
ended_at string, optional When the subscription will end in DateTime format. This field can be null. If left null, the Fee will continue in perpetuity
merchant string, required ID of the Merchant
nickname string, required Subscription Enrollment name
started_at string, required When the subscription will begin in DateTime format. The start date must be a future date
tags object, optional Key value pair annotating custom metadata (e.g. order numbers)

Response

Field Type Description
id string Subscription Enrollment ID
created_at string Timestamp of when the Subscription Enrollment was created
updated_at string Timestamp of when the Subscription Enrollment was last updated
created_by string User ID
ended_at string When the subscription will end in DateTime format. If left blank, it will continue in perpetuity
merchant string ID of the Merchant
nickname string Name of the Subscription Enrollment
started_at string When the subscription will begin in DateTime format
subscription_schedule string ID of the Subscription Schedule
tags object Key value pair annotating custom metadata (e.g. order numbers)