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

# Get payment keys

> Retrieve the keys needed to process a payment against a payment link

Returns the keys required to drive a payment for a payment link — including the RSA public
encryption key needed to [encrypt](/encryption) subsequent payloads.

This exists so a hosted checkout page can be rendered for a link without the merchant's
credentials being embedded in it.

## Endpoint

```
POST https://api-v4.reeple.ai/charge/paymentlink/get-keys
```

## Request body

| Field       | Type   | Description                               |
| ----------- | ------ | ----------------------------------------- |
| `reference` | String | **Required.** The payment-link reference. |

```json theme={null}
{ "reference": "YOUR_LINK_REFERENCE" }
```

<Note>
  Unlike the order endpoints, this body is **plain JSON** — it is not encrypted. It has to be:
  it's how you obtain the key you would encrypt with.
</Note>

## Request example

```bash theme={null}
curl -X POST https://api-v4.reeple.ai/charge/paymentlink/get-keys \
  -H "Content-Type: application/json" \
  -d '{ "reference": "YOUR_LINK_REFERENCE" }'
```

## Response

Returns the standard envelope carrying the link's public key and RSA encryption key.

<Note>
  The provider has not published a success response body for this endpoint. Confirm the exact
  field names against your sandbox account before depending on them.
</Note>

## Common errors

```json theme={null}
{
  "status": "failed",
  "statusCode": "604",
  "message": "Sorry! Cannot find this payment link, check the reference and try again"
}
```

<Warning>
  Keys returned here are scoped to a single payment link, but the encryption key is still a
  credential. Don't log it, and don't cache it beyond the life of the checkout session.
</Warning>

## Direct API integrations

If you are calling the API directly rather than rendering a payment link, you don't need this
endpoint — your public key, secret key and encryption key are issued during onboarding. See
[Authentication](/api-reference/authentication).
