Bank Authorisation
Bank Authorisations can be used to authorise Billing Requests. Authorisations are created against a specific bank, usually the bank that provides the payer's account.
Creation of Bank Authorisations is only permitted from GoCardless hosted UIs (see Billing Request Flows) to ensure we meet regulatory requirements for checkout flows.
Create a Bank Authorisation#
/bank_authorisationsCreate a Bank Authorisation.
Request Body
bank_authorisationsobject2 properties
redirect_uristring
URL that the payer can be redirected to after authorising the payment.
On completion of bank authorisation, the query parameter of either outcome=success or outcome=failure will be
appended to the redirect_uri to indicate the result of the bank authorisation. If the bank authorisation is
expired, the query parameter outcome=timeout will be appended to the redirect_uri, in which case you should
prompt the user to try the bank authorisation step again.
Please note: bank authorisations can still fail despite an outcome=success on the redirect_uri. It is therefore recommended to wait for the relevant bank authorisation event, such as BANK_AUTHORISATION_AUTHORISED, BANK_AUTHORISATION_DENIED, or BANK_AUTHORISATION_FAILED in order to show the correct outcome to the user.
The BillingRequestFlow ID will also be appended to the redirect_uri as query parameter id=BRF123.
Defaults to https://pay.gocardless.com/billing/static/thankyou.
linksobject
1 properties
billing_requeststring
ID of the billing request against which this authorisation was created.
Response 201
Resource created successfully
bank_authorisationsobject10 properties
idstring
Unique identifier, beginning with "BAU".
redirect_uristring
URL that the payer can be redirected to after authorising the payment.
On completion of bank authorisation, the query parameter of either outcome=success or outcome=failure will be
appended to the redirect_uri to indicate the result of the bank authorisation. If the bank authorisation is
expired, the query parameter outcome=timeout will be appended to the redirect_uri, in which case you should
prompt the user to try the bank authorisation step again.
Please note: bank authorisations can still fail despite an outcome=success on the redirect_uri. It is therefore recommended to wait for the relevant bank authorisation event, such as BANK_AUTHORISATION_AUTHORISED, BANK_AUTHORISATION_DENIED, or BANK_AUTHORISATION_FAILED in order to show the correct outcome to the user.
The BillingRequestFlow ID will also be appended to the redirect_uri as query parameter id=BRF123.
Defaults to https://pay.gocardless.com/billing/static/thankyou.
urlstring
URL for an oauth flow that will allow the user to authorise the payment
qr_code_urlstring
URL to a QR code PNG image of the bank authorisation url.
This QR code can be used as an alternative to providing the url to the payer to allow them to authorise with their mobile devices.
authorisation_typestring
Type of authorisation, can be either 'mandate' or 'payment'.
mandatepaymentcreated_atstring
Timestamp when the flow was created
expires_atstring
Timestamp when the url will expire. Each authorisation url currently lasts for 15 minutes, but this can vary by bank.
last_visited_atstring
Fixed timestamp, recording when the authorisation URL has been visited.
authorised_atstring
Fixed timestamp, recording when the user has been authorised.
linksobject
2 properties
billing_requeststring
ID of the billing request against which this authorisation was created.
institutionstring
ID of the institution against which this authorisation was created.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobjectGet a Bank Authorisation#
/bank_authorisations/{bank_authorisation_id}Get a single bank authorisation.
Path Parameters
| Name | Type | Description |
|---|---|---|
bank_authorisation_idrequired | string | The bank authorisation id |
Response 200
Successful response
bank_authorisationsobject10 properties
idstring
Unique identifier, beginning with "BAU".
redirect_uristring
URL that the payer can be redirected to after authorising the payment.
On completion of bank authorisation, the query parameter of either outcome=success or outcome=failure will be
appended to the redirect_uri to indicate the result of the bank authorisation. If the bank authorisation is
expired, the query parameter outcome=timeout will be appended to the redirect_uri, in which case you should
prompt the user to try the bank authorisation step again.
Please note: bank authorisations can still fail despite an outcome=success on the redirect_uri. It is therefore recommended to wait for the relevant bank authorisation event, such as BANK_AUTHORISATION_AUTHORISED, BANK_AUTHORISATION_DENIED, or BANK_AUTHORISATION_FAILED in order to show the correct outcome to the user.
The BillingRequestFlow ID will also be appended to the redirect_uri as query parameter id=BRF123.
Defaults to https://pay.gocardless.com/billing/static/thankyou.
urlstring
URL for an oauth flow that will allow the user to authorise the payment
qr_code_urlstring
URL to a QR code PNG image of the bank authorisation url.
This QR code can be used as an alternative to providing the url to the payer to allow them to authorise with their mobile devices.
authorisation_typestring
Type of authorisation, can be either 'mandate' or 'payment'.
mandatepaymentcreated_atstring
Timestamp when the flow was created
expires_atstring
Timestamp when the url will expire. Each authorisation url currently lasts for 15 minutes, but this can vary by bank.
last_visited_atstring
Fixed timestamp, recording when the authorisation URL has been visited.
authorised_atstring
Fixed timestamp, recording when the user has been authorised.
linksobject
2 properties
billing_requeststring
ID of the billing request against which this authorisation was created.
institutionstring
ID of the institution against which this authorisation was created.
Errors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
codeintegerdocumentation_urlstringerrorsarray2 properties
reasonstringmessagestringmessagestringrequest_idstringtypestringmetadataobjectlinksobject