Create a Payer Authorisation
POST {{url}}/payer_authorisations
Payer Authorisations is deprecated in favour of Billing Requests. Please consider using Billing Requests to build any future integrations.
Creates a Payer Authorisation. The resource is saved to the database even if incomplete. An empty array of incomplete_fields means that the resource is valid. The ID of the resource is used for the other actions. This endpoint has been designed this way so you do not need to save any payer data on your servers or the browser while still being able to implement a progressive solution, such as a multi-step form.
Note: the region field should be uncommented for US customer addresses.
Note: Customer bank accounts can be created with local or international bank details. You can find the different local bank detail formats, and how they should be used with the GoCardless API here.
Create a Payer Authorisations API Docs
Request Body
{"payer_authorisations"=>{"customer"=>{"email"=>"newcustomer@example.com", "given_name"=>"{{$randomFirstName}}", "family_name"=>"{{$randomLastName}}", "address_line1"=>"27 Acer Road", "address_line2"=>"Apt 24", "city"=>"London", "postal_code"=>"E8 3GX", "country_code"=>"GB", "metadata"=>{"salesforce_id"=>"EFGH5678"}}, "bank_account"=>{"country_code"=>"GB", "account_holder_name"=>"Frank Osborne", "account_number"=>"55779911", "branch_code"=>"200000"}, "mandate"=>{"scheme"=>"bacs", "metadata"=>{"contract"=>"ABCD1234"}}}}
RESPONSES
status: Created
{"payer_authorisations":{"id":"PAU00002XASYBMX","created_at":"2024-03-22T21:11:54.547Z","customer":{"address_line1":"27 Acer Road","address_line2":"Apt 24","city":"London","country_code":"GB","email":"newcustomer@example.com","family_name":"Kuphal","given_name":"Anya","postal_code":"E8 3GX","metadata":{"salesforce_id":"EFGH5678"}},"bank_account":{"account_holder_name":"Frank Osborne","account_number_ending":"11","country_code":"GB","bank_name":"BARCLAYS BANK PLC","metadata":{}},"mandate":{"scheme":"bacs","metadata":{"contract":"ABCD1234"}},"status":"created","incomplete_fields":[],"links":{}}}