Server API version 1.0
Java

icon-search-large

Capture payment

POST https://{domainname}/v1/{merchantId}/payments/{paymentId}/capture

Payments

The payments REST services allow you to initiate a payment, retrieve the payment details or perform specific actions like refunding or requesting capture of a payment. A payment is identified by its paymentId. Some payment products allow a two step approach allowing you to control when the authorization takes place separate from when the funds are actually captured.

Request

When you want to capture the funds on a payment with a PENDING_CAPTURE state you can call this API. This API allows multiple, partial captures of the authorized funds. Depending on the payment product and the 3rd party used to process the payment this might be done in real-time or in more off-line, batch-like fashion.

If the created payment requires approval then it will require this step before the funds are actually captured.

PENDING_CAPTURE is only a common status with card transactions. You can specify the amount you would like to be captured in case you want to capture a lower amount than the authorized amount.

PayloadCapturePaymentRequest

Properties
Property Type Required Details
amount integer (12) no read close
close

Description

Here you can specify the amount that you want to capture (specified in cents, where single digit currencies are presumed to have 2 digits).
The amount can be lower than the amount that was authorized, but not higher.
If left empty, the full amount will be captured and the request will be final.
If the full amount is captured, the request will also be final.
isFinal boolean no read close
close

Description

This property indicates whether this will be the final capture of this transaction. The default value for this property is false.

Request example

SDK: Java

This scenario you will probably use the most

  • CapturePaymentRequest body = new CapturePaymentRequest();
    body.setAmount(2980L);
    
    CaptureResponse response = client.merchant("merchantId").payments().capture("paymentId", body);
    

Responses

Please find below an overview of the possible responses.

Response 201 - CreatedCaptureResponse

The capture request was processed correctly. The new state of the payment can be found in the response.

Properties
Property Type Required Details
captureOutput object no read close
close

Description

Object containing capture details
  • SDK Object type
    CaptureOutput
close

Description

Object containing amount and ISO currency code attributes
  • SDK Object type
    AmountOfMoney
close

Description

Amount in cents and always having 2 decimals
close

Description

Three-letter ISO currency code representing the currency for the amount
close

Description

Results from the fraud prevention check. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted
  • challenged - Based on the checks performed the transaction should be manually reviewed
  • denied - Based on the checks performed the transaction should be rejected
  • no-advice - No fraud check was requested/performed
  • error - The fraud check resulted in an error and the fraud check was thus not performed
close

Description

Object containing the card payment method details
  • SDK Object type
    CardPaymentMethodSpecificOutput
  • Property is part of a group
    Learn more

    Properties that make up a group are mutually exclusive, which means you can only include one of each group in any given call.

    If there are multiple groups at one level in the object hierarchy we use numbers to distinguish groups from one another.

close

Description

Card Authorization code as returned by the acquirer
close

Description

Object containing card details
  • SDK Object type
    CardEssentials
close

Description

The complete credit/debit card number
close

Description

Expiry date of the card
Format: MMYY
close

Description

Fraud results contained in the CardFraudResults object
  • SDK Object type
    CardFraudResults
close

Description

Resulting advice of the fraud prevention checks. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted
  • challenged - Based on the checks performed the transaction should be manually reviewed
  • denied - Based on the checks performed the transaction should be rejected
  • no-advice - No fraud check was requested/performed
  • error - The fraud check resulted an error. Note that the fraud check was thus not performed.
close

Description

The unique scheme transactionId of the initial transaction that was performed with SCA.
Should be stored by the merchant to allow it to be submitted in future transactions.
close

Description

Payment product identifier
Please see payment products for a full overview of possible values.
close

Description

3D Secure results object
  • SDK Object type
    ThreeDSecureResults
close

Description

Identifier of the authenticated transaction at the ACS/Issuer
close

Description

Exemption code from Carte Bancaire (130) (unknown possible values so far -free format)
close

Description

The amount for which this transaction has been authenticated.
  • SDK Object type
    AmountOfMoney
close

Description

Amount in cents and always having 2 decimals
close

Description

Three-letter ISO currency code representing the currency for the amount
close

Description

Global score calculated by the Carte Bancaire (130) Scoring platform. Possible values from 0 to 99
close

Description

The ACS Transaction ID for a prior 3-D Secure authenticated transaction (for example, the first recurring transaction that was authenticated with the customer)
close

Description

Method of authentication used for this transaction. Possible values:
  • frictionless = The authentication went without a challenge
  • challenged = Cardholder was challenged
  • avs-verified = The authentication was verified by AVS
  • other = Another issuer method was used to authenticate this transaction
close

Description

Timestamp in UTC (YYYYMMDDHHmm) of the 3-D Secure authentication of this transaction
close

Description

If a token was used for or created during the payment, then the ID of that token.
close

Description

Results from the fraud prevention check. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted
  • challenged - Based on the checks performed the transaction should be manually reviewed
  • denied - Based on the checks performed the transaction should be rejected
  • no-advice - No fraud check was requested/performed
  • error - The fraud check resulted in an error and the fraud check was thus not performed
close

Description

Results from the fraud prevention check. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted
  • challenged - Based on the checks performed the transaction should be manually reviewed
  • denied - Based on the checks performed the transaction should be rejected
  • no-advice - No fraud check was requested/performed
  • error - The fraud check resulted in an error and the fraud check was thus not performed
close

Description

Results from the fraud prevention check. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted
  • challenged - Based on the checks performed the transaction should be manually reviewed
  • denied - Based on the checks performed the transaction should be rejected
  • no-advice - No fraud check was requested/performed
  • error - The fraud check resulted in an error and the fraud check was thus not performed
close

Description

Resulting advice of the fraud prevention checks. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted
  • challenged - Based on the checks performed the transaction should be manually reviewed
  • denied - Based on the checks performed the transaction should be rejected
  • no-advice - No fraud check was requested/performed
  • error - The fraud check resulted an error. Note that the fraud check was thus not performed.
close

Description

Identifier of the authenticated transaction at the ACS/Issuer
close

Description

Exemption code from Carte Bancaire (130) (unknown possible values so far -free format)
close

Description

The amount for which this transaction has been authenticated.
  • SDK Object type
    AmountOfMoney
close

Description

Amount in cents and always having 2 decimals
close

Description

Three-letter ISO currency code representing the currency for the amount
close

Description

Global score calculated by the Carte Bancaire (130) Scoring platform. Possible values from 0 to 99
close

Description

The ACS Transaction ID for a prior 3-D Secure authenticated transaction (for example, the first recurring transaction that was authenticated with the customer)
close

Description

Method of authentication used for this transaction. Possible values:
  • frictionless = The authentication went without a challenge
  • challenged = Cardholder was challenged
  • avs-verified = The authentication was verified by AVS
  • other = Another issuer method was used to authenticate this transaction
close

Description

Timestamp in UTC (YYYYMMDDHHmm) of the 3-D Secure authentication of this transaction
close

Description

Object containing the redirect payment product details
  • SDK Object type
    RedirectPaymentMethodSpecificOutput
  • Property is part of a group
    Learn more

    Properties that make up a group are mutually exclusive, which means you can only include one of each group in any given call.

    If there are multiple groups at one level in the object hierarchy we use numbers to distinguish groups from one another.

close

Description

The IBAN is the International Bank Account Number. It is an internationally agreed format for the BBAN and includes the ISO country code and two check digits.
close

Description

Object containing the results of the fraud screening
  • SDK Object type
    FraudResults
close

Description

Results from the fraud prevention check. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted
  • challenged - Based on the checks performed the transaction should be manually reviewed
  • denied - Based on the checks performed the transaction should be rejected
  • no-advice - No fraud check was requested/performed
  • error - The fraud check resulted in an error and the fraud check was thus not performed
close

Description

Object containing card details
  • SDK Object type
    CardEssentials
close

Description

The complete credit/debit card number
close

Description

Expiry date of the card
Format: MMYY
close

Description

Additional address information
close

Description

City
Note: For payments with product 1503 the maximum length is not 40 but 20.
close

Description

ISO 3166-1 alpha-2 country code
close

Description

House number
close

Description

Full name of the state or province
close

Description

Streetname
close

Description

Zip code
Note: For payments with product 1503 the maximum length is not 10 but 8.
close

Description

PayPal (payment product 840) specific details
  • SDK Object type
    PaymentProduct840SpecificOutput
  • Property is part of a group
    Learn more

    Properties that make up a group are mutually exclusive, which means you can only include one of each group in any given call.

    If there are multiple groups at one level in the object hierarchy we use numbers to distinguish groups from one another.

close

Description

Object containing the billing address details of the customer
  • SDK Object type
    Address
close

Description

Additional address information
close

Description

City
Note: For payments with product 1503 the maximum length is not 40 but 20.
close

Description

ISO 3166-1 alpha-2 country code
close

Description

House number
close

Description

Full name of the state or province
close

Description

Streetname
close

Description

Zip code
Note: For payments with product 1503 the maximum length is not 10 but 8.
close

Description

Object containing the details of the PayPal account
  • SDK Object type
    PaymentProduct840CustomerAccount
close

Description

Username with which the PayPal account holder has registered at PayPal
close

Description

Identification of the PayPal recurring billing agreement
close

Description

Name of the company in case the PayPal account is owned by a business
close

Description

The phone number of the PayPal account holder
close

Description

Country where the PayPal account is located
close

Description

Status of the PayPal account.
Possible values are:
  • verified - PayPal has verified the funding means for this account
  • unverified - PayPal has not verified the funding means for this account
close

Description

Status of the customer's shipping address as registered by PayPal
Possible values are:
  • none - Status is unknown at PayPal
  • confirmed - The address has been confirmed
  • unconfirmed - The address has not been confirmed
close

Description

First name of the PayPal account holder
close

Description

The unique identifier of a PayPal account and will never change in the life cycle of a PayPal account
close

Description

Surname of the PayPal account holder
close

Description

Object containing the address details of the customer
  • SDK Object type
    Address
close

Description

Additional address information
close

Description

City
Note: For payments with product 1503 the maximum length is not 40 but 20.
close

Description

ISO 3166-1 alpha-2 country code
close

Description

House number
close

Description

Full name of the state or province
close

Description

Streetname
close

Description

Zip code
Note: For payments with product 1503 the maximum length is not 10 but 8.
close

Description

Protection Eligibility data of the PayPal customer
  • SDK Object type
    ProtectionEligibility
close

Description

Possible values:
  • Eligible
  • PartiallyEligible
  • Ineligible
close

Description

Possible values:
  • ItemNotReceivedEligible
  • UnauthorizedPaymentEligible
  • Ineligible
close

Description

Payment product identifier
Please see payment products for a full overview of possible values.
close

Description

ID of the token. This property is populated when the payment was done with a token or when the payment was tokenized.
close

Description

Object containing the results of the fraud screening
  • SDK Object type
    FraudResults
close

Description

Results from the fraud prevention check. Possible values are:
  • accepted - Based on the checks performed the transaction can be accepted
  • challenged - Based on the checks performed the transaction should be manually reviewed
  • denied - Based on the checks performed the transaction should be rejected
  • no-advice - No fraud check was requested/performed
  • error - The fraud check resulted in an error and the fraud check was thus not performed
close

Description

Unique reference to a Mandate
close

Description

Payment product identifier
Please see payment products for a full overview of possible values.
close

Description

Payment method identifier used by the our payment engine with the following possible values:
  • bankRefund
  • bankTransfer
  • card
  • cash
  • directDebit
  • eInvoice
  • invoice
  • redirect
close

Description

Object that holds all reference properties that are linked to this transaction
  • SDK Object type
    PaymentReferences
close

Description

Your unique reference of the transaction that is also returned in our report files. This is almost always used for your reconciliation of our report files.
close

Description

When you did not supply a merchantReference for your payment, you need to fill this property with the reference of the original payment when you want to refund it
id string no read close
close

Description

Our unique capture transaction identifier.
status enum no read close
close

Description

Current high-level status of the captures in a human-readable form. Possible values are :
  • CAPTURE_REQUESTED - The transaction is in the queue to be captured
  • CAPTURED - The transaction has been captured and we have received online confirmation
  • CANCELLED - You have cancelled the capture
  • REJECTED_CAPTURE - The capture has been rejected
  • REVERSED - The capture has been reversed

Please see Statuses for a full overview of possible values.
statusOutput object no read close
close

Description

This object has the numeric representation of the current capture status, timestamp of last status change and performable action on the current capture resource. In case of failed captures and negative scenarios, detailed error information is listed.
  • SDK Object type
    CaptureStatusOutput
close

Description

Numeric status code of the legacy API. It is returned to ease the migration from the legacy APIs to PostFinance E-Payment. You should not write new business logic based on this property as it will be deprecated in a future version of the API. The value can also be found in the BackOffice and in report files.

Response example

SDK: Java

This scenario you will probably use the most

  • {
        "id" : "000000000100000000010000100001",
        "captureOutput" : {
            "amountOfMoney" : {
                "amount" : 100,
                "currencyCode" : "EUR"
            },
            "references" : {
                "merchantReference" : "AcmeOrder0001",
                "paymentReference" : "0"
            },
            "paymentMethod" : "card",
            "cardPaymentMethodSpecificOutput" : {
                "paymentProductId" : 1,
                "authorisationCode" : "726747",
                "card" : {
                    "cardNumber" : "************7977",
                    "expiryDate" : "1299"
                },
                "fraudResults" : {
                    "avsResult" : "0",
                    "cvvResult" : "0",
                    "fraudServiceResult" : "no-advice"
                },
                "threeDSecureResults" : {
                    "authenticationAmount" : {
                        "currencyCode" : "EUR",
                        "amount" : 100
                    }
                }
            }
        },
        "status" : "CAPTURE_REQUESTED",
        "statusOutput" : {
            "statusCode" : 91
        }
    }
    
icon_top_1