Subscription Request
POST {{base_url}}/banking/v2/pay/domestic/subscription/subscription-request
The 'Create Subscription Request' endpoint can be used to create request which contains the details the subscription plan such as the Payee Bank Account,Trial duration ,amount and products.
Attributes
| Field | Type | Description | 
|---|---|---|
| requestorBankAccountId | string | Unique identifier for the bank account (this is provided by Retrieve Bank Accounts endpoint) | 
| products | string | Comma separated list of products that can be subscribed | 
| frequency | string | Payment frequency MONTHLY/QUARTERLY/SEMIANNUAL/ANNUAL/DAILY | 
| amount | integer | Subscription amount | 
| numberOfPayments | integer | the total number of payments to be made. | 
| trialDuration | integer | trail duration in days | 
| currency | string | currency | 
| resourceBaseurl | string | url to get the static content details like description , offer details | 
Error Messages
| Condition | Response Status | Response Body | 
|---|---|---|
| No request body | 400 Bad Request | {error: "Missing/Invalid json”}  | 
| No currency in the request body | 400 Bad Request | {error: Missing/invalid currency}  | 
| No amount in the request body | 400 Bad Request | {error: Missing/invalid amount}  | 
| No products in the request body | 400 Bad Request | {error: "Missing/Invalid product}  | 
| No requestorBankAccountId in the request body | 400 Bad Request | {error: "Missing/Invalid requestorBankAccountId}  | 
| No trialDuration | 400 Bad Request | {error: Missing/Invalid trialDuration}  | 
| Server error | 500 Internal server error | 
Request Body
{"requestorBankAccountId"=>"807802ac-6699-4583-bf3b-c74dffcc2dd1", "products"=>"SMART_INVOICE", "frequency"=>"MONTHLY", "numberOfPayments"=>50, "trialDuration"=>45, "amount"=>"9.95", "currency"=>"GBP", "resourceBaseurl"=>""}
HEADERS
| Key | Datatype | Required | Description | 
|---|---|---|---|
Content-Type | string | ||
X-Api-Key | string | ||
X-Partner-Id | string | ||
Authorization | string | ||
X-Company-Id | string | 
RESPONSES
status: Created
{"id":"31dc2397-2e87-4c50-b037-ef3937a86bc0","requestorBankAccount":{"accountId":"accountId1234","bankId":20,"name":"Creditor account name","schemeName":"UK.OBIE.SortCodeAccountNumber","identification":"5000004001234","secondaryAccountIdentification":"","accountType":"BUSINESS"},"products":"SMART_INVOICE","frequency":"MONTHLY","numberOfPayments":50,"trialDuration":45,"amount":"9.95","currency":"GBP","resourceBaseurl":"","creationDate":"2022-02-23T17:42:02.454Z","updatedDate":"","status":"ACTIVE","requestorCompanyId":"37084fac-a47c-498f-8bf7-96b50a35c8bc"}