> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/online-payments/api-integration/server-to-server-payments-with-3d-secure-setup-guide/api-setup.md).

# API setup

### Setting up Authentication with BasicAuth  <a href="#setting-up-authentication-with-basicauth__202f" id="setting-up-authentication-with-basicauth__202f"></a>

[BasicAuth](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication/authentication-methods-basic-and-bearer/basicauth.md) with Verifone requires a Username and Password. Both your Username (userID) and Password ([API key](/online-payments/api-integration-methods-auth-and-endpoints/api-authentication.md)), can be collected from Verifone Central &#x20;

### Collecting your Verifone credentials (environment variables)   <a href="#collecting-your-verifone-credentials-__0028environment-variables__0029__202f__00a0" id="collecting-your-verifone-credentials-__0028environment-variables__0029__202f__00a0"></a>

* Select an [environment](/online-payments/api-integration-methods-auth-and-endpoints.md#sandbox-and-production-urls) (Sandbox or Production)&#x20;
* Make sure you set up the base of the URL (environment) to be configurable for when you are ready to proceed to production.&#x20;
* Collect your [Payment Provider Contract](/verifone-central-getting-started/verifone-central/administration-tools/payment-provider-contracts.md) ID &#x20;
  * The Payment Provider Contract (PPC) represents the merchants contract with their acquiring partner, including key details such as the Merchant ID.&#x20;
* Collect your [3D Secure Contract](/verifone-central-getting-started/verifone-central/administration-tools/3ds-contracts.md) ID  &#x20;
  * During the 3D Secure Authentication Process, this is used to contact the issuing and acquiring banks.&#x20;
* Collect your [secure card capture key](/online-payments/api-integration-methods-auth-and-endpoints/secure-card-capture-key.md#generate-a-secure-card-capture-key-via-verifone-central) and key alias &#x20;
  * Verifone uses PGP encryption for securely storing card details during transmission. Your public key uniquely encrypts the Card details for Verifone to decrypt later using a Private key (which only Verifone has).&#x20;
  * Your Key Alias is a reference to the public key. This is required in the payment step, as it identifies which public key was used at the time of encryption.&#x20;

### Testing flow - Test cards for 3D Secure  <a href="#testing-flow-__002d-test-cards-for-3d-secure__00a0" id="testing-flow-__002d-test-cards-for-3d-secure__00a0"></a>

Verifone provides test cards for all 3D Secure test cases [here](/online-payments/strong-customer-authentication-sca/3d-secure/3d-secure-test-cases.md).&#x20;


---

# 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.verifone.com/online-payments/api-integration/server-to-server-payments-with-3d-secure-setup-guide/api-setup.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.
