API
HomeEasytransac
HomeEasytransac
  1. API - Payment
  • Start
    • API Domain Usage
    • Get an API key
    • Communication
  • Documentation
    • Errors
      • ApiError codes
    • Webhooks
      • PUSH Method
      • PULL Method
  • V2
    • Overview
    • Authentication
      • JWT access token - Generate
        POST
    • Endpoints
      • Open Banking
        • Open Banking - Initialize
      • SDD
        • SDD - Mandate - Create
        • SDD - Mandate - Debit
        • SDD - Mandate - Get status
      • Transaction
        • Transaction - Get status
  • V1
    • Documentation
      • Signature
    • Authentication
      • Overview
      • Security
      • PSD2 and 3DSecure
    • API - Payment
      • Recurring payments
      • Card payment
        POST
      • 1-click payment
        POST
      • SEPA Direct Debit
        POST
      • Transfer (Open Banking)
        POST
      • Payment page
        POST
      • Cancel a payment page
        POST
      • Resend the payment page
        POST
      • P2P Transfert
        POST
      • Update a subscription
        POST
      • Status
        POST
      • Refund
        POST
      • Capture
        POST
      • Cancellation
        POST
      • List of cards
        POST
      • List of IBANs
        POST
      • History
        POST
      • Payment requests
        POST
      • Card information
        POST
    • API - User
      • Add a merchant
      • Update a merchant
      • Search for a merchant
      • List of movements
      • Make a payout
      • List all payouts
      • Add a logo
      • Get the activity
      • Update activity
    • API - Document
      • Add a document
      • Get a document
      • List documents
  1. API - Payment

Card payment

Sandbox
https://api.sandbox.easytransac.com/v2
Sandbox
https://api.sandbox.easytransac.com/v2
POST
/api/payment/direct
API - Payment
The card payment request enables a simple transaction to be initiated. 3DSecure is applied to secure the payment at all levels, the end customer should be redirected to the 3DSecureUrl.

This server-to-server solution allows you to directly exchange all transaction data between your server and our platform. Your customers remain in the environment of your online shop during the entire payment process.

Beware, you have to process sensitive card data. This requires very high PCI-DSS compliance. Make sure your infrastructure meets all necessary security standards!

Request

Body Params application/x-www-form-urlencoded
Amount
number 
required
Transaction amount in cents
CardNumber
string 
required
Credit card number
CardMonth
string 
required
The month of expiry of the bank card
CardYear
number 
required
The year of expiry of the bank card
CardCVV
number 
required
The visual cryptogram of the bank card
3DS
enum<string> 
optional
Use 3DSecure or not (activated by default)
Allowed values:
yesno
CardOwner
string 
optional
Person (or company) who owns the bank card
SaveCard
enum<string> 
optional
Save the card for future use
Allowed values:
yesno
ClientIp
string 
required
Customer IP address
ClientId
string 
optional
Unique Easytransac customer ID (if you have already made a payment for this customer)
Uid
string 
optional
Your unique customer identifier (highly recommended)
OrderId
string 
optional
Your unique transaction identifier (or order number)
Description
string 
optional
Description of the transaction (use \n to make a line break)
Email
string 
optional
The customer's email address associated with the payment (highly recommended)
Firstname
string 
optional
Customer's first name
Lastname
string 
optional
Customer's last name
Address
string 
optional
Customer's address
ZipCode
string 
optional
Customer's postal code
City
string 
optional
Customer's city
Country
string 
optional
Customer's country of residence
CallingCode
string 
optional
Customer's calling code
Phone
string 
optional
Customer's phone number
BirthDate
string 
optional
Customer's birth date
Nationality
string 
optional
Customer's nationality
PreAuth
enum<string> 
optional
Make a pre-authorisation only, the payment will have to be completed via the payment/capture webservice
Allowed values:
yesno
PreAuthDuration
number 
optional
Duration of reservation of an amount in a pre-authorisation, in days (1 to 6)
ReturnUrl
string 
optional
URL where the customer is redirected once the payment has been made
The status of the transaction is systematically returned in POST on this return URL
ReturnMethod
enum<string> 
optional
The ReturnUrl parameter passing is by default in POST, you can force it in GET
Only the "essential" parameters are returned in this case
Allowed values:
GETPOST
MultiplePayments
enum<string> 
optional
URL where the customer is redirected once the payment has been made (useful for a 3DSecure payment for example)
Allowed values:
yesno
MultiplePaymentsRepeat
string 
optional
Number of payments to be made in total when paying in instalments, including deposit (default is 3)
DownPayment
number 
optional
Deposit for a payment in several instalments (33% of the total by default, if payment in 3 instalments for example) or amount of the first payment (for a subscription, if the first payment is different from the following)
Rebill
enum<string> 
optional
Activate or not the subscription (recurring payments)
Allowed values:
yesno
Recurrence
enum<string> 
optional
Frequency of debiting subscriptions (monthly by default)
Allowed values:
yearlymonthlybimonthlyweeklydailybiannualquarterly
PayToEmail
string 
optional
Allows you to redirect the collection of this transaction to the account of another Easytransac user
PayToId
number 
optional
Allows you to redirect the collection of this transaction to the account of another Easytransac user, by his unique ID
UserAgent
string 
optional
Indicates the capabilities of the client browser
Language
string 
optional
Language of the potential bank errors returned
Signature
string 
required
Signature to verify the integrity of the data sent

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.sandbox.easytransac.com/v2/api/payment/direct' \
--data-urlencode 'Amount=' \
--data-urlencode 'CardNumber=' \
--data-urlencode 'CardMonth=' \
--data-urlencode 'CardYear=' \
--data-urlencode 'CardCVV=' \
--data-urlencode 'ClientIp=' \
--data-urlencode 'Signature='

Responses

🟢200Response
application/json
Body
Code
integer 
optional
Example:
0
Signature
string 
optional
Example:
1f51786246a940677afe71f6968972fd46500bd1
Result
object 
optional
OperationType
enum<string> 
optional
Allowed values:
paymentdebit
Example:
payment
PaymentMethod
enum<string> 
optional
Allowed values:
ApiManualMailNfcSmsQRCodeMessengerWhatsappFlashEmv
Example:
Api
ApplicationType
enum<string> 
optional
Allowed values:
ApiBackofficeIosAndroid
Example:
Api
Tid
string 
optional
Example:
4bEp3k1v
Uid
string 
optional
Example:
ccc
OrderId
string 
optional
Example:
test123
Status
enum<string> 
optional
Allowed values:
pendingcapturedfailedrefundedauthorized
Example:
failed
Date
string 
optional
Example:
2018-08-06 10:54:18
DateRefund
string 
optional
Example:
2019-06-03 17:05:30
DateChargeback
string 
optional
Example:
2019-06-03 17:05:30
DateRepresentment
string 
optional
Example:
2019-06-03 17:05:30
Amount
string 
optional
Example:
2.5
ClientIP
string 
optional
Example:
22.22.22.22
ClientIPCountry
string 
optional
Example:
USA
Currency
string 
optional
Example:
EUR
CurrencyText
string 
optional
Example:
Euro
FixFees
string 
optional
Example:
0
Message
string 
optional
Example:
The transaction has failed
3DSecure
enum<string> 
optional
Allowed values:
yesno
Example:
no
OneClick
enum<string> 
optional
Allowed values:
yesno
Example:
yes
Alias
string 
optional
Example:
Xagv6r
CardNumber
string 
optional
Example:
************6629
CardMonth
string 
optional
Example:
01
CardYear
string 
optional
Example:
2025
CardType
string 
optional
Example:
MASTERCARD
CardCountry
string 
optional
Example:
FRA
Test
enum<string> 
optional
Allowed values:
yesno
Example:
yes
Language
string 
optional
Example:
FRE
3DSecureUrl
string 
optional
Example:
https://www.easytransac.com/api/payment/3dsecure/a1b2c3d4
Error
string 
optional
Example:
Invalid card number
AdditionalError
array[string]
optional
Example:
["Do not honour"]
Client
object 
optional
Example
{
  "Code": 0,
  "Signature": "1f51786246a940677afe71f6968972fd46500bd1",
  "Result": {
    "OperationType": "payment",
    "PaymentMethod": "Api",
    "ApplicationType": "Api",
    "Tid": "4bEp3k1v",
    "Uid": "ccc",
    "OrderId": "test123",
    "Status": "pending",
    "Date": "2018-08-06 10:54:18",
    "DateRefund": "2019-06-03 17:05:30",
    "DateChargeback": "2019-06-03 17:05:30",
    "DateRepresentment": "2019-06-03 17:05:30",
    "Amount": "2.5",
    "ClientIP": "22.22.22.22",
    "ClientIPCountry": "USA",
    "Currency": "EUR",
    "CurrencyText": "Euro",
    "FixFees": "0",
    "Message": "The transaction has failed",
    "3DSecure": "yes",
    "OneClick": "yes",
    "Alias": "Xagv6r",
    "CardNumber": "************6629",
    "CardMonth": "01",
    "CardYear": "2025",
    "CardType": "MASTERCARD",
    "CardCountry": "FRA",
    "Test": "yes",
    "Language": "FRE",
    "3DSecureUrl": "https://www.easytransac.com/api/payment/3dsecure/a1b2c3d4",
    "Error": "Invalid card number",
    "AdditionalError": [
      "Do not honour"
    ],
    "Client": {
      "Id": "aaabbb1",
      "Email": "test@test.com",
      "Firstname": "John",
      "Lastname": "Doe",
      "Address": "26 green street",
      "ZipCode": "75001",
      "City": "Paris"
    }
  }
}
Previous
Recurring payments
Next
1-click payment
Built with