> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akhdar-sa.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use {baseUrl} for the environment-specific base URL provided to the partner integration team. Do not invent an API hostname.
> x-akhdar-* fields are publication provenance only. Do not treat them as partner integration instructions.

# Quickstart

> Confirm a loyalty-points contribution.

Confirm a loyalty-points contribution.

## Assumptions

You are integrating server-to-server. After API access is granted, your integration team receives a partner API key and an environment-specific base URL. The secret is shown once: store it securely and never log it. This credential is for partner server-to-server use only.

Sandbox and Production are separate. Use the environment-specific base URL provided to your integration team.

<Steps>
  <Step title="Request API access">
    <Card title="Request API Access" icon="key" href="https://akhdar-sa.com/esg-form" cta="Request API Access">
      Open Akhdar's contact form to request API access.
    </Card>
  </Step>

  <Step title="Configure credentials">
    Set placeholders only. Replace them with the values provided to your integration team.

    * `AKHDAR_API_KEY` — partner API key
    * `{baseUrl}` — environment-specific base URL
  </Step>

  <Step title="Confirm first contribution">
    Confirm the contribution only after your system has successfully deducted the customer's points.

    ```bash theme={null}
    curl -X POST "{baseUrl}/v1/impact-transactions" \
      -H "X-API-Key: $AKHDAR_API_KEY" \
      -H "Idempotency-Key: idem_01HZX5Z9Y8X7W6V5U4T3S2R1" \
      -H "Content-Type: application/json" \
      -d '{"partner_event_id":"evt_contrib_01HZX5A1B2C3D4E5F6G7H8J9","partner_order_ref":"ord_9f3c2a71","points":500,"opaque_customer_ref":"cust_ref_8a1b2c3d"}'
    ```
  </Step>

  <Step title="Check the response">
    A successful confirmation returns HTTP `201`:

    ```json theme={null}
    {
      "contribution": {
        "transaction_id": "txn_01HZX6M4N5P6Q7R8S9T0U1V2",
        "partner_event_id": "evt_contrib_01HZX5A1B2C3D4E5F6G7H8J9",
        "partner_order_ref": "ord_9f3c2a71",
        "status": "confirmed",
        "points": 500,
        "opaque_customer_ref": "cust_ref_8a1b2c3d",
        "contribution_rule_version": "CRV-v1.0.0",
        "point_conversion_version": "PCV-v1.0.0",
        "tree_cost_version": "TCV-v1.0.0",
        "expected_environmental_support": {
          "summary_en": "Support tree planting",
          "summary_ar": "ادعم زراعة الشجر"
        },
        "non_refundable": true,
        "environment": "sandbox",
        "created_at": "2026-08-03T12:05:00Z",
        "confirmed_at": "2026-08-03T12:05:00Z",
        "failed_at": null
      },
      "association": {
        "status": "not_requested"
      },
      "request": {
        "correlation_id": "corr_7c2e9b1a4d6f8e0c",
        "idempotency_key": "idem_01HZX5Z9Y8X7W6V5U4T3S2R1"
      }
    }
    ```

    Save the `transaction_id`. A `confirmed` status is terminal and the contribution is non-refundable.
  </Step>
</Steps>

## Next

* [Contributions](/contributions)
* [Delivery Emissions](/delivery-emissions)
* [Errors & Recovery](/errors-and-recovery)
* [API Reference](/api-reference)
