# Welcome

Clean, fast and pure Ruby implementation for the [Affirm API](https://docs.affirm.com/affirm-developers/reference)

This is using the new Transaction API and is not compatible with the Charge API. Also see the [Affirm Changelog](https://docs.affirm.com/affirm-developers/changelog/transactions-api)

[![Gem Version](https://badge.fury.io/rb/affirm-ruby-api.svg)](https://badge.fury.io/rb/affirm-ruby-api) ![Tests](https://github.com/peterberkenbosch/affirm-ruby-api/workflows/Tests/badge.svg) ![StandardRB](https://github.com/peterberkenbosch/affirm-ruby-api/workflows/StandardRB/badge.svg)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'affirm-ruby-api'
```

And then execute:

```bash
$ bundle install
```

Or install it yourself as:

```bash
$ gem install affirm-ruby-api
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://peterberkenbosch.gitbook.io/affirm-ruby-api/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
