> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mercoa.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mercoa.com/_mcp/server.

# Get BNPL Offer

POST https://api.mercoa.com/invoice/{invoiceId}/bnpl/offer
Content-Type: application/json

Get a BNPL offer for an invoice

Reference: https://docs.mercoa.com/embedded-ap-ar/api-reference/invoice/bnpl/offer

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `invoiceId` (string, required) — Invoice ID or Invoice ForeignID

### Body (application/json)

This endpoint expects a BnplOfferRequest.

- `cadence` (enum, required) — The payment cadence for the BNPL offer
  - Allowed values: `WEEKLY`, `BIWEEKLY`, `MONTHLY`
- `installmentsStartDate` (string, required) — The start date for installments in YYYY-MM-DD format
- `numberOfInstallments` (integer, required) — The number of installments
- `paymentDayOfWeek` (enum, required) — The day of the week for payments
  - Allowed values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`
- `downPaymentDueDate` (string, required) — The due date for the down payment in YYYY-MM-DD format

## Response

### 200

- `invoiceAmount` (integer, required) — The total amount of the invoice in cents.
- `totalRepaymentAmount` (integer, required) — Total amount to be repaid, including fees. In cents.
- `currency` (string, required) — The currency code for the amount
- `downPaymentAmount` (integer, required) — The down payment amount in cents
- `numberOfPayments` (integer, required) — The number of payments/installments
- `firstPaymentDate` (string, required) — The date of the first payment in YYYY-MM-DD format
- `finalPaymentDate` (string, required) — The date of the final payment in YYYY-MM-DD format
- `fees` (BnplFees, required) — The fees associated with the offer
- `installments` (list of BnplInstallment, required) — A list of all installments, including down payment.
- `paymentDayOfWeek` (enum, required) — The day of the week for payments, e.g. "Wednesday"
  - Allowed values: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`
- `installmentAmount` (integer, required) — The amount for each regular installment. The last installment may have a different amount. In cents.
- `financeFeeRate` (string, required) — e.g. "1.5% per 28 days"
- `termsLink` (string, optional) — A link to the terms and conditions for the offer

## Errors

### 400 Bad Request

- `errorName` ("BadRequest", required)
- `content` (string, required)

### 401 Unauthorized

- `errorName` ("Unauthorized", required)
- `content` (string, required)

### 403 Forbidden

- `errorName` ("Forbidden", required)
- `content` (string, required)

### 404 Not Found

- `errorName` ("NotFound", required)
- `content` (string, required)

### 409 Conflict

- `errorName` ("Conflict", required)
- `content` (string, required)

### 500 Internal Server Error

- `errorName` ("InternalServerError", required)
- `content` (string, required)

### 501 Unimplemented

- `errorName` ("Unimplemented", required)
- `content` (string, required)

## Types

### BnplFees

- `baseFeeAmount` (integer, required) — Total fees in cents
- `baseFeePercentage` (double, required) — Fee percentage as a decimal (e.g., 1.4 for 1.4%)

### BnplInstallment

- `number` (integer, required)
- `dueDate` (string, required)
- `amount` (integer, required)
- `type` (enum, required)
  - Allowed values: `DOWN_PAYMENT`, `REGULAR`

## Examples

**Request**

```json
{
  "cadence": "WEEKLY",
  "installmentsStartDate": "2025-06-18",
  "numberOfInstallments": 4,
  "paymentDayOfWeek": "WEDNESDAY",
  "downPaymentDueDate": "2025-06-11"
}
```

**Response**

```json
{
  "invoiceAmount": 120000,
  "totalRepaymentAmount": 121687,
  "currency": "USD",
  "downPaymentAmount": 12000,
  "numberOfPayments": 5,
  "firstPaymentDate": "2025-06-18",
  "finalPaymentDate": "2025-07-28",
  "fees": {
    "baseFeeAmount": 1687,
    "baseFeePercentage": 1.4058
  },
  "installments": [
    {
      "number": 0,
      "dueDate": "2025-06-18",
      "amount": 12000,
      "type": "DOWN_PAYMENT"
    },
    {
      "number": 1,
      "dueDate": "2025-07-02",
      "amount": 27422,
      "type": "REGULAR"
    },
    {
      "number": 2,
      "dueDate": "2025-07-09",
      "amount": 27422,
      "type": "REGULAR"
    },
    {
      "number": 3,
      "dueDate": "2025-07-16",
      "amount": 27422,
      "type": "REGULAR"
    },
    {
      "number": 4,
      "dueDate": "2025-07-23",
      "amount": 27421,
      "type": "REGULAR"
    }
  ],
  "paymentDayOfWeek": "WEDNESDAY",
  "installmentAmount": 27422,
  "financeFeeRate": "1.4% per 28 days",
  "termsLink": "https://dashboard-stg.oatfi.com/terms/6858b8b7e09d9a0057d82e65"
}
```

**SDK Code**

```python Get BNPL Offer
import requests

url = "https://api.mercoa.com/invoice/in_286a1849-2e3c-48a4-ab5a-8b7940cc3a5b/bnpl/offer"

payload = {
    "cadence": "WEEKLY",
    "installmentsStartDate": "2025-06-18",
    "numberOfInstallments": 4,
    "paymentDayOfWeek": "WEDNESDAY",
    "downPaymentDueDate": "2025-06-11"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```typescript Get BNPL Offer
import { MercoaClient } from "@mercoa/javascript";

const client = new MercoaClient({ token: "YOUR_TOKEN" });
await client.invoice.bnpl.offer("in_286a1849-2e3c-48a4-ab5a-8b7940cc3a5b", {
    cadence: "WEEKLY",
    installmentsStartDate: "2025-06-18",
    numberOfInstallments: 4,
    paymentDayOfWeek: "WEDNESDAY",
    downPaymentDueDate: "2025-06-11"
});

```

```go Get BNPL Offer
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.mercoa.com/invoice/in_286a1849-2e3c-48a4-ab5a-8b7940cc3a5b/bnpl/offer"

	payload := strings.NewReader("{\n  \"cadence\": \"WEEKLY\",\n  \"installmentsStartDate\": \"2025-06-18\",\n  \"numberOfInstallments\": 4,\n  \"paymentDayOfWeek\": \"WEDNESDAY\",\n  \"downPaymentDueDate\": \"2025-06-11\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get BNPL Offer
require 'uri'
require 'net/http'

url = URI("https://api.mercoa.com/invoice/in_286a1849-2e3c-48a4-ab5a-8b7940cc3a5b/bnpl/offer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"cadence\": \"WEEKLY\",\n  \"installmentsStartDate\": \"2025-06-18\",\n  \"numberOfInstallments\": 4,\n  \"paymentDayOfWeek\": \"WEDNESDAY\",\n  \"downPaymentDueDate\": \"2025-06-11\"\n}"

response = http.request(request)
puts response.read_body
```

```java Get BNPL Offer
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.mercoa.com/invoice/in_286a1849-2e3c-48a4-ab5a-8b7940cc3a5b/bnpl/offer")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"cadence\": \"WEEKLY\",\n  \"installmentsStartDate\": \"2025-06-18\",\n  \"numberOfInstallments\": 4,\n  \"paymentDayOfWeek\": \"WEDNESDAY\",\n  \"downPaymentDueDate\": \"2025-06-11\"\n}")
  .asString();
```

```php Get BNPL Offer
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.mercoa.com/invoice/in_286a1849-2e3c-48a4-ab5a-8b7940cc3a5b/bnpl/offer', [
  'body' => '{
  "cadence": "WEEKLY",
  "installmentsStartDate": "2025-06-18",
  "numberOfInstallments": 4,
  "paymentDayOfWeek": "WEDNESDAY",
  "downPaymentDueDate": "2025-06-11"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Get BNPL Offer
using RestSharp;

var client = new RestClient("https://api.mercoa.com/invoice/in_286a1849-2e3c-48a4-ab5a-8b7940cc3a5b/bnpl/offer");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"cadence\": \"WEEKLY\",\n  \"installmentsStartDate\": \"2025-06-18\",\n  \"numberOfInstallments\": 4,\n  \"paymentDayOfWeek\": \"WEDNESDAY\",\n  \"downPaymentDueDate\": \"2025-06-11\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Get BNPL Offer
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "cadence": "WEEKLY",
  "installmentsStartDate": "2025-06-18",
  "numberOfInstallments": 4,
  "paymentDayOfWeek": "WEDNESDAY",
  "downPaymentDueDate": "2025-06-11"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.mercoa.com/invoice/in_286a1849-2e3c-48a4-ab5a-8b7940cc3a5b/bnpl/offer")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```