Payments
Before you can run live payments, we require you to run our test cases to make sure that you have correctly integrated against our API.
Note: If you have any issues when you run our test cases, email our integrations team at [email protected].
Before you begin
To help you with testing, we provide you with:
- Test environment
- Test cards
- Test values
You should also review our testing recommendations.
Test environment
Send your requests to our test environment:
Test environment base URI: https://api.uat.payroc.com/v1
Important: Use only test cards in our test environment.
Authenticating your requests
Use our test Identity Service to generate a Bearer token to include in the header of your requests. To generate your Bearer token, complete the following steps:
- Include your API key in the x-api-key parameter in the header of a POST request.
- Send your request to https://identity.uat.payroc.com/authorize.
Note: You need to generate a new Bearer token before the previous Bearer token expires.
Example request
Example response
If your request is successful, we return a response that contains your Bearer token, information about its scope, and when it expires.
Example request header
Test cards
Note: Our gateway accepts any value for the CVV.
EBT test cards
Note: You can only test EBT transactions if the processor is Fiserv or TSYS.
Test values
To return a specific response from the gateway, change the value in the amount parameter to end in one of the following values:
Testing recommendations
Important: Do not use live card data to test your integration. This is a breach of PCI DSS.
When you test your integration, we recommend that you do the following:
- Test error scenarios – To check that your integration can handle errors, run scenarios that produce errors. For example, test that your integration can handle the response when the value for a request parameter is in the wrong format.
- Follow PCI DSS – To help protect the payment data, make sure that your integration complies with PCI DSS.
- Test all card types – If your integration accepts multiple card types, test your integration with each card type. For example, if your integration accepts EBT cards, you should test with an EBT card.
- Refresh tokens for authentication – Bearer tokens expire after a fixed period. Test your integration to make sure that it can correctly refresh Bearer tokens.
Test cases
We provide you with test cases for the following:
Card payments
Run a card sale without a surcharge
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/payments
Example response
Run a card sale with a surcharge
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/payments
Note: If you are unsure whether your account supports surcharges, email our Integration team at [email protected].
Example response
Run a pre-authorization
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/payments
Note: Set the value for the autoCapture parameter to false
.
Example response
Capture a pre-authorization
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/payments/{paymentId}/capture
Example response
Adjust a card payment
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/payments/{paymentId}/adjust
Example response
Secure tokens
Create a secure token
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/processing-terminals/{processingTerminalId}/secure-tokens
Example response
Create a payment with a secure token
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/payments
Example response
Delete a secure token
Send a DELETE request to the following endpoint:
DELETE https://api.uat.payroc.com/v1/payments/processing-terminals/{processingTerminalId}/secure-tokens/{secureTokenId}
Example response
No response body.
Update a secure token
Send a PATCH request to the following endpoint:
Example response
Payment plans and subscriptions
Create a payment plan
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/processing-terminals/{processingTerminalId}/payment-plans
Example response
Update a payment plan
Send a PATCH request to the following endpoint:
Example response
Create a subscription for a payment plan
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/processing-terminals/{processingTerminalId}/subscriptions
Example response
Manually pay a subscription
Send a POST request to the following endpoint:
Example response
Update a subscription
Send a PATCH request to the following endpoint:
Example response
Deactivate a subscription
Send a POST request to the following endpoint:
Example response
Re-activate a subscription
Send a POST request to the following endpoint:
Example response
Bank transfers
Run a sale with bank account details
Send a POST request to the following endpoint:
POST https://api.uat.payroc.com/v1/bank-transfer-payments
Example response