Bank Authorisations#

Bank Authorisations represent an open banking payment flow where a tenant authorises a payment directly from their bank account. The tenant is redirected to their bank's authorization page.

The Bank Authorisation object#

AttributeTypeDescription
idstringUnique identifier with ba_ prefix
objectstringAlways "bank_authorisation"
statusenumpending, authorised, consumed, expired, failed
authorization_urlstringURL to redirect tenant for authorization
institutionobjectBank institution details
institution.idstringInstitution identifier
institution.namestringInstitution display name
institution.logo_urlstringInstitution logo URL
payment_intentstringAssociated PaymentIntent ID
customerstringCustomer ID
expires_attimestampWhen the authorisation expires
metadatahashKey-value pairs
createdtimestampTime at which the object was created
{
  "id": "ba_xyz789",
  "object": "bank_authorisation",
  "status": "pending",
  "authorization_url": "https://bank.example.com/authorize?ref=ba_xyz789",
  "institution": {
    "id": "revolut",
    "name": "Revolut",
    "logo_url": "https://assets.casapay.com/institutions/revolut.svg"
  },
  "payment_intent": "pi_1a2b3c4d",
  "customer": "cus_123456789",
  "expires_at": 1706227200,
  "created": 1706140800
}

Create a Bank Authorisation#

POST /v1/bank_authorisations

ParameterTypeRequiredDescription
payment_intentstringYesPaymentIntent ID
institutionstringYesInstitution identifier
redirect_urlstringYesReturn URL after authorization
curl https://api.casapay.com/v1/bank_authorisations \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_intent": "pi_1a2b3c4d",
    "institution": "revolut",
    "redirect_url": "https://your-app.com/payment/complete"
  }'

Retrieve a Bank Authorisation#

GET /v1/bank_authorisations/:id

curl https://api.casapay.com/v1/bank_authorisations/ba_xyz789 \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"

List Bank Authorisations#

GET /v1/bank_authorisations

ParameterTypeDescription
payment_intentstringFilter by PaymentIntent
statusstringFilter by status
limitintegerNumber of objects (1–100)
curl "https://api.casapay.com/v1/bank_authorisations?payment_intent=pi_1a2b3c4d" \
  -H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"