# Payer Authorisation

Source: https://docs.gocardless.com/docs/api-reference/payer-authorisation

## Get a single Payer Authorisation

`GET /payer_authorisations/{payer_authorisation_id}`

Retrieves the details of a single existing Payer Authorisation. It can be used for polling the status of a Payer Authorisation.

**Deprecated:** Payer Authorisation is legacy API and cannot be used by new integrators.
The [Billing Request](#billing-requests) API should be used for any new integrations.

### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `payer_authorisation_id` | path | string | Yes | The payer authorisation id |

### Responses

| Status | Description |
| --- | --- |
| 200 | Successful response |
| 400 | Bad Request |
| 401 | Unauthorised |
| 404 | Not found |
| 422 | Validation Error |
| 500 | Internal Error |

---

## Update a Payer Authorisation

`PUT /payer_authorisations/{payer_authorisation_id}`

Updates a Payer Authorisation. Updates the Payer Authorisation with the request data. Can be invoked as many times as needed. Only fields present in the request will be modified. An empty array of incomplete_fields means that the resource is valid. 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 a multi-step form. <p class="notice"> Note that in order to update the `metadata` attribute values it must be sent completely as it overrides the previously existing values. </p>

**Deprecated:** Payer Authorisation is legacy API and cannot be used by new integrators.
The [Billing Request](#billing-requests) API should be used for any new integrations.

### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `payer_authorisation_id` | path | string | Yes | The payer authorisation id |

### Request body

Wrap request body attributes in a `payer_authorisations` object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `customer` | object | No | All details required for the creation of a [Customer](#core-endpoints-customers). |
| `bank_account` | object | No | All details required for the creation of a [Customer Bank Account](#core-endpoints-customer-bank-accounts). |
| `mandate` | object | No | All details required for the creation of a [Mandate](#core-endpoints-mandates). |

### Responses

| Status | Description |
| --- | --- |
| 200 | Successful response |
| 400 | Bad Request |
| 401 | Unauthorised |
| 404 | Not found |
| 422 | Validation Error |
| 500 | Internal Error |

---

## Create a Payer Authorisation

`POST /payer_authorisations`

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.

**Deprecated:** Payer Authorisation is legacy API and cannot be used by new integrators.
The [Billing Request](#billing-requests) API should be used for any new integrations.

### Request body

Wrap request body attributes in a `payer_authorisations` object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `customer` | object | No | All details required for the creation of a [Customer](#core-endpoints-customers). |
| `bank_account` | object | No | All details required for the creation of a [Customer Bank Account](#core-endpoints-customer-bank-accounts). |
| `mandate` | object | No | All details required for the creation of a [Mandate](#core-endpoints-mandates). |

### Responses

| Status | Description |
| --- | --- |
| 201 | Resource created successfully |
| 400 | Bad Request |
| 401 | Unauthorised |
| 404 | Not found |
| 422 | Validation Error |
| 500 | Internal Error |

---

## Submit a Payer Authorisation

`POST /payer_authorisations/{payer_authorisation_id}/actions/submit`

Submits all the data previously pushed to this PayerAuthorisation for verification. This time, a 200 HTTP status is returned if the resource is valid and a 422 error response in case of validation errors. After it is successfully submitted, the Payer Authorisation can no longer be edited.

**Deprecated:** Payer Authorisation is legacy API and cannot be used by new integrators.
The [Billing Request](#billing-requests) API should be used for any new integrations.

### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `payer_authorisation_id` | path | string | Yes | The payer authorisation id |

### Responses

| Status | Description |
| --- | --- |
| 200 | Action completed successfully |
| 400 | Bad Request |
| 401 | Unauthorised |
| 404 | Not found |
| 422 | Validation Error |
| 500 | Internal Error |

---

## Confirm a Payer Authorisation

`POST /payer_authorisations/{payer_authorisation_id}/actions/confirm`

Confirms the Payer Authorisation, indicating that the resources are ready to be created.
A Payer Authorisation cannot be confirmed if it hasn't been submitted yet.

<p class="notice">
  The main use of the confirm endpoint is to enable integrators to acknowledge the end of the setup process.
  They might want to make the payers go through some other steps after they go through our flow or make them go through the necessary verification mechanism (upcoming feature).
</p>

**Deprecated:** Payer Authorisation is legacy API and cannot be used by new integrators.
The [Billing Request](#billing-requests) API should be used for any new integrations.

### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `payer_authorisation_id` | path | string | Yes | The payer authorisation id |

### Responses

| Status | Description |
| --- | --- |
| 200 | Action completed successfully |
| 400 | Bad Request |
| 401 | Unauthorised |
| 404 | Not found |
| 422 | Validation Error |
| 500 | Internal Error |
