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

# Quickstart

# **Add stablecoin payments**

#### One API call. Two redirects. Cray handles everything else.

> **Before you start:** Create your [API credentials](https://cray.pro/docs#1-create-api-credentials) and configure your [webhook URL](https://cray.pro/docs#webhooks) in the Cray Merchant Dashboard.

**1. Create a payment**

**POST**

```text theme={null}
https://merchant-api.cray.pro/payment-gateway/order
```

**Header**

```text theme={null}
Authorization: Bearer <API_KEY_ID>:<API_SECRET>
```

**Body**

```text theme={null}
{
  "amount": 250,
  "currency": "AED"
  "redirectUrl": "https://merchant.com/payment/complete"
}
```

> `redirectUrl` is where Cray sends the customer after the payment flow ends.

**Response**

```text theme={null}
{
  "url": "https://payment.cray.pro/payment-gateway/4oG3wvhYBvW0XZnwWCpDg",
  "orderId": "6a61b7348c3662a2bc1559fb"
}
```

**2. Redirect the customer to Cray**

Redirect to the returned `url`.

Cray handles crypto wallet connection, payment processing, compliance screening, and confirmation.

**3. Customer returns to your website**

After the payment is completed, failed or cancelled, Cray automatically redirects the customer to the `redirectUrl`

Use the returned `orderId` and `status` to update the corresponding order in your system.

```text theme={null}
{
  "orderId": "6a61b7348c3662a2bc1559fb",
  "status": "Completed"
}
```

Update the corresponding order in your system.

That's the complete integration.

**Optional: Verify payment status**

For additional verification or missed redirects, retrieve the latest status using the Order Status API.

**GET**

```text theme={null}
https://merchant-api.cray.pro/payment-gateway/order/{orderId}?sse=false
```
