Charge Customer Wallet

Charging a customer requires that the customer has a payment method on file. That payment method must be the default payment method on their account. You can also charge a customers wallet directly.

Functions Overview:
• Create Customer
• Create Customer Wallet
Authorization / Sale / Credit

Continue reading to understand the the commands and responses for each function.

You can charge or credit a customer on file by running the Auth/Sale/Credit functions using the CUSTOMER-ID.

TRANSACTION COMMANDS WITH CUSTOMER-ID

curl --location --request POST 'https://api.preferredpayments.com/v1/transactions/authorize' \
--header 'X-API-Key: PRIVATE-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payment":{
		"stored":{
    	"wallet":"00000000-0000-0000-0000-000000000000",
      "initiated_by":"merchant"
      }
		}
	},
	"amount": {
		"value": 1.00
	}
}'
{
    "transaction_id": "1234567890",
    "auth_code": "123456",
    "response_code": "APPROVED",
    "response_text": "TRANSACTION_WAS_APPROVED",
    "avs": {
        "code": "",
        "text": ""
    },
    "cvv": {
        "code": "",
        "text": ""
    },
    "metadata": {
        "credit_card_network": "visa",
        "name_on_card": "Test Tester",
        "credit_card_number": "4***********1111",
        "credit_card_expires": "0123"
    },
    "request_id": "ABCD1234567890"
}