Create Subscription

The Create Subscription request enables you to set up a subscription, which associates a shopper with a plan to bill on an ongoing basis.

For more information about working with subscriptions, see the Subscriptions tutorial.

👍

Testing subscription charges in sandbox

After creating a subscription in sandbox, you can simulate a recurring charge event and trigger associated IPNs, emails, and invoices. Refer to the Subscriptions Guide to learn how.

Try it in the API Explorer

Request Content

Send a subscription object, with the following:

      payerInfo   object   optional - do not include if sending vaultedShopperId (refer to payerInfo)
     vaultedShopperId   integer   optional - do not include if sending payerInfo
     vendorsInfo object    optional (refer to vendorsInfo)
     paymentSource   object   required for payerInfo; optional for vaultedShopperId (refer to paymentSource)
     authorizedByShopper   boolean   required for ACH/ECP and SEPA Direct Debit value must be true
     overrideInitialChargeAmount   decimal   optional
     overrideRecurringChargeAmount   decimal   optional
     quantity   integer   optional
     overrideTrialPeriodDays   integer   optional
     softDescriptor   string   optional
     descriptorPhoneNumber   string   optional
     planId   integer    required
     threeDSecure   object   optional (refer to threeDSecure)
     transactionFraudInfo   object   optional (refer to transactionFraudInfo)
     level3Data   object   optional (refer to level3Data)
     initialTaxReference   string   optional
     recurringTaxReference   string   optional
     networkTransactionInfo   object   optional (refer to networkTransactionInfo)
     transactionInitiator   string   optional

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the subscription object.
The subscriptionId appears in the response body and the location header (unless ACH or SEPA DD was used).


Examples

Request Examples

curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "payerInfo": {
        "zip": 02453,
        "firstName": "John",
        "lastName": "Doe",
        "phone": 1234567890
    },
    "paymentSource": {"creditCardInfo": {"creditCard": {
        "expirationYear": 2023,
        "securityCode": 111,
        "expirationMonth": "07",
        "cardNumber": 4111111111111111
    }}},
    "planId": 2283845,
    "transactionFraudInfo": {
        "fraudSessionId": 1234,
        "customerId": "121341",
        "customerCreationDate": "2021-08-05"
    }
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "vaultedShopperId": 20769005,
    "overrideInitialChargeAmount": 10.5,
    "overrideRecurringChargeAmount": 29.99,
    "quantity": 2,
    "overrideTrialPeriodDays": 10,
    "softDescriptor": "Merchant name",
    "planId": 2283845,
    "transactionFraudInfo": {
        "shopperIpAddress": "123.12.134.1",
        "fraudSessionId": 1234,
        "company": "Company Name",
        "shippingContactInfo": {
            "zip": 02453,
            "country": "US",
            "firstName": "Doe",
            "lastName": "John",
            "city": "Juneau",
            "address2": "Apt 2",
            "address1": "1 Main St",
            "state": "AK"
        }
    }
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "vaultedShopperId": 20769005,
    "paymentSource": {"creditCardInfo": {"creditCard": {
        "cardLastFourDigits": "9299",
        "cardType": "VISA"
    }}},
    "planId": 2283845
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{  
   "payerInfo":{  
      "zip":02453,
      "firstName":"John",
      "lastName":"Doe",
      "phone":1234567890
   },
   "paymentSource":{  
       "pfToken":"339110a75e2cdbb5f5f2cea8d7cd8af261ad7c89fb0ce1aae_"
   },
   "planId":2186278
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
  "payerInfo": {
    "zip": 02453,
    "firstName": "John",
    "lastName": "Doe",
    "phone": 1234567890
  },
  "paymentSource": {
    "creditCardInfo": {
      "creditCard": {
        "expirationYear": 2023,
        "securityCode": 111,
        "expirationMonth": "07",
        "cardNumber": 4111111111111111
      }
    }
  },
  "planId": 2283845,
  "transactionFraudInfo": {
    "fraudSessionId": 1234
  },
  "vendorsInfo": {
    "vendorInfo": [{ "vendorId": "10398032" }]
  }
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
	"planId": 2193990,
	"paymentSource": {
		"wallet": {
			"walletType": "APPLE_PAY",
			"encodedPaymentToken": "eyJiaWxsaW5nQ29udGFjdCI6eyJhZGRyZ..."
		}
	}
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "planId": 2283845,
    "authorizedByShopper": true,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe",
        "country": "fr",
        "zip": "75001",
        "phone": "1234567890"
    },
    "paymentSource": {
        "sepaDirectDebitInfo": {
            "sepaDirectDebit": {
                "iban": "DE09100100101234567893"
            }
        }
    }
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "planId": 2380391,
    "authorizedByShopper": true,
    "payerInfo": {
        "firstName": "Jane",
        "lastName": "Doe",
        "country": "us",
        "zip": "02453",
        "phone": "1234567890"
    },
    "paymentSource": {
      "ecpInfo": {
        "ecp": {
          "accountNumber": 4099999992, 
          "routingNumber": "011075150",
          "accountType": "CONSUMER_CHECKING"
        }
      }
   }
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "paymentSource": {
        "wallet": {
           "walletType": "GOOGLE_PAY",
           "encodedPaymentToken": "eyJwYXltZW50TWV0aG9kVG9rZW4iOnsilIjoiIn19"
     }},
    "planId": 2283845,
    "transactionFraudInfo": {"fraudSessionId": 1234}
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{  
   "payerInfo":{  
      "firstName":"PIFirstName",
      "lastName":"PILastName",
      "zip":"PIZip",
      "email":"[email protected]",
      "country":"il",
      "address":"PIaddress1",
      "address2":"PIaddress2",
      "city":"PICity"
   },
   "paymentSource":{  
      "creditCardInfo":{  
         "creditCard":{  
            "cardNumber":"5555555555554444",
            "securityCode":"111",
            "cardType":"MASTERCARD",
            "expirationMonth":"07",
            "expirationYear":"2025"
         },
         "billingContactInfo":{  
            "firstName":"BiFirstName",
            "lastName":"BiLastName",
            "address1":"BiAddress1",
            "address2":"BiAddress2",
            "city":"BiCity",
            "state":"CA",
            "country":"us",
            "zip":"BiZip"
         }
      }
   },
   "planId":2205010
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{  
   "vaultedShopperId":19641522,
   "paymentSource":{  
      "creditCardInfo":{  
         "creditCard":{  
            "cardNumber":"5555555555554444",
            "securityCode":"111",
            "cardType":"MASTERCARD",
            "expirationMonth":"07",
            "expirationYear":"2025"
         },
         "billingContactInfo":{  
            "firstName":"BiFirstName",
            "lastName":"BiLastName",
            "address1":"BiAddress1",
            "address2":"BiAddress2",
            "city":"BiCity",
            "state":"CA",
            "country":"us",
            "zip":"BiZip"
         }
      }
   },
   "planId":2205010
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "payerInfo": {
        "firstName": "PIFirstName",
        "lastName": "PILastName",
        "zip": "PIZip",
        "email": "[email protected]",
        "country": "il",
        "address": "PIaddress1",
        "address2": "PIaddress2",
        "city": "PICity"
    },
    "paymentSource": {
        "creditCardInfo": {
            "pfToken": "2586d05c0479ba1936db771124f74727a418ea5f0841054217fedfc403a76ad0_",
            "billingContactInfo": {
                "firstName": "BiFirstName",
                "lastName": "BiLastName",
                "address1": "BiAddress1",
                "address2": "BiAddress2",
                "city": "BiCity",
                "state": "CA",
                "country": "us",
                "zip": "BiZip"
            }
        }
    },
    "planId": 2205010
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{  
   "vaultedShopperId":19641506,
   "paymentSource":{  
      "creditCardInfo":{  
         "pfToken":"5df3b5db58d174315efde493b12afff24e33d3709490a4e99b28046497d95f7f_",
         "billingContactInfo":{  
            "firstName":"BiFirstName",
            "lastName":"BiLastName",
            "address1":"BiAddress1",
            "address2":"BiAddress2",
            "city":"BiCity",
            "state":"CA",
            "country":"us",
            "zip":"BiZip"
         }
      }
   },
   "planId":2205010
}
curl -v -X POST https://sandbox.bluesnap.com/services/2/recurring/subscriptions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
    "planId": 2190390,
    "vaultedShopperId": 19574268,
    "paymentSource": {
    "creditCardInfo": {
    		"creditCard": {
        		"cardLastFourDigits": "1111",
        		"cardType": "VISA"
    		}
    	}
    },
    "threeDSecure": {
  		"threeDSecureReferenceId":"4851"
  }
}

Response Examples

{
    "nextChargeDate": "2016-08-16",
    "quantity": 1,
    "charge": {
        "amount": 100,
        "vaultedShopperId": 21188909,
        "chargeInfo": {
            "fromDate": "2016-08-02",
            "toDate": "2016-08-16",
            "chargeType": "INITIAL"
        },
        "chargeId": 12117877,
        "paymentSource": {"creditCardInfo": {"creditCard": {
            "expirationYear": 2023,
            "cardLastFourDigits": 1111,
            "cardSubType": "CREDIT",
            "cardType": "VISA",
            "expirationMonth": "07"
        }}},
        "softDescriptor": "BLS*default_descriptor",
        "planId": 2283845,
        "currency": "USD",
        "transactionDate": "2016-08-02",
        "subscriptionId": 8492717,
        "transactionId": 1012463333
    },
    "trialPeriodDays": 14,
    "paymentSource": {"creditCardInfo": {
        "billingContactInfo": {
            "firstName": "John",
            "lastName": "Doe"
        },
        "creditCard": {
            "expirationYear": 2019,
            "cardLastFourDigits": 1111,
            "cardSubType": "CREDIT",
          	"cardCategory": "CLASSIC",
            "cardType": "VISA",
            "expirationMonth": "07"
        }
    }},
    "softDescriptor": "BLS*default_descriptor",
    "recurringChargeAmount": 29.99,
    "chargeFrequency": "MONTHLY",
    "vaultedShopperId": 21188909,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "initialChargeAmount": 100,
    "autoRenew": true,
    "planId": 2283845,
    "currency": "USD",
    "subscriptionId": 8492717,
    "fraudResultInfo": {"deviceDataCollector": "Y"},
    "status": "ACTIVE"
}
{
    "subscriptionId": 39555010,
    "planId": 2193990,
    "vaultedShopperId": 19598232,
    "status": "ACTIVE",
    "quantity": 1,
    "softDescriptor": "BLS*CodeDiggers",
    "chargeFrequency": "WEEKLY",
    "recurringChargeAmount": 4.20,
    "currency": "USD",
    "autoRenew": true,
    "nextChargeDate": "2021-09-23",
    "payerInfo": {
        "firstName": "John",
        "lastName": "Smith",
        "email": "[email protected]",
        "country": "us",
        "state": "MA",
        "address": "800 South Street",
        "city": "Waltham",
        "zip": "01822"
    },
    "paymentSource": {
        "wallet": {
            "walletType": "APPLE_PAY",
            "billingContactInfo": {
                "firstName": "John",
                "lastName": "Smith",
                "address1": "800 South Street",
                "city": "Waltham",
                "state": "MA",
                "zip": "01822",
                "country": "us"
            },
            "applePay": {
                "cardLastFourDigits": "1471",
                "cardType": "MASTERCARD",
                "cardSubType": "DEBIT",
                "cardCategory": "ACQUIRER ONLY",
                "binCategory": "CONSUMER",
                "cardRegulated": "N",
                "issuingCountryCode": "us",
                "issuingBank": "MASTERCARD - MEMBER TEST FACILITY",
                "dpanLastFourDigits": "6937",
                "dpanExpirationMonth": "9",
                "dpanExpirationYear": "2022"
            },
            "tokenizedCard": {
                "dpanExpirationMonth": "9",
                "dpanExpirationYear": "2022",
                "dpanLastFourDigits": "6937",
                "cardLastFourDigits": "1471",
                "cardType": "MASTERCARD",
                "cardSubType": "DEBIT",
                "cardCategory": "ACQUIRER ONLY",
                "binCategory": "CONSUMER",
                "cardRegulated": "N",
                "issuingCountryCode": "us",
                "issuingBank": "MASTERCARD - MEMBER TEST FACILITY"
            }
        }
    },
    "charge": {
        "chargeId": 175051,
        "subscriptionId": 39555010,
        "planId": 2193990,
        "vaultedShopperId": 19598232,
        "transactionId": "38599976",
        "transactionDate": "2021-09-16",
        "amount": 4.20,
        "currency": "USD",
        "softDescriptor": "BLS*CodeDiggers",
        "paymentSource": {
            "wallet": {
                "walletType": "APPLE_PAY",
                "billingContactInfo": {
                    "firstName": "John",
                    "lastName": "Smith",
                    "address1": "800 South Street",
                    "city": "Waltham",
                    "state": "MA",
                    "zip": "01822",
                    "country": "us"
                },
                "applePay": {
                    "cardLastFourDigits": "1471",
                    "cardType": "MASTERCARD",
                    "cardSubType": "DEBIT",
                    "cardCategory": "ACQUIRER ONLY",
                    "binCategory": "CONSUMER",
                    "cardRegulated": "N",
                    "issuingCountryCode": "us",
                    "issuingBank": "MASTERCARD - MEMBER TEST FACILITY",
                    "dpanLastFourDigits": "6937",
                    "dpanExpirationMonth": "9",
                    "dpanExpirationYear": "2022"
                },
                "tokenizedCard": {
                    "dpanExpirationMonth": "9",
                    "dpanExpirationYear": "2022",
                    "dpanLastFourDigits": "6937",
                    "cardLastFourDigits": "1471",
                    "cardType": "MASTERCARD",
                    "cardSubType": "DEBIT",
                    "cardCategory": "ACQUIRER ONLY",
                    "binCategory": "CONSUMER",
                    "cardRegulated": "N",
                    "issuingCountryCode": "us",
                    "issuingBank": "MASTERCARD - MEMBER TEST FACILITY"
                }
            }
        },
        "chargeInfo": {
            "fromDate": "2021-09-16",
            "toDate": "2021-09-23",
            "chargeType": "INITIAL"
        },
        "processingInfo": {
            "processingStatus": "SUCCESS",
            "authorizationCode": "666151"
        }
    },
    "fraudResultInfo": {}
}
{
  "planId": 2436197,
  "vaultedShopperId": 21804015,
  "softDescriptor": "Oooops LTD",
  "payerInfo": {
    "firstName": "John",
    "lastName": "Doe",
    "country": "fr",
    "zip": "75001",
    "phone": "1234567890"
  },
  "paymentSource": {
    "sepaDirectDebitInfo": {
      "sepaDirectDebit": {
        "ibanFirstFour": "DE09",
        "ibanLastFour": "7893",
        "mandateId": "Ooo154091",
        "mandateDate": "25-Jul-17",
        "preNotificationText": "The amount of 29.99 EUR will be collected using SEPA Direct Debit with Mandate Ooo154091 from your bank account IBAN DE09XXXXXX7893 in the next few days. Please ensure sufficient funds in your account."
      }
    }
  },
  "charge": {
    "planId": 2436197,
    "vaultedShopperId": 21804015,
    "transactionId": "1011216623",
    "transactionDate": "2017-07-25",
    "amount": 29.99,
    "currency": "EUR",
    "softDescriptor": "Oooops LTD",
    "paymentSource": {
      "sepaDirectDebitInfo": {
        "sepaDirectDebit": {
          "ibanFirstFour": "DE09",
          "ibanLastFour": "7893",
          "mandateId": "Ooo154091",
          "mandateDate": "25-Jul-17",
          "preNotificationText": "The amount of 29.99 EUR will be collected using SEPA Direct Debit with Mandate Ooo154091 from your bank account IBAN DE09XXXXXX7893 in the next few days. Please ensure sufficient funds in your account."
        }
      }
    },
    "processingInfo": {
      "processingStatus": "PENDING"
    }
  }
}
{
  "planId": 2380391,
  "vaultedShopperId": 22330617,
  "softDescriptor": "default_descriptor",
  "payerInfo": {
    "firstName": "Jane",
    "lastName": "Doe",
    "country": "us",
    "zip": "02453",
    "phone": "1234567890"
  },
  "paymentSource": {
    "ecpInfo": {
      "ecp": {
        "accountNumber": "4099999992",
        "routingNumber": "011075150",
        "accountType": "CONSUMER_CHECKING"
      }
    }
  },
  "charge": {
    "planId": 2380391,
    "vaultedShopperId": 22330617,
    "transactionId": "1015610101",
    "transactionDate": "2018-01-25",
    "amount": 65,
    "currency": "USD",
    "softDescriptor": "default_descriptor",
    "paymentSource": {
      "ecpInfo": {
        "ecp": {
          "accountNumber": "4099999992",
          "routingNumber": "011075150",
          "accountType": "CONSUMER_CHECKING"
        }
      }
    },
    "chargeInfo": {
      "chargeType": "INITIAL"
    },
    "processingInfo": {
      "processingStatus": "PENDING"
    }
  }
}
{
    "subscriptionId": 39594120,
    "planId": 2203980,
    "vaultedShopperId": 19637272,
    "status": "ACTIVE",
    "quantity": 1,
    "softDescriptor": "BLS",
    "chargeFrequency": "MONTHLY",
    "recurringChargeAmount": 1.99,
    "currency": "USD",
    "autoRenew": true,
    "nextChargeDate": "2018-10-05",
    "payerInfo": {
        "firstName": "test first name",
        "lastName": "test last name", 
      	"zip": "02453",
        "country": "us",
        "state": "MA",
        "email": "test@gmail.com",
        "address": "32 some street",
        "city": "some city",
        "zip": "02186",
        "phone": "456276576"
    },
    "paymentSource": {
        "creditCardInfo": {
            "billingContactInfo": {
                "firstName": "test first name",
                "lastName": "test last name", 
      	        "zip": "02453",
                "country": "us",
                "state": "MA",
                "address": "32 some street",
                "city": "some city",
                "zip": "02186"
            },
            "creditCard": {
                "cardLastFourDigits": "1111",
                "cardType": "VISA",
                "cardSubType": "CREDIT",
                "cardCategory": "CLASSIC",
                "expirationMonth": "09",
                "expirationYear": "2022"
            }
        }
    },
    "charge": {
        "chargeId": 250389,
        "subscriptionId": 39594120,
        "planId": 2203980,
        "vaultedShopperId": 19637272,
        "transactionId": "38589782",
        "transactionDate": "2018-09-05",
        "amount": 1.99,
        "currency": "USD",
        "softDescriptor": "BLS",
        "paymentSource": {
            "creditCardInfo": {
                "creditCard": {
                    "cardLastFourDigits": "1111",
                    "cardType": "VISA",
                    "cardSubType": "CREDIT",
                    "cardCategory": "CLASSIC",
                    "expirationMonth": "09",
                    "expirationYear": "2022"
                }
            }
        },
        "chargeInfo": {
            "fromDate": "2018-09-05",
            "toDate": "2018-10-05",
            "chargeType": "INITIAL"
        },
        "processingInfo": {
            "processingStatus": "SUCCESS"
        }
    },
    "fraudResultInfo": {
        "deviceDataCollector": "N"
    }
}
{
    "cardTransactionType": "AUTH_ONLY",
    "transactionId": "1012751937",
    "softDescriptor": "BLS*DescTest",
    "amount": 11,
    "currency": "USD",
    "cardHolderInfo": {
        "firstName": "test first name",
        "lastName": "test last name", 
      	"zip": "02453",
        "country": "us"
    },
    "vaultedShopperId": 21289371,
    "wallet": {
        "walletType": "GOOGLE_PAY",
        "billingContactInfo": {
            "firstName": "test first name",
            "lastName": "test last name",
            "zip": "02453",
            "country": "us"
        },
        "tokenizedCard": {
            "cardLastFourDigits": "1111",
            "cardType": "VISA",
            "cardSubType": "CREDIT",
            "dpanExpirationMonth": "9",
            "dpanExpirationYear": "2025",
            "dpanLastFourDigits": "2222"
        }
    },
    "processingInfo": {
        "processingStatus": "success"
    }
}
{  
   "payerInfo":{  
      "firstName":"PIFirstName",
      "lastName":"PILastName",
      "zip":"PIZip",
      "email":"[email protected]",
      "country":"il",
      "address":"PIaddress1",
      "address2":"PIaddress2",
      "city":"PICity"
   },
   "paymentSource":{  
      "creditCardInfo":{  
         "creditCard":{  
            "cardNumber":"5555555555554444",
            "securityCode":"111",
            "cardType":"MASTERCARD",
            "expirationMonth":"07",
            "expirationYear":"2025"
         },
         "billingContactInfo":{  
            "firstName":"BiFirstName",
            "lastName":"BiLastName",
            "address1":"BiAddress1",
            "address2":"BiAddress2",
            "city":"BiCity",
            "state":"CA",
            "country":"us",
            "zip":"BiZip"
         }
      }
   },
   "planId":2205010
}
{  
   "subscriptionId":39598752,
   "planId":2205010,
   "vaultedShopperId":19641738,
   "status":"ACTIVE",
   "quantity":1,
   "softDescriptor":"BLS*try",
   "chargeFrequency":"MONTHLY",
   "recurringChargeAmount":1.99,
   "currency":"USD",
   "autoRenew":true,
   "nextChargeDate":"2019-02-27",
   "payerInfo":{  
      "firstName":"Shevie",
      "lastName":"Chen",
      "country":"us"
   },
   "paymentSource":{  
      "creditCardInfo":{  
         "billingContactInfo":{  
            "firstName":"BiFirstName",
            "lastName":"BiLastName",
            "address1":"BiAddress1",
            "address2":"BiAddress2",
            "city":"BiCity",
            "state":"CA",
            "zip":"BiZip",
            "country":"us"
         },
         "creditCard":{  
            "cardLastFourDigits":"4444",
            "cardType":"MASTERCARD",
            "binCategory":"CONSUMER",
            "cardRegulated":"N",
            "expirationMonth":"07",
            "expirationYear":"2025",
            "issuingCountryCode":"BR"
         }
      }
   },
   "charge":{  
      "chargeId":251237,
      "subscriptionId":39598752,
      "planId":2205010,
      "vaultedShopperId":19641738,
      "transactionId":"38597238",
      "transactionDate":"2019-01-27",
      "amount":1.99,
      "currency":"USD",
      "softDescriptor":"BLS*try",
      "paymentSource":{  
         "creditCardInfo":{  
            "billingContactInfo":{  
               "firstName":"BiFirstName",
               "lastName":"BiLastName",
               "address1":"BiAddress1",
               "address2":"BiAddress2",
               "city":"BiCity",
               "state":"CA",
               "zip":"BiZip",
               "country":"us"
            },
            "creditCard":{  
               "cardLastFourDigits":"4444",
               "cardType":"MASTERCARD",
               "binCategory":"CONSUMER",
               "expirationMonth":"07",
               "expirationYear":"2025"
            }
         }
      },
      "chargeInfo":{  
         "fromDate":"2019-01-27",
         "toDate":"2019-02-27",
         "chargeType":"INITIAL"
      },
      "processingInfo":{  
         "processingStatus":"SUCCESS"
      }
   },
   "fraudResultInfo":{  
      "deviceDataCollector":"N"
   }
}
{ 
   "subscriptionId":39598758,
   "planId":2205010,
   "vaultedShopperId":19641744,
   "status":"ACTIVE",
   "quantity":1,
   "softDescriptor":"BLS*try",
   "chargeFrequency":"MONTHLY",
   "recurringChargeAmount":1.99,
   "currency":"USD",
   "autoRenew":true,
   "nextChargeDate":"2019-02-27",
   "payerInfo":{  
      "firstName":"PIFirstName",
      "lastName":"PILastName",
      "email":"[email protected]",
      "country":"il",
      "address":"PIaddress1",
      "address2":"PIaddress2",
      "city":"PICity",
      "zip":"PIZip"
   },
   "paymentSource":{  
      "creditCardInfo":{  
         "billingContactInfo":{  
            "firstName":"BiFirstName",
            "lastName":"BiLastName",
            "address1":"BiAddress1",
            "address2":"BiAddress2",
            "city":"BiCity",
            "state":"CA",
            "zip":"BiZip",
            "country":"us"
         },
         "creditCard":{  
            "cardLastFourDigits":"0005",
            "cardType":"AMEX",
            "cardCategory":"CORPORATE",
            "binCategory":"COMMERCIAL",
            "cardRegulated":"Y",
            "issuingBank":"AMERICAN EXPRESS US (CARS)",
            "expirationMonth":"11",
            "expirationYear":"2024",
            "issuingCountryCode":"US"
         }
      }
   },
   "charge":{  
      "chargeId":251243,
      "subscriptionId":39598758,
      "planId":2205010,
      "vaultedShopperId":19641744,
      "transactionId":"38597248",
      "transactionDate":"2019-01-27",
      "amount":1.99,
      "currency":"USD",
      "softDescriptor":"BLS*try",
      "paymentSource":{  
         "creditCardInfo":{  
            "billingContactInfo":{  
               "firstName":"BiFirstName",
               "lastName":"BiLastName",
               "address1":"BiAddress1",
               "address2":"BiAddress2",
               "city":"BiCity",
               "state":"CA",
               "zip":"BiZip",
               "country":"us"
            },
            "creditCard":{  
               "cardLastFourDigits":"0005",
               "cardType":"AMEX",
               "binCategory":"CONSUMER",
               "expirationMonth":"11",
               "expirationYear":"2024"
            }
         }
      },
      "chargeInfo":{  
         "fromDate":"2019-01-27",
         "toDate":"2019-02-27",
         "chargeType":"INITIAL"
      },
      "processingInfo":{  
         "processingStatus":"SUCCESS"
      }
   },
   "fraudResultInfo":{  
      "deviceDataCollector":"N"
   }
}
{ 
   "subscriptionId":39598738,
   "planId":2205010,
   "vaultedShopperId":19641724,
   "status":"ACTIVE",
   "quantity":1,
   "softDescriptor":"BLS*try",
   "chargeFrequency":"MONTHLY",
   "recurringChargeAmount":1.99,
   "currency":"USD",
   "autoRenew":true,
   "nextChargeDate":"2019-02-27",
   "payerInfo":{  
      "firstName":"Shevie",
      "lastName":"Chen",
      "country":"us"
   },
   "paymentSource":{  
      "creditCardInfo":{  
         "billingContactInfo":{  
            "firstName":"BiFirstName",
            "lastName":"BiLastName",
            "address1":"BiAddress1",
            "address2":"BiAddress2",
            "city":"BiCity",
            "state":"CA",
            "zip":"BiZip",
            "country":"us"
         },
         "creditCard":{  
            "cardLastFourDigits":"0005",
            "cardType":"AMEX",
            "cardCategory":"CORPORATE",
            "binCategory":"COMMERCIAL",
            "cardRegulated":"Y",
            "issuingBank":"AMERICAN EXPRESS US (CARS)",
            "expirationMonth":"11",
            "expirationYear":"2024",
            "issuingCountryCode":"US"
         }
      }
   },
   "charge":{  
      "chargeId":251223,
      "subscriptionId":39598738,
      "planId":2205010,
      "vaultedShopperId":19641724,
      "transactionId":"38597218",
      "transactionDate":"2019-01-27",
      "amount":1.99,
      "currency":"USD",
      "softDescriptor":"BLS*try",
      "paymentSource":{  
         "creditCardInfo":{  
            "billingContactInfo":{  
               "firstName":"BiFirstName",
               "lastName":"BiLastName",
               "address1":"BiAddress1",
               "address2":"BiAddress2",
               "city":"BiCity",
               "state":"CA",
               "zip":"BiZip",
               "country":"us"
            },
            "creditCard":{  
               "cardLastFourDigits":"0005",
               "cardType":"AMEX",
               "binCategory":"CONSUMER",
               "expirationMonth":"11",
               "expirationYear":"2024"
            }
         }
      },
      "chargeInfo":{  
         "fromDate":"2019-01-27",
         "toDate":"2019-02-27",
         "chargeType":"INITIAL"
      },
      "processingInfo":{  
         "processingStatus":"SUCCESS"
      }
   },
   "fraudResultInfo":{  
      "deviceDataCollector":"N"
   }
}
{
    "planId": 2190390,
    "vaultedShopperId": 19574268,
    "softDescriptor": "BLS*BS",
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe",
        "email": "[email protected]",
        "country": "us",
        "state": "CA",
        "address": "138 Market St",
        "city": "San Francisco",
        "zip": "75654",
        "phone": "14135556789"
    },
    "paymentSource": {
        "creditCardInfo": {
            "billingContactInfo": {
                "firstName": "John",
                "lastName": "Doe",
                "address1": "138 Market St",
                "city": "San Francisco",
                "state": "CA",
                "zip": "75654",
                "country": "us"
            },
            "creditCard": {
                "cardLastFourDigits": "1111",
                "cardType": "VISA",
                "cardSubType": "CREDIT",
                "binCategory": "CONSUMER",
                "issuingBank": "JPMORGAN CHASE BANK, N.A.",
                "expirationMonth": "09",
                "expirationYear": "2023",
                "issuingCountryCode": "us"
            }
        }
    },
    "charge": {
        "planId": 2190390,
        "vaultedShopperId": 19574268,
        "transactionId": "38510944",
        "transactionDate": "2019-07-24",
        "amount": 10.00,
        "currency": "USD",
        "softDescriptor": "BLS*BS",
        "paymentSource": {
            "creditCardInfo": {
                "billingContactInfo": {
                    "firstName": "John",
                    "lastName": "Doe",
                    "address1": "138 Market St",
                    "city": "San Francisco",
                    "state": "CA",
                    "zip": "75654",
                    "country": "us"
                },
                "creditCard": {
                    "cardLastFourDigits": "1111",
                    "cardType": "VISA",
                    "cardSubType": "CREDIT",
                    "binCategory": "CONSUMER",
                    "issuingBank": "JPMORGAN CHASE BANK, N.A.",
                    "expirationMonth": "09",
                    "expirationYear": "2019",
                    "issuingCountryCode": "us"
                }
            }
        },
        "chargeInfo": {
            "chargeType": "INITIAL"
        },
        "processingInfo": {
            "processingStatus": "SUCCESS"
        }
    },
    "fraudResultInfo": {
        "deviceDataCollector": "N"
    },
    "threeDSecure": {
        "authenticationResult": "AUTHENTICATION_SUCCEEDED"
    }
}
{
    "nextChargeDate": "2016-08-16",
    "quantity": 1,
    "charge": {
        "amount": 100,
        "vaultedShopperId": 21188909,
        "chargeInfo": {
            "fromDate": "2016-08-02",
            "toDate": "2016-08-16",
            "chargeType": "INITIAL"
        },
        "chargeId": 12117877,
        "paymentSource": {"creditCardInfo": {"creditCard": {
            "expirationYear": 2023,
            "cardLastFourDigits": 1111,
            "cardSubType": "CREDIT",
            "cardType": "VISA",
            "expirationMonth": "07"
        }}},
        "softDescriptor": "BLS*default_descriptor",
        "planId": 2283845,
        "currency": "USD",
        "transactionDate": "2016-08-02",
        "subscriptionId": 8492717,
        "transactionId": 1012463333
    },
    "trialPeriodDays": 14,
    "paymentSource": {"creditCardInfo": {
        "billingContactInfo": {
            "firstName": "John",
            "lastName": "Doe"
        },
        "creditCard": {
            "expirationYear": 2019,
            "cardLastFourDigits": 1111,
            "cardSubType": "CREDIT",
          	"cardCategory": "CLASSIC",
            "cardType": "VISA",
            "expirationMonth": "07"
        }
    }},
    "softDescriptor": "BLS*default_descriptor",
    "recurringChargeAmount": 29.99,
    "chargeFrequency": "MONTHLY",
    "vaultedShopperId": 21188909,
    "payerInfo": {
        "firstName": "John",
        "lastName": "Doe"
    },
    "initialChargeAmount": 100,
    "autoRenew": true,
    "planId": 2283845,
    "currency": "USD",
    "subscriptionId": 8492717,
    "processingInfo": {"authorizationCode": "654321"},
    "fraudResultInfo": {"deviceDataCollector": "Y"},
    "status": "ACTIVE"
}
{
  "subscriptionId": 19752551,  
  "planId": 2283845,
  "vaultedShopperId": 27567993,
  "status": "ACTIVE",
  "quantity": 1,
  "softDescriptor": "BLS*default_descriptor",
  "vendorsInfo": {
    "vendorInfo": [
      {
        "vendorId": 10398032,
        "commissionPercent": 90.2
      }
    ]
  },
  "chargeFrequency": "MONTHLY",
  "trialPeriodDays": "14",
  "recurringChargeAmount": 29.99,
  "currency": "USD",
  "initialChargeAmount": 100.0,
  "autoRenew": true,
  "nextChargeDate": "2020-06-09",
  "payerInfo": {
    "firstName": "John",
    "lastName": "Doe",
    "zip": "02453",
    "phone": "1234567890"
  },
  "paymentSource": {
    "creditCardInfo": {
      "billingContactInfo": {
        "firstName": "John",
        "lastName": "Doe",
        "zip": "12345"
      },
      "creditCard": {
        "cardLastFourDigits": "1111",
        "cardType": "VISA",
        "cardSubType": "CREDIT",
        "binCategory": "CONSUMER",
        "cardRegulated": "Y",
        "issuingBank": "JPMORGAN CHASE BANK, N.A.",
        "expirationMonth": "07",
        "expirationYear": "2023",
        "issuingCountryCode": "us"
      }
    }
  },
  "charge": {
    "chargeId": 18319019,
    "subscriptionId": 19752551,
    "planId": 2283845,
    "vaultedShopperId": 27567993,
    "transactionId": "1031082549",
    "transactionDate": "2020-05-26",
    "amount": 100.0,
    "currency": "USD",
    "softDescriptor": "BLS*default_descriptor",
    "paymentSource": {
      "creditCardInfo": {
        "billingContactInfo": {
          "firstName": "John",
          "lastName": "Doe",
          "zip": "02453"
        },
        "creditCard": {
          "cardLastFourDigits": "1111",
          "cardType": "VISA",
          "cardSubType": "CREDIT",
          "binCategory": "CONSUMER",
          "cardRegulated": "Y",
          "issuingBank": "JPMORGAN CHASE BANK, N.A.",
          "expirationMonth": "07",
          "expirationYear": "2023",
          "issuingCountryCode": "us"
        }
      }
    },
    "chargeInfo": {
      "fromDate": "2020-05-26",
      "toDate": "2020-06-09",
      "chargeType": "INITIAL"
    },
    "processingInfo": {
      "processingStatus": "SUCCESS",
      "authorizationCode": "654321"
    },
    "vendorsInfo": {
      "vendorInfo": [
        {
          "vendorId": 10398032,
          "commissionPercent": 90.2
        }
      ]
    }
  },
  "fraudResultInfo": {}
}

Back to Top


Example Descriptions

Create Subscription: with new shopper

This example shows a basic Create Subscription request for a new shopper, with details about the shopper and their payment method.

Create Subscription: with vaulted shopper and optional fields

This example shows a Create Subscription request with an existing vaulted shopper who has only one saved payment method, so there is no need to specify which payment method to use.

This example request also includes all optional subscription fields, such as quantity, soft descriptor and the various override fields. The override values take precedence over the settings at the plan level, and they apply only to this subscription.

Create Subscription: with vaulted shopper and specific payment method

This example shows a Create Subscription request with an existing vaulted shopper who has multiple saved payment methods, so you must specify which payment method to use.

Create Subscription: with new shopper and Hosted Payment Fields

This example shows a Create Subscription request with a new shopper whose card information was collected using Hosted Payment Fields. Include pfToken in the request with its value set to the Hosted Payment Fields token.

Create Subscription: with new shopper and vendors info

This example shows a Create Subscription request with a Marketplace vendor. Include vendorsInfo in the request to process a transaction involving one or more vendors. For more details, refer to the Marketplace Guide.

Create Subscription: with Apple Pay

This example shows a Create Subscription request with an Apple Pay wallet. In the request, include the encodedPaymentToken inside paymentSource > wallet, also supply walletType of APPLE_PAY there. Refer to the Apple Pay Guide for more information.

Note: To test Apple Pay, follow the steps in the Apple Pay Guide. The API Explorer does not support Apple Pay testing.

Create Subscription: with SEPA Direct Debit

This example shows a Create Subscription request with a new shopper with the SEPA Direct Debit payment method. In the request, include authorizedByShopper with a value set to true to indicate that you've collected the shopper's mandate acceptance. Include the shopper's bank account details within paymentSource > sepaDirectDebitInfo > sepaDirectDebit.

Note: subscriptionId will not be returned in the response. The subscription ID will be created when the shopper's account is debited (typically within 5 - 6 business days). You will then be informed of the subscription ID via Charge webhook or via Retrieve Specific Charge request.

Create Subscription: with ACH/ECP

This example shows a Create Subscription request with a new shopper with the ACH/ECP payment method. In the request, include authorizedByShopper with a value set to true to indicate that you've collected the shopper's permission to debit their account. Include the shopper's bank account details within paymentSource > ecpInfo > ecp. If you would like to process the transaction for a returning shopper, pass an empty ecpInfo object.

Note: subscriptionId will not be returned in the response. The subscription ID will be created when the shopper's account is debited (typically within 2 business days). You will then be informed of the subscription ID via Charge webhook or via Retrieve Specific Charge request.

Create Subscription: with Google Pay™

This example shows a Create Subscription request with a Google Pay wallet. In the request, include walletType = GOOGLE_PAY and encodedPaymentToken inside paymentSource > wallet. See the Google Pay Guide for more information.

New shopper with different billing

This example shows a Create Subscription request with a new shopper whose the shopper contact details are different from the credit card billing information.

Vaulted shopper with billing

This example shows a Create Subscription request for an existing shopper with existing credit card information.

New shopper with hosted fields and different billing

This example shows a Create Subscription request for Hosted Payment Fields for a new shopper whose the shopper contact details are different from the credit card billing information.

Vaulted shopper with hosted fields and different billing

This example shows a Create Subscription request for Hosted Payment Fields for a an existing shopper with existing credit card information.


Back to Top


API Explorer

To test out a call, enter the request content below and then click Try it!

Tip: Use the JSON code below as a starting point. You can enter different parameters to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.

{
    "payerInfo": {
        "zip": 02453,
        "firstName": "John",
        "lastName": "Doe",
        "phone": 1234567890
    },
    "paymentSource": {"creditCardInfo": {"creditCard": {
        "expirationYear": 2019,
        "securityCode": 111,
        "expirationMonth": "07",
        "cardNumber": 4111111111111111
    }}},
    "planId": 2283845
}
Language
Authorization
:
Click Try It! to start a request and see the response here!