Card transactions
Process an in-store (card present) transaction.
Initiate a transaction
Request examples
Use the following requests to initiate a card transaction on a point-of-sale device.
val authRequest = TransactionRequest(
merchantTransactionId = "Purchase-001",
merchantTransactionDate = OffsetDateTime.now(),
pointOfInteraction = PointOfInteraction(
pointOfSaleId = "001",
language = "en",
storeAndForwardType = StoreAndForwardType.None
),
amounts = Amounts(
currencyCode = "GBP",
transaction = BigDecimal("100.00"),
gratuity = BigDecimal(0)
),
transactionMethod = TransactionMethod(
intent = IntentType.Authorisation
),
merchantDeeplink = "app://merchantsimulator/main"
)
val authRequest = TransactionRequest(
merchantTransactionId = "Purchase-001",
merchantTransactionDate = OffsetDateTime.now(),
pointOfInteraction = PointOfInteraction(
pointOfSaleId = "001",
language = "en",
storeAndForwardType = StoreAndForwardType.None
),
amounts = Amounts(
currencyCode = "GBP",
transaction = BigDecimal("100.00"),
gratuity = BigDecimal(0)
),
transactionMethod = TransactionMethod(
intent = IntentType.EstimatedAuthorisation
),
merchantDeeplink = "app://merchantsimulator/main"
)
val authRequest = TransactionRequest(
merchantTransactionId = "Purchase-001",
merchantTransactionDate = OffsetDateTime.now(),
pointOfInteraction = PointOfInteraction(
pointOfSaleId = "001",
language = "en",
storeAndForwardType = StoreAndForwardType.None
),
amounts = Amounts(
currencyCode = "GBP",
transaction = BigDecimal("100.00"),
gratuity = BigDecimal(0)
),
transactionMethod = TransactionMethod(
intent = IntentType.Purchase
),
merchantDeeplink = "app://merchantsimulator/main"
)
val authRequest = TransactionRequest(
merchantTransactionId = "Refund-001",
merchantTransactionDate = OffsetDateTime.now(),
pointOfInteraction = PointOfInteraction(
pointOfSaleId = "001",
language = "en",
storeAndForwardType = StoreAndForwardType.None
),
amounts = Amounts(
currencyCode = "GBP",
transaction = BigDecimal("100.00"),
gratuity = BigDecimal(0)
),
transactionMethod = TransactionMethod(
intent = IntentType.StandaloneRefund
),
merchantDeeplink = "app://merchantsimulator/main"
)
Parameter | Description |
---|---|
merchantTransactionId string (≤ 50 characters) | A unique identifier for this transaction. |
merchantTransactionDate OffSetDateTime | The date and time when the transaction happened, in ISO 8601 format. |
pointOfInteraction PointOfInteraction | Details about the device and environment where a card present transaction takes place. It includes various attributes that help identify and describe the capabilities and configurations of the point of sale (POS) device. |
pointOfInteraction.pointOfSaleId string | The unique identifier for the specific point of sale device, often assigned by the merchant or payment processor. |
pointOfInteraction.language string | The display language, in ISO 639-1 format. |
pointOfInteraction.storeAndForwardType TBD | Store and Forward is a mechanism used for handling transactions when the merchant's connection to the PXP Financial gateway is disrupted. It securely stores transactions offline until communications are re-established with the gateway. Possible values:
|
amounts object | Details about the transaction amount. |
amounts.currencyCode string | The currency code associated with the transaction, in ISO 4217 format. |
amounts.transaction BigDecimal | The transaction amount. |
amount.gratuity BigDecimal | The optional gratuity amount. |
transactionMethod object | Details about the transaction method. |
tansactionMethod.intent IntentType | The payment intent. Possible values:
|
merchantDeeplink string | The URL that the SDK will navigate back to upon transaction completion, if applicable. For more information, see Callback navigation. |
Response example
If your request is successful, you'll receive a response that includes the transaction's updated state
.
structureTransactionResponse(
state = "Authorised",
stateData = StateData(
code = "Success",
message = "Transaction successful"
),
approvalCode = "123456",
merchantTransactionId = "MERCH-001",
merchantTransactionDate = "2024-03-19T10:30:00Z",
systemTransactionId = "PXP-123456789",
providerTransactionId = "PROV-987654321",
fundingData = FundingData(
maskedPrimaryAccountNumber = "************1234",
expiryMonth = "12",
expiryYear = "2025",
cardScheme = "Visa",
gatewayTokenId = "123e4567-e89b-12d3-a456-426614174000",
emvDataResponse = EmvDataResponse(
applicationId = "A0000000031010",
applicationLabel = "VISA CREDIT",
authorisationResponseCode = "00",
cardHolderVerificationMethodResults = "410000",
panSequenceNumber = "01",
preferredName = "VISA CREDIT"
),
providerResponse = ProviderResponse(
provider = "PROVIDER_NAME",
code = "00",
message = "Approved",
merchantId = "MERCH123",
terminalId = "TERM456",
paymentAccountReference = "PAR-123456",
schemeTransactionId = "VISA-789012"
)
)
)
Property | Description |
---|---|
| The current state of the transaction.
|
| Details about the state. |
| The state code. |
| The state message. |
| A unique identifier code provided by the authorising entity, indicating approval or reference for the transaction. This code typically consists of alphanumeric characters, starting with an uppercase letter, and serves as a key reference for authorisation verification. |
| The merchant transaction ID. |
| The date and time when the transaction happened, in ISO 8601 format. |
| The system transaction ID. |
| The transaction ID set by the provider. |
| Details about the funding method. |
| The masked primary account number. |
| The card's expiry month ( |
| The card's expiry year ( |
| The card scheme. |
| The gateway token ID. |
| Details about the EMV (Europay, Mastercard, and Visa) response. |
| EMV tag 9F06: a unique identifier for the application, according to ISO/IEC 7816-5. |
| EMV tag 50: a mnemonic associated with the Application Identifier (AID) according to ISO/IEC 7816-5. |
| The authorisation response code. |
| EMV tag 9F34: the results of the last cardholder verification method performed. |
| EMV tag 5F34: the PAN sequence number, which identifies and differentiates cards with the same PAN. |
| The preferred name of the application as designated by the card issuer. |
| Details about the provider response. |
| The name of the provider that processed the transaction. |
| The raw result code returned by the provider that processed the transaction. |
| The raw message associated with the result code from the provider that processed the transaction. |
| The unique identified assigned to you by the provider. |
| The unique identifier assigned to the terminal by the provider. |
| The unique identifier assigned to a payment account, independent of the card number. It remains constant over the account's lifetime, even if the card number (PAN) changes. |
| The scheme transaction ID. |
Updated 3 days ago