> For the complete documentation index, see [llms.txt](https://docs.alternativepayments.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alternativepayments.io/api-reference/checkout.md).

# Checkout

## Address autocomplete (checkout)

> Returns address suggestions for the checkout address form

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"address_api.AutocompleteResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/address_api.Prediction"},"type":"array"}},"type":"object"},"address_api.Prediction":{"properties":{"description":{"type":"string"},"place_id":{"type":"string"},"structured_formatting":{"$ref":"#/components/schemas/address_api.StructuredFormating"}},"type":"object"},"address_api.StructuredFormating":{"properties":{"main_text":{"type":"string"},"secondary_text":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"address_api.AutocompleteRequest":{"properties":{"country":{"type":"string"},"q":{"type":"string"},"sessiontoken":{"type":"string"}},"type":"object"}}},"paths":{"/checkout/address/autocomplete":{"post":{"description":"Returns address suggestions for the checkout address form","operationId":"checkoutAddressAutocomplete","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/address_api.AutocompleteResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Address autocomplete (checkout)","tags":["Checkout"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/address_api.AutocompleteRequest"}}},"description":"Autocomplete request","required":true}}}}}
```

## Get address details (checkout)

> Returns full address details for a place selected in the checkout address form

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"address_api.DetailsResponse":{"properties":{"data":{"$ref":"#/components/schemas/address_api.PlaceDetails"}},"type":"object"},"address_api.PlaceDetails":{"properties":{"result":{"$ref":"#/components/schemas/address_api.AddressResult"}},"type":"object"},"address_api.AddressResult":{"properties":{"address_components":{"items":{"$ref":"#/components/schemas/address_api.AddressComponent"},"type":"array"},"name":{"type":"string"}},"type":"object"},"address_api.AddressComponent":{"properties":{"long_name":{"type":"string"},"short_name":{"type":"string"},"types":{"items":{"type":"string"},"type":"array"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"address_api.DetailsRequest":{"properties":{"id":{"type":"string"},"sessiontoken":{"type":"string"}},"type":"object"}}},"paths":{"/checkout/address/details":{"post":{"description":"Returns full address details for a place selected in the checkout address form","operationId":"checkoutAddressDetails","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/address_api.DetailsResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get address details (checkout)","tags":["Checkout"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/address_api.DetailsRequest"}}},"description":"Details request","required":true}}}}}
```

## Get card form credentials (checkout)

> Returns the credentials required to initialize the secure card form in checkout

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CardFormCredentials":{"properties":{"app_id":{"type":"string"},"team_id":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/checkout/card-form/credentials":{"get":{"description":"Returns the credentials required to initialize the secure card form in checkout","operationId":"checkoutGetCardFormCredentials","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardFormCredentials"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get card form credentials (checkout)","tags":["Checkout"]}}}}
```

## Get invoice from checkout token

> Retrieves the invoice associated with the checkout token

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CheckoutInvoiceReply":{"description":"Invoice response","properties":{"created_at":{"type":"string"},"currency":{"type":"string"},"customer_id":{"type":"string"},"due_date":{"type":"string"},"id":{"type":"string"},"invoice_number":{"type":"string"},"status":{"type":"string"},"sub_total":{"type":"number"},"total":{"type":"number"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/checkout/invoice":{"get":{"description":"Retrieves the invoice associated with the checkout token","operationId":"checkoutGetInvoice","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutInvoiceReply"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get invoice from checkout token","tags":["Checkout"]}}}}
```

## Get invoice PDF link from checkout token

> Retrieves the PDF download link for the invoice associated with the checkout token

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CheckoutGetPdfLinkReply":{"description":"PDF link response","properties":{"url":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/checkout/invoice/pdf-link":{"get":{"description":"Retrieves the PDF download link for the invoice associated with the checkout token","operationId":"checkoutGetInvoicePdfLink","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutGetPdfLinkReply"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get invoice PDF link from checkout token","tags":["Checkout"]}}}}
```

## Get payment methods from checkout token

> Retrieves all payment methods for the customer associated with the checkout token

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CheckoutGetPaymentMethodsReply":{"description":"List of payment methods response","properties":{"data":{"items":{"$ref":"#/components/schemas/CheckoutPaymentMethod"},"type":"array"}},"type":"object"},"CheckoutPaymentMethod":{"description":"Payment method information","properties":{"brand":{"type":"string"},"created_at":{"type":"string"},"default":{"type":"boolean"},"exp_month":{"type":"string"},"exp_year":{"type":"string"},"id":{"type":"string"},"last4":{"type":"string"},"type":{"$ref":"#/components/schemas/checkout_api.MethodType"}},"type":"object"},"checkout_api.MethodType":{"enum":["card","ach"],"type":"string"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/checkout/payment-methods":{"get":{"description":"Retrieves all payment methods for the customer associated with the checkout token","operationId":"checkoutListPaymentMethods","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutGetPaymentMethodsReply"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get payment methods from checkout token","tags":["Checkout"]}}}}
```

## Register CVV for a card payment from checkout token

> Register an encrypted CVV token for a specific card. Uses customer\_id and invoice\_id from checkout token.

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CheckoutCreateCardCvvResponse":{"description":"Create card CVV response","properties":{"success":{"type":"boolean"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"CheckoutCreateCardCvvInput":{"description":"CVV registration information","properties":{"cvv_secret":{"type":"string"},"provider":{"allOf":[{"$ref":"#/components/schemas/checkout_api.CardProvider"}],"enum":["evervault"]}},"type":"object"},"checkout_api.CardProvider":{"enum":["evervault"],"type":"string"}}},"paths":{"/checkout/payment-methods/{card_id}/cvv":{"post":{"description":"Register an encrypted CVV token for a specific card. Uses customer_id and invoice_id from checkout token.","operationId":"checkoutVerifyCvv","parameters":[{"schema":{"type":"string"},"description":"Card ID","in":"path","name":"card_id","required":true}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreateCardCvvResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Register CVV for a card payment from checkout token","tags":["Checkout"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreateCardCvvInput"}}},"description":"CVV registration information","required":true}}}}}
```

## Calculate card payment fees

> Calculate payment fees for a specific card payment method using checkout token

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CheckoutGetCardPaymentFeesResponse":{"description":"Response containing calculated payment fees for card payments","properties":{"fee_percentage_for_customer":{"type":"string"},"fee_percentage_for_partner":{"type":"string"},"fixed_fee_amount_customer":{"type":"string"},"fixed_fee_amount_partner":{"type":"string"},"relative_fee_amount_customer":{"type":"string"},"relative_fee_amount_partner":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"CheckoutGetCardPaymentFeesRequest":{"description":"Request body for calculating card payment fees","properties":{"amount":{"type":"string"},"currency":{"enum":["USD","CAD"],"type":"string"}},"type":"object"}}},"paths":{"/checkout/payment-methods/{card_id}/fees":{"post":{"description":"Calculate payment fees for a specific card payment method using checkout token","operationId":"checkoutGetCardFees","parameters":[{"schema":{"type":"string"},"description":"Card ID","in":"path","name":"card_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutGetCardPaymentFeesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Calculate card payment fees","tags":["Checkout"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutGetCardPaymentFeesRequest"}}},"description":"Fee calculation request","required":true}}}}}
```

## Create a bank account payment method from checkout token

> Creates a new bank account payment method for the customer associated with the checkout token. Only one of USAccountData or CAAccountData must be sent, matching AccountDataType.

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CheckoutCreateBankAccountResponse":{"description":"Create bank account response","properties":{"id":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"CheckoutCreateBankAccountInput":{"description":"Create bank account payment method request body. Only one of USAccountData or CAAccountData must be sent, matching AccountDataType.","properties":{"account_data_type":{"enum":["us","ca"],"type":"string"},"ca_account_data":{"$ref":"#/components/schemas/CheckoutCAAccountData"},"custom_name":{"type":"string"},"institution_name":{"type":"string"},"receiver_name":{"type":"string"},"subtype":{"allOf":[{"$ref":"#/components/schemas/checkout_api.AccountSubtype"}],"enum":["checkings","savings"]},"type":{"allOf":[{"$ref":"#/components/schemas/checkout_api.AccountType"}],"enum":["depository"]},"us_account_data":{"$ref":"#/components/schemas/CheckoutUSAccountData"}},"type":"object"},"CheckoutCAAccountData":{"description":"Canadian bank account data","properties":{"account_number":{"type":"string"},"institution_code":{"type":"string"},"transit_number":{"type":"string"}},"type":"object"},"checkout_api.AccountSubtype":{"enum":["checkings","savings"],"type":"string"},"checkout_api.AccountType":{"enum":["depository"],"type":"string"},"CheckoutUSAccountData":{"description":"US bank account data","properties":{"account_number":{"type":"string"},"routing_number":{"type":"string"}},"type":"object"}}},"paths":{"/checkout/payment-methods/bank":{"post":{"description":"Creates a new bank account payment method for the customer associated with the checkout token. Only one of USAccountData or CAAccountData must be sent, matching AccountDataType.","operationId":"checkoutCreateBank","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreateBankAccountResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Create a bank account payment method from checkout token","tags":["Checkout"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreateBankAccountInput"}}},"description":"Bank account information","required":true}}}}}
```

## Create a card payment method from checkout token

> Creates a new card payment method for the customer associated with the checkout token

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CheckoutCreateCardResponse":{"description":"Create card response","properties":{"id":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"CheckoutCreateCardInput":{"description":"Create card payment method request body","properties":{"address":{"$ref":"#/components/schemas/CheckoutAddressInput"},"card_provider_token":{"type":"string"},"custom_name":{"type":"string"},"provider":{"allOf":[{"$ref":"#/components/schemas/checkout_api.CardProvider"}],"enum":["evervault"]}},"type":"object"},"CheckoutAddressInput":{"description":"Billing address information","properties":{"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"postal_code":{"type":"string"},"state":{"type":"string"},"state_code":{"type":"string"},"street_address":{"type":"string"},"subpremise":{"type":"string"}},"type":"object"},"checkout_api.CardProvider":{"enum":["evervault"],"type":"string"}}},"paths":{"/checkout/payment-methods/card":{"post":{"description":"Creates a new card payment method for the customer associated with the checkout token","operationId":"checkoutCreateCard","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreateCardResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Create a card payment method from checkout token","tags":["Checkout"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreateCardInput"}}},"description":"Card information","required":true}}}}}
```

## Get pass-through fees (checkout)

> Returns the pass-through card fees that apply to the checkout customer for the given card networks

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"checkout_api.GetPassThroughFeesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/checkout_api.CheckoutPassThroughFeeItem"},"type":"array"},"partner_id":{"type":"string"}},"type":"object"},"checkout_api.CheckoutPassThroughFeeItem":{"properties":{"amount":{"type":"string"},"customer_id":{"type":"string"},"fixed_fee_forwarded":{"type":"boolean"},"method_network":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"checkout_api.GetPassThroughFeesRequest":{"properties":{"method_networks":{"items":{"enum":["VISA","MASTERCARD","DISCOVER","AMERICAN_EXPRESS","DINERS_CLUB","CARD_OTHER"],"type":"string"},"type":"array"}},"type":"object"}}},"paths":{"/checkout/payment-methods/pass-through-fees":{"post":{"description":"Returns the pass-through card fees that apply to the checkout customer for the given card networks","operationId":"checkoutGetPassThroughFees","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout_api.GetPassThroughFeesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get pass-through fees (checkout)","tags":["Checkout"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/checkout_api.GetPassThroughFeesRequest"}}},"description":"Card networks","required":true}}}}}
```

## Create a payment from checkout token

> Creates a payment for the invoice associated with the checkout token. Customer ID and invoice ID are extracted from the token.

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"CheckoutCreatePaymentResponse":{"description":"Create payment response","properties":{"message":{"type":"string"},"status":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"CheckoutCreatePaymentInput":{"description":"Create payment request body","properties":{"amount":{"type":"string"},"idempotency_key":{"format":"uuid","type":"string"},"payment_date":{"type":"string"},"payment_method":{"enum":["card","standard_ach"],"type":"string"},"payment_method_id":{"type":"string"}},"type":"object"}}},"paths":{"/checkout/payments":{"post":{"description":"Creates a payment for the invoice associated with the checkout token. Customer ID and invoice ID are extracted from the token.","operationId":"checkoutCreatePayment","parameters":[{"schema":{"type":"string"},"description":"Used when idempotency_key is not set in the body. Non-UUID values are hashed to a UUID.","in":"header","name":"Idempotency-Key"}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreatePaymentResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Create a payment from checkout token","tags":["Checkout"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreatePaymentInput"}}},"description":"Payment information","required":true}}}}}
```

## Get partner theme preferences (checkout)

> Returns the partner's theme customization used to style checkout

```json
{"openapi":"3.1.1","info":{"title":"Alternative Payments","version":"1.2.0"},"servers":[{"url":"http://public-api.alternativepayments.io"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Bearer token authentication for checkout endpoints. Pass the token as \"Bearer {token}\" in the Authorization header.","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"GetThemeReply":{"properties":{"partner_name":{"type":"string"},"theme":{"$ref":"#/components/schemas/ThemePreferences"}},"type":"object"},"ThemePreferences":{"properties":{"color":{"type":"string"},"logo_url":{"type":"string"}},"type":"object"},"HttpError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"validation_errors":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"}}},"paths":{"/checkout/preferences/theme":{"get":{"description":"Returns the partner's theme customization used to style checkout","operationId":"checkoutGetPartnerTheme","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetThemeReply"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}}}},"summary":"Get partner theme preferences (checkout)","tags":["Checkout"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.alternativepayments.io/api-reference/checkout.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
