Sale
Finalise a payment in one step with a sale transaction.
A sale transaction simplifies the processes of authorisation and capture by merging them into a single step. When you initiate a sale transaction, the required amount is charged to the customer’s credit or debit card, ensuring swift payment processing.
It is recommended to utilise sale transactions, especially when dealing with items of a non-tangible nature, such as digital goods or services that lack a physical presence.
If you need to undo this transaction, you have the option to perform a void transaction. You must perform the void transaction on the same day as the original transaction.
If you need to undo the transaction at a later date, you must perform a refund.
To initiate a sale transaction, you have two pathways:
- Standard sale transaction
You can initiate a payment using a standard sale transaction through the payment gateway. Use a standard sale transaction if you don’t need to use sale 3D for your business or region.
- Sale 3D transaction
You can use a sale 3D transaction to initiate a more secure transaction and to prevent fraud. See 3D Secure 2 for more information.
Transaction workflow
Here’s a breakdown of the sale transaction workflow:
- Submit a sale request
When you submit a sale request, emerchantpay sends the payment for authorisation. This verifies payment details and reserves funds.
- Gateway response
The gateway promptly responds, providing essential transaction information about the payment authorisation status and a unique ID.
- Transaction resolution
emerchantpay sends the payment for settlement to the acquirer and card schemes.
Example of a sale request:
<payment_transaction>
<transaction_type>sale</transaction_type>
<transaction_id>119643250547501c79d8295</transaction_id>
<usage>40208 concert tickets</usage>
<remote_ip>245.253.2.12</remote_ip>
<amount>100</amount>
<currency>USD</currency>
<card_holder>Travis Pastrana</card_holder>
<card_number>4200000000000000</card_number>
<expiration_month>12</expiration_month>
<expiration_year>2024</expiration_year>
<cvv>834</cvv>
<customer_email>travis@example.com</customer_email>
<customer_phone>+1987987987987</customer_phone>
<billing_address>
<first_name>Travis</first_name>
<last_name>Pastrana</last_name>
<address1>Muster Str. 12</address1>
<zip_code>10178</zip_code>
<city>Los Angeles</city>
<state>CA</state>
<country>US</country>
</billing_address>
</payment_transaction>
Example of a successful response:
<payment_response>
<transaction_type>sale</transaction_type>
<status>approved</status>
<mode>live</mode>
<transaction_id>119643250547501c79d8295</transaction_id>
<unique_id>44177a21403427eb96664a6d7e5d5d48</unique_id>
<consumer_id>123456</consumer_id>
<avs_response_code>5I</avs_response_code>
<avs_response_text>Response provided by issuer processor; Address information not verified</avs_response_text>
<cvv_result_code>M</cvv_result_code>
<authorization_code>345678</authorization_code>
<retrieval_reference_number>016813015184</retrieval_reference_number>
<response_code>00</response_code>
<timestamp>2023-08-29T14:00:47Z</timestamp>
<descriptor>Descriptor one</descriptor>
<amount>100</amount>
<currency>USD</currency>
<sent_to_acquirer>true</sent_to_acquirer>
<scheme_transaction_identifier>019091214161031</scheme_transaction_identifier>
<scheme_settlement_date>0830</scheme_settlement_date>
<scheme_response_code>00</scheme_response_code>
</payment_response>