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

FieldTypeDescription
requestorBankAccountIdstringUnique identifier for the bank account (this is provided by Retrieve Bank Accounts endpoint)
productsstringComma separated list of products that can be subscribed
frequencystringPayment frequency MONTHLY/QUARTERLY/SEMIANNUAL/ANNUAL/DAILY
amountintegerSubscription amount
numberOfPaymentsintegerthe total number of payments to be made.
trialDurationintegertrail duration in days
currencystringcurrency
resourceBaseurlstringurl to get the static content details like description , offer details

Error Messages

ConditionResponse StatusResponse Body
No request body400 Bad Request{error: "Missing/Invalid json”}
No currency in the request body400 Bad Request{error: Missing/invalid currency}
No amount in the request body400 Bad Request{error: Missing/invalid amount}
No products in the request body400 Bad Request{error: "Missing/Invalid product}
No requestorBankAccountId in the request body400 Bad Request{error: "Missing/Invalid requestorBankAccountId}
No trialDuration400 Bad Request{error: Missing/Invalid trialDuration}
Server error500 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

KeyDatatypeRequiredDescription
Content-Typestring
X-Api-Keystring
X-Partner-Idstring
Authorizationstring
X-Company-Idstring

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"}