# Billing Request With Action

Source: https://docs.gocardless.com/docs/api-reference/billing-request-with-action

## Create a Billing Request with Actions

`POST /billing_requests/create_with_actions`

Creates a billing request and completes any specified actions in a single request.
This endpoint allows you to create a billing request and immediately complete actions
such as collecting customer details, bank account details, or other required actions.

### Request body

Wrap request body attributes in a `billing_request_with_actions` object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mandate_request` | object | No |  |
| `payment_request` | object | No |  |
| `metadata` | object | No | Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters. |
| `links` | object | No |  |
| `fallback_enabled` | boolean | No | (Optional) If true, this billing request can fallback from instant payment to direct debit. Should not be set if GoCardless payment intelligence feature is used.  See [Billing Requests: Retain customers with Fallbacks](https://developer.gocardless.com/billing-requests/retain-customers-with-fallbacks/) for more information. |
| `purpose_code` | string | No | Specifies the high-level purpose/category of a mandate and/or payment using a set of pre-defined categories. Provides context on the nature and reason for the payment to facilitate processing and compliance. See [Billing Request Purpose Codes](https://developer.gocardless.com/billing-request-purpose-codes/) for the complete list of valid codes. |
| `payment_purpose_code` | string | No | Specifies the underlying purpose of the payment. Defines the specific reason or type of service/goods the payment relates to, improving straight-through processing and compliance. See [VRP Commercial Payment Purpose Codes](https://developer.gocardless.com/vrp-commercial-payment-purpose-codes/) for the complete list of valid codes. |
| `payment_context_code` | string | No | Specifies the context or scenario in which the payment is being made. Defines whether the payment is for advance/arrears billing, point of sale transactions, ecommerce, or account transfers. This helps banks and payment processors understand the payment scenario and apply appropriate processing rules and risk controls. |
| `actions` | object | No | Action payloads |

### Responses

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