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
Field | Type | Description |
---|---|---|
bankId | integer | Unique identifier for the bank |
redirect | string (link) | URL to redirect to after the bank account is authorised |
subscriptionRequestId | string | Subscription Request Id |
Response
Field | Type | Description |
---|---|---|
signInUrl | string | Sign in URL for the requested bank |
subscriptionConsentId | string | Unique ID for the subscription consent |
status | string | |
bankId | integer | Unique identifier for the bank |
Error Messages
Condition | Response Status | Response Body |
---|---|---|
Invalid bankId | 403 Forbidden | |
No request body | 400 Bad Request | {error: "Missing/Invalid redirect”} |
Missing/Invalid redirect | 400 Bad Request | {error: "Missing/Invalid redirect”} |
No subscriptionRequestId in the request body | 400 Bad Request | {error: Missing/invalid subscriptionRequestId} |
Invalid SubscriptionRequestId | 403 Forbidden | |
Server error | 500 Internal server error |
Request Body
{"bankId"=>"52", "redirect"=>"http://localhost:3000", "subscriptionRequestId"=>"655dbfad-aeda-4370-9401-2b63651caea0", "clientCallbackUrl"=>"app-deep-link"}
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
{"bankId":20,"signInUrl":"Bank's signInUrl","subscriptionConsentId":"b64a7854-0ac7-4afe-8c1d-d999adcb4869","status":"AWAITINGAUTHORISATION"}