Subscriptions

SolidGate Subscription Service is a service, that allows you to create and maintain a stable and healthy subscription model for your businesses.

At the very beginning of work with the SolidGate Subscription System, the merchant must manually create a product with subscription rules in the admin panel.

After the product is created, the merchant will receive an automatically generated unique product identifier Product ID. This product identifier will be used further in all subscription operations within the framework of this product, such as: creating different types of subscriptions, creation of orders with a subscription, etc.

Create Card Subscription

By using the method of payment initiation, you can call the subscription service by providing the Subscription Product ID.

If the payment is successfully authorized, the subscription will be created for the specified user.

POST https://pay.solidgate.us/api/v3/init-payment

  

   Request Body Parameters

ParameterMandatoryTypeDescriptionExample
order_idMstring(100)Order ID specified in merchant system123443334
amountMintegerOrder amount - integer without fractional component (i.e cents). For instance, 1020 means 10 USD and 20 cents. 1020
currencyMstring(3)Currency amount. 3 letter currency code under ISO-4217USD
order_descriptionMstring(255)A description of the paymentPremium package
order_dateOstring(50)Date of order creation in format YYYY-MM-DD-HH-MM-SS2015-12-21 11:21:30
order_itemsOstring(255)Order items in UTF-8 code item 1, item 2
order_numberOintegerNumber of payments by user1
subscription_product_idOstring(36)ID of the predefined product
 
faf3b86a-1fe6-4ae5-84d4-ab0651d75db2
 
callback_urlOstring(255)URL of merchant page, where response with payment result will be senthttp://merchant.example/callback
fail_urlOstring(255)URL of merchant page, which a customer will be redirected in case of unsuccessful paymenthttp://merchant.example/fail
success_urlOstring(255)URL of merchant page, which a customer will be redirected in case of successful paymenthttp://merchant.example/success
settleMobject  
settle: delay_hoursMintegerTime (in hours) when auto-settle should be done 24
websiteOstring(255)Website from which transaction took placehttp://merchant.example
processing_midMstring(255)Use the processing MID parameter to route order on the chosen pathb0651d75db2
dynamic_descriptorOstring(50)The descriptor for the transactionpayhere.com
three_dsOobjectInformation required for 3D Secure payments 
three_ds: forceObooleanRouting payments flag for 3DS flow FALSE
three_ds: attempt_non_secureObooleanDetermines whether to attempt a 3D Secure payment as non-3D Secure should the card issuer not be enrolledFALSE
customerMobjectDetails of the customer to associate with the source 
customer: user_idMstring(100)The identifier of an existing customercuid_y343t4mf46fdzuxjbcn2giaqnb44
customer: emailMstring(100)An optional email address to associate with the customeruser@solidgate.us
customer: ip_addressMstring(50)The IP address used to make the payment. Required for some risk checks8.8.8.8
customer: first_nameOstring(100)The customer's first name.Chack
customer: last_nameOstring(100)The customer's last name. Blank
customer: phone_numberOstring(50)The payment source owner's phone number+1415 555 2671
customer: date_of_birthOstring(50)Birthdate in YYYY-MM-DD format. 2000-11-21
customer: ip_countryOstring(3)ISO-code of the country that was sent in the requestUSA
customer: delivery_addressOobjectThe delivery address 
customer: delivery_address: line1Ostring(100)The delivery address line 115 William St
customer: delivery_address: line2Ostring(100)The delivery address line 2 
customer: delivery_address: cityOstring(100)City of the delivery address New York
customer: delivery_address: stateOstring(100)State of the delivery address WA
customer: delivery_address: zipOstring(10)ZIP code of the delivery address 10005
customer: delivery_address: countryOstring(3)ISO country code of the delivery address USA
payment_formOobject  
payment_form: languageOstring(2)Language code of requested Payment formEN

Init Request Sample

{
  "order_id": "1234init",
  "amount": 1800,
  "currency": "USD",
  "order_description": "testPayment",
  "order_date": "2020-08-01",
  "order_items": "RandomOrderItems",
  "order_number": 78,
  "subscription_product_id": "fd812ef4-953c-4cab-beec-c271ac521bf4",
  "callback_url": "http://merchant.example/callback",
  "fail_url": "http://merchant.example/fail",
  "success_url": "http://merchant.example/success",
  "settle": {
    "delay_hours": 0
  },
  "website": "Website",
  "processing_mid": "12345",
  "dynamic_descriptor": "RandomDynamicDescriptor",
  "three_ds": {
    "force": true,
    "attempt_non_secure": true
  },
  "customer": {
    "user_id": "RandomUserID",
    "email": "test@solidgate.us",
    "ip_address": "8.8.8.8",
    "first_name": "FirstName",
    "last_name": "LastName",
    "phone_number": "+1415 555 2671",
    "date_of_birth": "2000-11-21",
    "ip_country": "USA",
    "delivery_address": {
      "line1": "Line1",
      "line2": "Line2",
      "city": "CityInit",
      "state": "State",
      "zip": "12345",
      "country": "USA"
    }
  },
  "payment_form": {
    "language": "en"
  }
}

 

    Response Body Parameters

ParameterTypeDescriptionExample
order_idstring(100)Order ID specified in merchant system123443334
amountintegerOrder amount - integer without fractional component (i.e cents). For instance, 1020 means 10 USD and 20 cents. 1020
currencystring(3)Currency amount. 3 letter currency code under ISO-4217USD
subscription_idstringIdentifier of the subscription in SolidGate Subscription Service 
payment_formobjectURL of the payment form 
payment_form: form_urlstringLanguage code of requested Payment formEN

Init Response Sample | Success

{
    "currency": "USD",
    "amount": 1800,
    "status": "created",
    "order_id": "1597424690734init",
    "subscription_id": "1582b04d-8644-4308-abef-90d0bee9c9b1",
    "payment_form": {
        "form_url": "https://form.solidgate.us/api/v3/purchase/eb3e2cdddbc441f43037fc649bc9ea339b08b1035f36c43396399"
    }
}

Init Response Sample | Fail

{
    "error": {
        "code": "1.01",
        "messages": [
            "Authentication failed"
        ]
    }
}