Process a Card Purchase with 3D Secure

POST /cardpayments/v1/accounts/account_id/auths

Once the user has been authenticated and the authentication has been registered and validated on the Paysafe platform, you can do a regular POST request to the auths endpoint.

Your request must contain the additional JSON Authentication object.

Request Example
curl -X POST \
  -u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
  -H 'Content-Type: application/json' \
  -d ' {
         "merchantRefNum" : "demo-1",
         "amount" : 10098,
         "card" : {
           "cardNum" : "4111111111111111",
             "street":"100 Queen Street West",
             "zip":"M5H 2N2"
        } '

By default the card processing system will check for duplicate transactions.

Prior to trying the example above, you should:

  • Provide a unique merchant reference number for each transaction.
  • Replace the account number (89987201) in the URL with the test account number you received.
  • Replace the API key (after the -u) with the API key you have received.
Response Example
	"links": [{
		"rel": "self",
		"href": ""
	}, {
		"rel": "settlement",
		"href": ""
	"id": "ebf6ae3d-88e1-40da-9b98-81044467345b",
	"merchantRefNum": "demo-1",
	"txnTime": "2017-05-01T14:52:35Z",
	"status": "COMPLETED",
	"amount": 10098,
	"settleWithAuth": true,
	"availableToSettle": 0,
	"card": {
		"type": "VI",
		"lastDigits": "1111",
		"cardExpiry": {
			"month": 2,
			"year": 2027

The status is set to COMPLETED and the value for availableToSettle is 0 because the card was automatically charged as part of the request, since the settleWithAuth flag was set to true. You can look up the transaction at any future time using either the merchantRefNum (demo-1) or the id returned in the response (in this case - ebf6ae3d-88e1-40da-9b98-81044467345b).

See our API Reference section for a list of all the JSON attributes and types available for the Authorization endpoint.

Did you find this page useful?