Skip to content

Direct capture

You can request a capture of funds using either the Topup Card or an alternate means of payment (specified in the paymentProduct parameter). This doesn't require an authorization first.

Paperclip icon

Prerequisites – Steps to do before the capture:

You can then use the usual /v1/payins request with attributes specific to the Card Acquiring feature as described in this article.

Parameters

AttributeTypeDescription
walletId stringThe unique identifier of the Wallet to be credited.
userId stringThe unique identifier of the User requesting the topup.
topupCardIdstringThe unique identifier of the Topup Card, if any.
profilestringYour HiPay Merchant ID. Required if you have multiple MIDs, otherwise empty.
orderId stringThe unique identifier of the order, guaranteeing the uniqueness of the transaction. Must be unique and abide by the following rules:
  • Length: min. 32 characters
  • Structure: <yourCompanyName>_order_<uniqueIdentifier>
amount floatThe amount of the operation.
currency stringCurrency of the operation. Format: ISO-4217.
acceptUrl stringThe URL to which the user is returned when the payment process is successfully completed.
declineUrl stringThe URL to which the user is returned when the acquirer declines the payment,
pendingUrl stringThe URL to which the user is returned when the payment request was submitted to the acquirer but the response is not available yet.
exceptionUrl stringThe URL to which the user is returned when there is an error or a system failure.
cancelUrl stringThe URL to which the user is returned when the payment is canceled.
eci stringThe security level at which the payment information is processed. Can be either 7 or 9.
authenticationIndicator stringWhether 3DS should be performed for the transaction. Set the value to 2 for 3DS.
description stringThe description of the operation.
paymentProduct stringCan be: cb, visa, mastercard, ideal, sofort-uberweisung.
issuerBankIdstringThe Bank Identifier Code of the end user's issuing bank. Only used if the paymentProduct is ideal.
ipaddrstringThe IP address of the end user's device.
browserInfo objectObject containing information regarding the end user's browser.
firstname stringThe first name of the user.
lastname stringThe last name of the user.
email stringThe email of the user.
phone stringThe phone number of the user.
streetAddress stringThe residence street name and number of the user.
city stringThe residence city of the user.
zipCode stringThe residence city zipcode of the user.
country stringThe residence country of the user. Format: ISO 3166 alpha-2
cardHolder stringThe name associated to the card.
deviceChannelintegerThe PSD2 Channel through which the transaction is being processed.

Request

bash
curl -X POST {baseUrl}/v1/payins \
	--header 'Authorization: Bearer {accessToken}' \
	--header 'Content-Type: application/json' \
	-d '{payload}'

Here is an example of {payload}:

json
{
  "amount": 10,
  "currency": "EUR",
  "walletId": "3152544",
  "userId": "100655503",
  "paymentProduct": "visa",
  "topupCardId": "3252046c-6138-44f1-a24d-8807974c7ec3",
  "messageToUser": "string",
  "acceptUrl": "acceptURL",
  "declineUrl": "declineURL",
  "pendingUrl": "pendingURL",
  "exceptionUrl": "exceptionURL",
  "cancelUrl": "cancelURL",
  "eci": "9",
  "authenticationIndicator": "2",
  "orderId": "order_test_1234567878911",
  "description": "string",
  "deviceChannel": 0,
  "browserInfo": {
    "javaEnabled": true,
    "javascriptEnabled": true,
    "ipaddr": "0.0.0.0",
    "httpAccept": "string",
    "httpUserAgent": "string",
    "language": "string",
    "colorDepth": 8,		// Can be: 1, 4, 8, 15, 16, 32, 48
    "screenHeight": 0,
    "screenWidth": 0,
    "timezone": "string",
    "deviceFingerprint": "string"
  },
  "firstname": "Alex",
  "lastname": "Oak",
  "email": "aoak@example.com",
  "phone": "string",
  "streetAddress": "string",
  "city": "string",
  "zipCode": "string",
  "country": "string",
  "cardHolder": "A Oak"
  }

Returns the following object and sends the authorization.create, payin.create, and payin.udpate webhooks.

json
{
	"state": "completed",
	"reason": "",
	"forwardUrl": "",		// Redirect the user to this URL if populated
	"test": "true",
	"mid": "00001340255",
	"attemptId": "1",
	"authorizationCode": "test123",
	"transactionReference": "800150032845",
	"referenceToPay": "",
	"dateCreated": "2022-01-26T13:45:11+0000",
	"dateUpdated": "2022-01-26T13:45:17+0000",
	"dateAuthorized": "2022-01-26T13:45:17+0000",
	"status": "118",
	"message": "Captured",
	"authorizedAmount": "40.99",
	"capturedAmount": "40.99",
	"refundedAmount": "0.00",
	"creditedAmount": "0.00",
	"decimals": "2",
	"currency": "EUR",
	"ipAddress": "0.0.0.0",
	"ipCountry": "",
	"deviceId": "",
	"cdata1": "212707",
	"cdata2": "878744",
	"cdata3": "1656177",
	"cdata4": "",
	"cdata5": "",
	"cdata6": "",
	"cdata7": "",
	"cdata8": "",
	"cdata9": "",
	"cdata10": "",
	"avsResult": "",
	"eci": "9",
	"paymentProduct": "visa",
	"paymentMethod": {
		"token": "48d8ad7f642bff96387b14f0b060ad6a6194e91debc30aa0b31bdcd5a0a6680a",
		"cardId": "9fd81707-8f41-4a01-b6ed-279954336ada",
		"brand": "VISA",
		"pan": "411111******1111",
		"cardHolder": "TOM PES",
		"cardExpiryMonth": "12",
		"cardExpiryYear": "2025",
		"issuer": "JPMORGAN CHASE BANK, N.A.",
		"country": "US"
	},
	"threeDSecure": "",
	"fraudScreening": {
		"scoring": "0",
		"result": "NOT_LAUNCHED",
		"review": ""
	},
	"order": {
		"id": "order_test1643204709",
		"dateCreated": "2022-01-26T13:45:11+0000",
		"attempts": "1",
		"amount": "40.00",
		"shipping": "0.00",
		"tax": "0.00",
		"decimals": "2",
		"currency": "EUR",
		"customerId": "",
		"language": "en_US",
		"email": ""
	},
	"debitAgreement": {
		"id": "10347296",
		"status": "available"
	}
}

To know the actual payment status, please see the Payin status attribute of the authorization.create, payin.create and payin.update webhooks.

If the forwardUrl attribute is populated in the response, you must redirect the end user to this URL for them to complete the funds capture process. See the list of payment products to know when redirection is necessary.

When a forwarding occurs, Treezor won't send any webhook until the end user has completed the steps available at the forwardUrl.