Use your own software
If you use your own software to manage repeat payments, program your software to run a sale each time the merchant wants to take a payment. Each request should also include the following information:
- Type of repeat payment
- Position of the payment in the billing cycle
- Information about the first payment
You can also use our tokenization service to save the customer’s payment details as a secure token. For each repeat payment, you can use the secure token instead of the customer’s payment details.
Integration steps
To use your own software for repeat payments, integrate with the following:
Step 1. (Optional) Create a secure token.
Step 2. Create a payment.
Before you begin
Authenticate your requests before making API calls. If your request fails, see Errors.
Step 1. (Optional) Create a secure token
Note: If you have already set up your integration to create a secure token, go to Step 2. Create a payment.
To save the customer’s payment details, send a POST request to our Secure Tokens endpoint.
Note: We assign the secure token to the terminal that sent the request. Depending on the merchant’s account settings, other terminals within the merchant’s account can also use the secure token.
Request parameters
To create the body of your request, use the following parameters:
Request
Example request
Response fields
If your request is successful, we store the customer’s payment details and return a response. The response contains the following fields:
Response
Example response
Step 2. Create a payment
You can run repeat payments with card details or with bank details. The endpoint that you use depends on the payment method:
Create a card payment
To take a payment from the customer, send a POST request to the Payments endpoint. In your request, include the standingInstructions object, which contains information about the repeat payment.
Request parameters
To create the body of your request, use the following parameters:
Request
Example request
Response fields
If your request is successful, we create the payment and return a response. The response contains the following fields:
Response
Example response
Create a bank transfer payment
To take a payment from the customer, send a POST request to our Bank Transfer Payments endpoint.
Request parameters
If you have a secure token that represents the bank account details, include the secure token in the paymentMethod object.
Request
Example request
Response fields
If your request is successful, we create the payment and return a response. The response contains the following fields:
Response
Example response
Test cases
Before you run test cases, read the Payments page in Test Your Integration.
Run a card sale
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/payments
Example response