imgproductsuk_rapidapi3-1

All-in-One API Integration

Combining all the most popular payment solutions in a single package, eWAY’s Rapid 3.1 API also includes fraud prevention, transparent redirect, and direct connection to help developers create secure, perfectly rendered payment pages on all devices.

API SNIPPETS

Token Payments

Charge returning customers without re-requesting their billing details! Token Payments allows you to save the details of your customers securely on eWAY's servers and bill them whenever they make new purchases. Capturing and updating a customer's details can be done through any of eWAY's payment APIs, making integration simpler once you are taking payments.

Create a Token

To create a Token Customer, set the "Method" to "CreateTokenCustomer" and the "TotalAmount" to 0.

Simple Direct Connection JSON REST Create Token Example

Endpoint: https://api.sandbox.ewaypayments.com/Transaction
Headers:
Authorization: Basic (see Authentication in the API reference)
Content-Type: application/json

API Reference:

Token Payments


Have multiple accounts with eWAY?

For merchants with multiple eWAY accounts, more Token options are available with Shared Customer Tokens
	{
	"Customer": {
	   "CardDetails": {
		"Name": "Card Holder Name",
		"Number": "4444333322221111",
		"ExpiryMonth": "12",
		"ExpiryYear": "16",
		"CVN": "123"
	   }
	},
	"Payment": {
	   "TotalAmount": 0
	},
	"Method": "CreateTokenCustomer"
	}
		

Charge a Token

To charge a customer, simply use their TokenCustomerID when submitting the request and set the "Method" to "TokenPayment". Note that if the customer is completing the transaction, a CVN is still required.

Simple Direct Connection JSON REST Charge Token Example

Endpoint: https://api.sandbox.ewaypayments.com/Transaction

	{
	"Customer": {
	   "TokenCustomerID": "987654321"
	},
	"Payment": {
	   "TotalAmount": 100
	},
	"TransactionType": "MOTO",
	"Method": "TokenPayment"
	}
		

Update a Token

To update a token customer, just provide the updated details in the request, and set the "Method" to "UpdateTokenCustomer".

Simple Direct Connection JSON REST Update Token Example

Endpoint: https://api.sandbox.ewaypayments.com/Transaction

	{
	"Customer": {
	   "CardDetails": {
		"Name": "New Card Holder Name",
		"Number": "5454545454545454",
		"ExpiryMonth": "12",
		"ExpiryYear": "19",
		"CVN": "321"
	   }
	},
	"Payment": {
	   "TotalAmount": 0
	},
	"Method": "UpdateTokenCustomer"
	}
		

Query a Token

To get the details stored for a Token Customer, simple make a request with the Token Customer ID

Simple Query Token Example

Endpoint: https://api.sandbox.ewaypayments.com/Customer/987654321

For more details, check out the Rapid 3.1 API Token documentation