> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

## v2.0.0

As part of an ongoing effort to improve the consistency and usability of our SDKs, we've updated the SDK generation process.
This update introduces breaking changes to the SDK.
All breaking changes affect only method signatures and namespacing, not core record types or properties.
SDK initialization, configuration, business logic, and workflows remain unchanged.
For more information on precise method signatures and example usage, please see the [SDK reference on GitHub](https://github.com/payabli/sdk-rust/blob/main/reference.md).

### Request body wrapper types removed

The following types are deleted. Their fields are now on the parent request struct directly.

#### Removed types and their replacements

| Removed type              | Fields now on         | Method                                   |
| ------------------------- | --------------------- | ---------------------------------------- |
| `SubscriptionRequestBody` | `RequestSchedule`     | `subscription.new_subscription`          |
| `AuthorizePayoutBody`     | `RequestOutAuthorize` | `money_out.authorize_out`                |
| `ReissuePayoutBody`       | `ReissueOutRequest`   | `money_out.reissue_out`                  |
| `PaymentPageRequestBody`  | `PayLinkDataInvoice`  | `payment_link.add_pay_link_from_invoice` |

The `money_out.authorize_out` method also gains `allow_duplicated_bills`, `do_not_create_bills`, and `force_vendor_creation` as direct fields on `RequestOutAuthorize`.
The `payout_subscription.create_payout_subscription` method changes its request type from `PayoutSubscriptionRequestBody` to `RequestPayoutSchedule`.

### `PayMethodCredit.method` is now a required typed enum

```rust
// Before
PayMethodCredit { method: "card".to_string(), .. }

// After
PayMethodCredit { method: PayMethodCreditMethod::Card, .. }
```

Affects `MoneyIn::getpaid`, `getpaidv_2`, `authorize`, `authorizev_2`, `Subscription::new_subscription`, and `TokenStorage::add_method`.

### Field type changes

#### Full list

| Field                                           | Old type                             | New type                                 |
| ----------------------------------------------- | ------------------------------------ | ---------------------------------------- |
| `BillItem.item_cost`                            | Required `f64`                       | `Option<f64>` — wrap with `Some(5.0)`    |
| `CustomerData.identifier_fields` inner elements | `Vec<Option<String>>`                | `Vec<String>` — remove `Some()` wrappers |
| `BillOutData.terms`                             | `Terms("NET30".to_string())` newtype | `Terms::Net30` enum variant              |
| `BillOutData.vendor`                            | `VendorData`                         | `BillOutDataVendor`                      |

### Boarding structs changed to tuple newtypes

`ApplicationDataPayInServicesAch` and `ApplicationDataPayInServicesCard` changed from named-field structs to tuple structs. `ApplicationDataPayInContactsItem` and `ApplicationDataPayInOwnershipItem` follow the same pattern.

```rust
// Before
services: ApplicationDataPayInServices {
    ach: ApplicationDataPayInServicesAch {
        ach_setup_fields: AchSetup { ..Default::default() },
        ..Default::default()
    },
    ..Default::default()
}

contacts: Some(vec![ApplicationDataPayInContactsItem {
    contacts_fields: Contacts { contact_name: Some("...".to_string()), ..Default::default() },
    ..Default::default()
}])

// After
services: ApplicationDataPayInServices {
    ach: ApplicationDataPayInServicesAch(AchSetup { ..Default::default() }),
    ..Default::default()
}

contacts: Some(vec![ApplicationDataPayInContactsItem(Contacts {
    contact_name: Some("...".to_string()),
    ..Default::default()
})])
```