Menu

Get started

Make yourself familiar with ourAPI Principlesto ensure a resilient integration.

Set your headers

Setting your headers is an important part of an API request. The headers represent the meta-data associated with your API request.

Copied!
Authorization: {your_credentials}
Content-Type: application/vnd.worldpay.pay-direct-v1+json
Accept: application/vnd.worldpay.pay-direct-v1+json
HeaderDescription
AuthorizationWe use the Authorization header to identify and authenticate you within Access Worldpay. You must use the Authorization header for any request you send to our APM API, unless you are using client certificate authentication over TLS. If you must use this, read our reference guide onAuthenticating with SSL/TLS.
Content-TypeWe require the Content-Type header if the request you're sending includes a request body, and if the HTTP method is a POST or a PUT.
AcceptWe use the Accept header to identify which version of our APM API you are using. You must use the Accept header for any request you send to our API.

If you're using both the Content-Type and Accept headers, they must match.

Note: Replace {your_credentials} with your base64-encoded Basic Auth username and password. To get your Access Worldpay credentials contact yourImplementation Manager.

Query the root resource

Our APIs guides you by providing you with links to the next available actions.

To discover and start using our APIs you must first query the root resource. This returns the available resources within Access Worldpay.

Request

GET https://try.access.worldpay.com/

Note: No request body is needed for this request.

Response

You receive all our available API resources in the response:

Copied!
{
    "_links": {
        "payments:authorize": {
            "href": "https://try.access.worldpay.com/payments/authorizations"
        },
        "service:payments": {
            "href": "https://try.access.worldpay.com/payments"
        },
        "service:tokens": {
            "href": "https://try.access.worldpay.com/tokens"
        },
        "service:verifications/accounts": {
            "href": "https://try.access.worldpay.com/verifications/accounts"
        },
        "service:verifications/customers/3ds": {
            "href": "https://try.access.worldpay.com/verifications/customers/3ds"
        },
        "service:verifiedTokens": {
            "href": "https://try.access.worldpay.com/verifiedTokens"
        },
        "service:payouts": {
            "href": "https://try.access.worldpay.com/payouts"
        },
        "service:fraudsight": {
            "href": "https://try.access.worldpay.com/fraudsight"
        },
        "service:payments/alternative/direct": {
            "href": "https://try.access.worldpay.com/payments/alternative/direct"
        },
        "curies": [{
            "href": "https://try.access.worldpay.com/rels/payments/{rel}",
            "name": "payments",
            "templated": true
        }]
    }
}

Query the Paydirect root resource

Query the service:payments/alternative/direct action link for the root resource.

Request

GET https://try.access.worldpay.com/payments/alternative/direct

Note: No request body is needed for this request.

The response

Copied!
{
    "_links": {
        "resourceTree": {
            "href": "https://try.access.worldpay.com/rels/payments/alternative/direct/resourceTree"
        },
        "direct:sale": {
            "href": "https://try.access.worldpay.com/payments/alternative/direct/sale",
            "templated": true
        },
        "direct:events": {
            "href": "https://try.access.worldpay.com/payments/alternative/direct/events",
            "templated": true
        },
        "curies": [
            {
                "name": "direct",
                "href": "https://try.access.worldpay.com/rels/payments/alternative/direct/{rel}",
                "templated": true
            }
        ]
    }
}

Resources

The response contains a link for the sale request:

Action Link (resources)Description
direct:saleAction link for your sale request.
direct:queryPayment query request

Next steps

Pay with ACH
Pay with EFT