Subscription Consent

POST {{base_url}}/banking/v2/pay/domestic/subscription/subscriptionConsent

Create Subscription Consent

Before initiating a standing order payment, a subscription request must be created and presented to the user for their consent.

Payment request must include the bank details of the payee and the details of the payment (amount, currency and payment type).

Calling this endpoint will generate a bank sigin url that can be sent to the payer. The payer will have to authorise the payment by authenticating with their bank before it can be completed.

On successful authentication, a code, id_token, and state will be returned along with the bankId.

Attributes

FieldTypeDescription
bankIdintegerUnique identifier for the bank
redirectstring (link)URL to redirect to after the bank account is authorised
subscriptionRequestIdstringSubscription Request Id

Response

FieldTypeDescription
signInUrlstringSign in URL for the requested bank
subscriptionConsentIdstringUnique ID for the subscription consent
statusstring
bankIdintegerUnique identifier for the bank

Error Messages

ConditionResponse StatusResponse Body
Invalid bankId403 Forbidden
No request body400 Bad Request{error: "Missing/Invalid redirect”}
Missing/Invalid redirect400 Bad Request{error: "Missing/Invalid redirect”}
No subscriptionRequestId in the request body400 Bad Request{error: Missing/invalid subscriptionRequestId}
Invalid SubscriptionRequestId403 Forbidden
Server error500 Internal server error

Request Body

{"bankId"=>"52", "redirect"=>"http://localhost:3000", "subscriptionRequestId"=>"655dbfad-aeda-4370-9401-2b63651caea0", "clientCallbackUrl"=>"app-deep-link"}

HEADERS

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

RESPONSES

status: Created

{"bankId":20,"signInUrl":"Bank's signInUrl","subscriptionConsentId":"b64a7854-0ac7-4afe-8c1d-d999adcb4869","status":"AWAITINGAUTHORISATION"}