Trustly

Create Payment

When initiating a payment process.

Edit "Create Payment" on GitHub

Create Payment

Within the trustly part of the eCommerce API, you can create the following kind of payments:

  • Purchase

To create a trustly payment, you perform an HTTP POST against the payments resource. The kind of payment created is indicated with the value of the operation field in the request.

Payment Request

Request

1
2
3
4
5
6
7
8
9
10
11
POST /psp/creditcard/payments HTTP/1.1
Host: api.externalintegration.payex.com
Authorization: Bearer <AccessToken>
Content-Type: application/json

{
    "payment": {
        "operation": "<operation>",
        "intent": "<intent>",
    }
}
Required Field Type Description
check payment object The payment object.
check operation string Determines the initial operation, defining the type of payment created.
check intent string The intent of the payment identifies how and when the charge will be effectuated. This determine the type transactions used during the payment process. Authorization. Reserves the amount, and is followed by a cancellation or capture of funds. AutoCapture is a one phase-option that enable capture of funds automatically after authorization.