# Generate a payment URL

## cURL

```bash
curl --request POST \
  --url https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/payment_url \
  --header 'Authorization: Bearer <token>'
```

### Response Codes

- **200**: Successful request
- **401**: Unauthorized
- **403**: Forbidden
- **404**: Not Found
- **422**: Unprocessable Entity

```json
{
  "wallet_transaction_payment_details": {
    "lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "lago_wallet_transaction_id": "1e501a90-1a90-1a90-1a90-1a901a901a80",
    "external_customer_id": "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba",
    "payment_provider": "stripe",
    "payment_url": "https://foo.bar"
  }
}
```

## POST Request

Endpoint:

```
https://api.getlago.com/api/v1/wallet_transactions/{lago_id}/payment_url
```

### Authorizations

**Authorization**: `Bearer <token>`  
*required*  
Bearer authentication header of the form `Bearer <token>`, where `<token>` is your auth token.

### Path Parameters

- **lago_id**:  
  - Type: `string<uuid>`  
  - Required: Yes  
  - Description: ID of the wallet transaction.  
  - Example:  
    `"1a901a90-1a90-1a90-1a90-1a901a901a90"`

### Response Structure

- **200**: application/json
  - Payment URL has been generated.

**wallet_transaction_payment_details**: object
