---
title: "Answers what the buyer's page builds its payment form from before paying a cart: the processor's key, the account, and the form's mode, amount and methods, which match the payment payCheckout starts."
---

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

Path: Sherpo customer API › payment

`GET /v1/stores/{store}/checkouts/{checkout}/payment_form`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `read`

## Path parameters

- `store` (`getPaymentForm.path.store`; string, required) — A hostname of the store.
- `checkout` (`getPaymentForm.path.checkout`; string, required)
  - minLength 1

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sherpo.io/customer/v1/stores/<store>/checkouts/<checkout>/payment_form' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/customer/v1/stores/<store>/checkouts/<checkout>/payment_form';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/customer/v1/stores/<store>/checkouts/<checkout>/payment_form"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Answers what the buyer's page builds its payment form from before paying a cart: the processor's key, the account, and the form's mode, amount and methods, which match the payment payCheckout starts.

#### Example

```json
{
  "processor": "string",
  "publishable_key": "string",
  "account": "string",
  "element": {
    "mode": "string",
    "amount": 0,
    "currency": "string",
    "exponent": 0,
    "payment_method_types": [
      "string"
    ],
    "excluded_payment_method_types": [
      "string"
    ],
    "capture_method": "string",
    "setup_future_usage": "off_session",
    "us_bank_account_verification": "instant"
  }
}
```

- `processor` (`getPaymentForm.response.200.processor`; string, required)
- `publishable_key` (`getPaymentForm.response.200.publishable_key`; string, required)
- `account` (`getPaymentForm.response.200.account`; string, required) — The connected account; `payCheckout` takes it back as `expect_account`.
- `element` (`getPaymentForm.response.200.element`; any of, required) — Null when paying collects nothing: a free cart that saves no card, or a payment started on a saved card.
  - any of: `object`, `null`

### default

A problem; see https://api.sherpo.io/customer/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`getPaymentForm.response.default.type`; string, required)
  - format `uri`
- `title` (`getPaymentForm.response.default.title`; string, required)
- `status` (`getPaymentForm.response.default.status`; integer, required)
- `detail` (`getPaymentForm.response.default.detail`; string, required)
- `code` (`getPaymentForm.response.default.code`; string, optional)
- `context` (`getPaymentForm.response.default.context`; object, optional)
- `reached_core` (`getPaymentForm.response.default.reached_core`; boolean, optional)
- `core_answer` (`getPaymentForm.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/customer-api/reference/get-payment-form/index.md
