HomeGuidesAPI ReferenceChangelog
Log In
Guides

Create a Subscription

Make sure you have your Merchant Configured on Portal with:
Payment Processor configured and an API Key in the header
Also make sure to have a ‘Recurring Strategy’ set on the portal with time and processor

Make 1 API call to set the recurring payment, user and payment method
Use API: {{Api Root}}/api/Subscriptions

For the {{Api Root}} variable:

Production:

https://api.revolv3.com>

Sandbox:

https://api-sandbox.revolv3.com

This is a POST request with a sample payload below. This call is also in the API docs. Additional calls around payments can also be found in the docs. Note this will create a customerId, or you can make the customer first and supply the customerId

{
    "PaymentMethods": [
        {
            "Priority": 0,
            "TaxAmount": null,
            "OriginalNetworkTransactionId": null,
            "BillingAddress": {
                "AddressId": null,
                "AddressLine1": "100 Main Street",
                "AddressLine2": "",
                "City": "Irvine",
                "State": "CA",
                "PostalCode": "92602",
                "PhoneNumber": null,
                "Email": null,
                "Country": "US"
            },
            "BillingFirstName": "John",
            "BillingLastName": "Doe",
            "CreditCard": {
                "PaymentAccountNumber": "4111111111111111",
                "ExpirationDate": "1025",
                "SecurityCode": null
            },
            "MerchantPaymentMethodRefId": "payment-method-ref-id_hgays-213-44d"
        }
    ],
    "ExistingPaymentMethod": null,
    "MerchantSubscriptionRefId": "1234-5678-9101",
    "BillingFrequencyType": "daily", //Daily, Weekly, Biweekly, Monthly, Bimonthly, Quarterly, Semiannually, Yearly
    "SubscriptionStatusType": "current", //Current, Recycle, Cancelled, PendingCancellation
    "SubscriptionCancelType": "immediate", //Immediate, EndOfCycle
    "StartDate": "2024-04-26T00:00:00",
    "TrialDuration": 0,
    "TrialDurationType": "daily", //Daily, Weekly, Biweekly, Monthly, Bimonthly, Quarterly, Semiannually, Yearly
    "Customer": {
        "FirstName": "John",
        "LastName": "Doe"
    },
    "SubscriptionBillingPlans": [
        {
            "Name": "Billing Plan 1",
            "Value": 10.99,
            "CycleCount": -1,
            "ValueType": "Standard", //Standard, Discount, DiscountPercentage, FinalDiscount, PriceOverride
            "StartCycleDelay": 0
        }
    ],
    "RecycleImmediatePayment": false
}

Response

{
    "subscriptionId": 1899,
    "customerId": 5409,
    "merchantSubscriptionRefId": "1234-5678-9101",
    "networkTransactionId": "111789899749482",
    "billingFrequencyType": "Daily",
    "subscriptionStatusType": "Current",
    "subscriptionCancelType": "Immediate",
    "initialBillDate": "4/26/2024",
    "nextBillDate": "5/3/2024",
    "taxAddress": null,
    "paymentMethodIds": [
        6064
    ],
    "cancelledAt": null,
    "billingPlans": [
        {
            "subscriptionBillingPlanId": 2300,
            "subscriptionId": 1899,
            "name": "Billing Plan 1",
            "value": 10.99,
            "startDate": "4/26/2024",
            "cyclesRemaining": -1,
            "cycleCount": -1,
            "valueType": "Standard"
        }
    ]
}

It’s possible, but optional to create a customerId first. You can use the same API call as above with empty place holders to get a customerId
{{Api Root}}/api/Customers

{
    "FirstName": "Jonh",
    "LastName": "White",
    "MerchantCustomerRefId": "YourCustomerID-123"
}

Repsonse:

{
    "customerId": 5405,
    "merchantCustomerRefId": "YourCustomerID-123",
    "firstName": "Jonh",
    "lastName": "White",
    "billingAddresses": [],
    "shippingAddresses": [],
    "taxAddresses": [],
    "subscriptions": []
}