Skip to main content
Invoices vs orders: These guides walk through invoices (formal billing, line items, publish). The collect flow is the same for orders — use /v1/orders/* instead of /v1/invoices/* and set source_type: "ORDER" on the checkout session. See Orders and Parties & counterparties.Hosted checkout: To skip party, invoice, session, and execute steps entirely, see Hosted checkout.
Use Laravel’s HTTP client (Guzzle) from a controller, job, or action — never from Blade views with secrets.
API Reference: Obtain token · Collect

Prerequisites

  • Laravel 10+ (or 11+)
  • config/services.php entries for dollr.client_id and dollr.client_secret
// config/services.php
'dollr' => [
    'base_url'      => env('DOLLR_BASE_URL', 'https://api.heydollr.app'),
    'client_id'     => env('DOLLR_CLIENT_ID'),
    'client_secret' => env('DOLLR_CLIENT_SECRET'),
],

Steps

1

Service helper

// app/Services/DollrClient.php
namespace App\Services;

use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;

class DollrClient
{
    public function token(): string
    {
        $base = config('services.dollr.base_url');
        $res = Http::post("$base/v1/jwt/client/obtain/token", [
            'client_id'     => config('services.dollr.client_id'),
            'client_secret' => config('services.dollr.client_secret'),
        ])->throw();
        return $res->json('access_token');
    }

    public function authed()
    {
        return Http::withToken($this->token())
            ->baseUrl(config('services.dollr.base_url'))
            ->acceptJson();
    }
}
2

Create invoice flow

$http = app(DollrClient::class)->authed();

$party = $http->post('/v1/parties/create', [
    'fullname' => 'Amara Kamara', 'phone' => '231771234567',
    'country_code' => 'LR',
])->json();

$cp = $http->post('/v1/counterparties/create', [
    'relationship_type' => 'CUSTOMER', 'party_id' => $party['id'],
])->json();

$invoice = $http->post('/v1/invoices/create', [
    'counterparty_id' => $cp['id'], 'currency' => 'USD',
    'fee_bearer' => 'PAYER', 'as_payment_link' => true,
])->json();
3

Publish and collect

$id = $invoice['id'];
$http->post("/v1/invoices/$id/items/add", [
    'name' => 'Strategy Session', 'currency' => 'USD', 'qty' => 1, 'amount' => 250,
]);
$http->put("/v1/invoices/publish/$id");

$referenceId = (string) Str::uuid();
$session = $http->post('/v1/sessions/checkout', [
    'source_id' => $id, 'source_type' => 'INVOICE',
])->json();

$http->post('/v1/executions/collection', [
    'session_id'         => (string) $session['id'],
    'payment_account_id' => $paymentAccountId,
    'currency'           => 'USD',
    'reference_id'       => $referenceId,
]);
4

Poll in a queued job

$status = $http->get("/v1/status/collection/$referenceId")->json('status');
Use Payment status patterns — poll status in a queued job or use realtime keys for live UI. Dollr does not expose inbound webhooks in the Open API.

Try it yourself

Hosted checkout

Mobile money and card on a Dollr-hosted page — fastest path.

Orders

Same collect flow with source_type: ORDER and /v1/orders/*.

Direct checkout

One API call to create source — API-embedded flow.
Last modified on June 23, 2026