Skip to main content

Server-to-server debit request on an existing token

This method allows you to request a debit on an existing token with an active mandate. If the mandate has not been initialy requested at token creation stage, the system will try to create it during operation process.

  • URL syntax: /api/v2/merchant/payment
  • Method: POST

Request parameters

NameTypeDetailsMandatoryDescription
flowstringAPIYAlways use ‘API’ for debit request on existing token.
token_idintYThe token reference.
referencestringUNIQUE, [ -~] + (max: 85 ascii printable characters)YYour own payment identifier for the request.
amountintYThe payment amount in cents (500 XXX = 5.00 XXX).
currencystring[A-Z] 3YThe currency in which the payment should be processed. (The list of allowed currencies can be checked from the settings page of the merchant backend.) The payment currency (ISO-4217). This will also be the default currency for the created mandate.
preauthbooleanNThis parameter determines whether the payment request should be fully processed or only authorized. If set to true the payment is only authorized and it will need to be (captured see Capture a pre-authorization) or (voided see Void a pre-authorization) later. (Defaults to false).
capture_dateunix timestampNThis parameter determines when a pre-authorization will be automatically captured
return_urlstringNThis parameter overrides the default return_url configuration in your SysPay merchant account settings.
ems_urlstringNThis parameter overrides the default ems_url configuration set in your SysPay merchant account settings.
cryptocurrency_typestringCBDC | STABLECOIN | BLOCKCHAIN | NFT | OTHERNAllows to indicate payment as crypto conversion.

Example request

{
"reference": "65ea33c6d2025",
"amount": 10000,
"currency": "EUR",
"preauth": false,
"flow": "API",
"source": null,
"return_url": "http://www.mysite.com/return.php",
"ems_url": "http://www.mysite.com/ems.php",
"token_id": "83377"
}

Response parameters

The response in this case is a Payment object.

Example response

{
"class": "payment",
"id": 246800,
"reference": "65ea33c6d2025",
"amount": 10000,
"currency": "EUR",
"status": "SUCCESS",
"preauth_expiration_date": null,
"action_url": null,
"flow": "API",
"processing_time": 1709847496,
"source": 2544,
"contract": "SysPay (8737476)",
"descriptor": "Test Contract",
"extra": null,
"description": null,
"account_id": 23918,
"merchant_id": 2744,
"merchant_login": "23918001",
"settlement_date": 1709847496,
"failure_category": null,
"chip_and_pin_status": null,
"capture_date": null,
"token": {
"class": "token",
"id": "83377",
"status": "ACTIVE",
"action_url": null,
"booking_id": "65ea33bc7446e",
"check_in_date": "2024-03-30",
"check_out_date": "2024-04-06",
"booking_details": {
"class": "booking_details",
"type": "HOTEL",
"booking_id": "65ea33bc7446e",
"check_in_date": "2024-03-30",
"check_out_date": "2024-04-06",
"total_booking_amount": "100000",
"booking_currency": "EUR"
},
"creation_date": "1709847486",
"expiration_date": "1712439484",
"description": "Booking 65ea33bc7446e from 2024-03-30 to 2024-04-06.",
"extra": "Array",
"customer": {
"class": "customer",
"email": "john.doe+65ea33bc72e00@gmail.com",
"language": "en",
"firstname": "John",
"lastname": "Doe",
"billing_address": {
"class": "billing_address",
"address1": "55 rue du Faubourg Saint-Honoré",
"address2": null,
"address3": null,
"city": "Paris",
"country": "FR",
"postal_code": "75008"
}
},
"payment_method": {
"class": "payment_method",
"type": "CREDITCARD",
"validation_status": "NOT_VALIDATED",
"validation_date": null,
"invalid_reason": null,
"display": "4491-70xx-xxxx-4007",
"details": {
"class": "payment_method_details",
"fingerprint": "1c2cd558-d343-49c4-ac98-0bee7846c0c4",
"holder": "Card Holder Name",
"scheme": null,
"exp_month": "01",
"exp_year": "2025"
}
},
"moto_instance_id": null,
"mandate": {
"class": "mandate",
"status": "ACTIVE",
"currency": "EUR",
"end_reason": null,
"start_date": 1709847486,
"end_date": null
},
"payment": null
},
"customer": {
"class": "customer",
"email": "john.doe+65ea33bc72e00@gmail.com",
"language": "en",
"firstname": null,
"lastname": null,
"billing_address": {
"class": "billing_address",
"address1": "55 rue du Faubourg Saint-Honoré",
"address2": null,
"address3": null,
"city": "Paris",
"country": "FR",
"postal_code": "75008"
}
},
"payment_method": {
"class": "payment_method",
"type": "CREDITCARD",
"validation_status": "NOT_VALIDATED",
"validation_date": null,
"invalid_reason": null,
"display": "4491-70xx-xxxx-4007",
"details": {
"class": "payment_method_details",
"fingerprint": "1c2cd558-d343-49c4-ac98-0bee7846c0c4",
"holder": "Card Holder Name",
"scheme": null,
"exp_month": "01",
"exp_year": "2025"
}
},
"processor_reference": null,
"qr_code": null
}