In the request, send the customer’s payment details. If the request is successful, our gateway returns a token that you can use in a follow-on action, for example, run a sale.
Parameters
Name
In
Type
Description
Idempotency-KeyRequired
header
string
Unique identifier that you generate for each request. You must use the UUID v4 format for the identifier. For more information about the idempotency key, go to Idempotency.
processingTerminalIdRequired
path
string
Unique identifier that our gateway assigned to the terminal.
Channel that the merchant used to receive the payment details.poswebmoto
operatorstring
Operator who initiated the request.1–50 chars
sourceobjectrequired
Polymorphic object that contains the payment method to tokenize. The value of the type parameter determines which variant you should use: ach Automated Clearing House (ACH) details pad Pre-authorized debit (PAD) details card Payment card details
achobject
Object that contains information about the payment details for the customer’s automated clearing house (ACH) transactions.
accountNumberstringrequired
Customer’s bank account number. Note: In responses, our gateway shows only the last four digits of the account number, for example, *****5929.4–17 chars^[0-9]*$
accountTypestring
Indicates the customer’s account type. Note: For bank account details, send a value for accountType.checkingsavings
nameOnAccountstringrequired
Customer's name.1–50 chars
routingNumberstringrequired
Nine-digit number that identifies the customer's bank.9–9 chars^[0-9]*$
secCodestring
Indicates how the customer authorized the ACH transaction. Send one of the following values: web – Online transaction. tel – Telephone transaction. ccd – Corporate credit or debit entry for a business bank account. ppd – Pre-arranged transaction. Note: This field is mandatory for ACH payments and unreferenced refunds.webtelccdppd
typestringrequired
Indicates the type of bank account details the customer is using: ACH Customer's bank account is in the United States. PAD Customer's bank account is in Canada.ach
padobject
Object that contains information about the payment details for the customer’s preauthorized electronic debit (PAD) transactions.
accountNumberstringrequired
Customer's account number. Note: In responses, our gateway shows only the last four digits of the account number, for example, *****5929.7–12 chars^[0-9]*$
accountTypestring
Indicates the customer’s account type. Note: For bank account details, send a value for accountType.checkingsavings
institutionNumberstringrequired
Three-digit number that identifies the customer's bank.3–3 chars^[0-9]*$
nameOnAccountstringrequired
Customer's name.1–29 chars
transitNumberstringrequired
Five-digit number that identifies the customer's bank branch.5–5 chars^[0-9]*$
typestringrequired
Indicates the type of bank account details the customer is using: ACH Customer's bank account is in the United States. PAD Customer's bank account is in Canada.pad
cardobject
Object that contains information about the customer’s payment card.
accountTypestring
Indicates the customer’s account type. Note: Send a value for accountType only for bank account details.checkingsavings
cardDetailsobjectrequired
Polymorphic object that contains payment card information. The value of the entryMethod parameter determines which variant you should use: raw Unencrypted payment data directly from the device. icc Payment data that the device captured from the chip. keyed Payment data that the merchant entered manually. swiped Payment data that the device captured from the magnetic strip.+132 more fields at deeper levels — see the full spec
typestringrequired
Method that the terminal used to take the payment.card
Responses
Successful request. We created the single-use token.
Date and time that the token expires. We return this value in the ISO 8601 format.
operatorstring
Operator who initiated the request.0–50 chars
paymentMethodobject
Polymorphic object that contains payment card details.
cardobject
Object that contains information about the customer’s payment card.
accountTypestring
Indicates the customer’s account type. Note: Send a value for accountType only for bank account details.checkingsavings
cardDetailsobjectrequired
Polymorphic object that contains payment card information. The value of the entryMethod parameter determines which variant you should use: raw Unencrypted payment data directly from the device. icc Payment data that the device captured from the chip. keyed Payment data that the merchant entered manually. swiped Payment data that the device captured from the magnetic strip.+132 more fields at deeper levels — see the full spec
typestringrequired
Method that the terminal used to take the payment.card
processingTerminalIdstringrequired
Unique identifier that we assigned to the terminal.4–50 chars
sourceobjectrequired
Polymorphic object that contains the payment method that we tokenized. The value of the type parameter determines which variant you should use: ach Automated Clearing House (ACH) details pad Pre-authorized debit (PAD) details card Payment card details
achobject
Object that contains the customer's account details.
accountNumberstringrequired
Customer's account number.4–17 chars^[0-9]*$
nameOnAccountstringrequired
Customer's name.1–50 chars
routingNumberstringrequired
Routing number of the customer's account.9–9 chars^[0-9]*$
typestringrequired
ach
padobject
Object that contains the customer's account details.
accountNumberstringrequired
Customer's account number.7–12 chars^[0-9]*$
institutionNumberstringrequired
Three-digit code that represents the customer's bank.3–3 chars^[0-9]*$
nameOnAccountstringrequired
Customer's name.1–29 chars
transitNumberstringrequired
Five-digit code that represents the customer's banking branch.5–5 chars^[0-9]*$
typestringrequired
pad
Cardobject
Object that contains the customer's card details.
cardNumberstringrequired
Primary account number of the customer's card.12–19 chars
cardTypestring
Card brand of the card, for example, Visa.
cardholderNamestringrequired
Cardholder's name.1–50 chars
currencystring
Currency of the transaction. The value for the currency follows the ISO 4217 standard.AEDAFNALLAMDANGAOAARSAUD+163 more
debitboolean
Indicates if the card is a debit card.
expiryDatestring
Expiry date of the customer's card.[0-9]{4}
surchargingobject
Object that contains surcharge information. Our gateway returns this object only if the merchant adds a surcharge to transactions.+4 more fields at deeper levels — see the full spec
typestringrequired
Type of payment.card
tokenstringrequired
Unique identifier that our gateway assigned to the payment details. Note: Merchants can use the token with other terminals linked to their account.128–128 chars
Validation error
400 Bad Request · application/problem+json
{"detail":"'Idempotency-Key' is already in use against a different request","status":409,"title":"Idempotency-Key in use","type":"https://docs.payroc.com/api/errors#idempotency-key-in-use"}
Response schema · 8 fields
detailstringrequired
Explanation of the problem
errorsobject[]
detailstring
Short detail of the validation errors
messagestring
Error message
parameterstring
The parameter or field causing the issues
statusintegerrequired
Http status code
titlestringrequired
Short description of the issue.
typestringrequired
URI reference identifying the problem type
Identity could not be verified
401 Unauthorized · application/problem+json
{"detail":"Your identity could not be verified","status":401,"title":"Not Authorized","type":"https://docs.payroc.com/api/errors#not-authorized"}
Response schema · 4 fields
detailstringrequired
Explanation of the problem
statusintegerrequired
Http status code
titlestringrequired
Short description of the issue.
typestringrequired
URI reference identifying the problem type
Do not have permissions to perform this action
403 Forbidden · application/problem+json
{"detail":"You do not have the required permissions to perform this action","instance":"https://api.payroc.com/v1/exampleResource/3","resource":"exampleResource","status":403,"title":"Forbidden","type":"https://docs.payroc.com/api/errors#forbidden"}
Response schema · 6 fields
detailstringrequired
Explanation of the problem
instancestring
Resource path the action was attempted on
resourcestring
Resource the action was attempted on
statusintegerrequired
Http status code
titlestringrequired
Short description of the issue.
typestringrequired
URI reference identifying the problem type
Not acceptable
406 Not Acceptable · application/problem+json
{"detail":"Resource does not support the representation requested","status":406,"title":"Not acceptable","type":"https://docs.payroc.com/api/errors#not-acceptable"}
Response schema · 4 fields
detailstringrequired
Explanation of the problem
statusintegerrequired
Http status code
titlestringrequired
Short description of the issue.
typestringrequired
URI reference identifying the problem type
Conflict
409 Conflict · application/problem+json
{"detail":"The resource you attempted to create already exists","instance":"https://api.payroc.com/v1/merchant/12345","status":409,"title":"Resource already exists","type":"https://docs.payroc.com/api/errors#resource-already-exists"}
Response schema · 13 fields
detailstringrequired
Explanation of the problem
errorsobject[]
detailstring
Short detail of the validation errors
messagestring
Error message
parameterstring
The parameter or field causing the issues
instancestring
Resource path to the existing resource
linkobject
Object that contains HATEOAS links for the resource.
hrefstringrequired
URL of the target resource.
methodstringrequired
HTTP method that you need to use with the target resource.
relstringrequired
Indicates the relationship between the current resource and the target resource.
statusintegerrequired
Http status code
titlestringrequired
Short description of the issue.
typestringrequired
URI reference identifying the problem type
Unsupported media type
415 Unsupported Media Type · application/problem+json
{"detail":"You submitted a payload in an unsupported format","status":415,"title":"Unsupported media type","type":"https://docs.payroc.com/api/errors#unsupported-media-type"}
Response schema · 4 fields
detailstringrequired
Explanation of the problem
statusintegerrequired
Http status code
titlestringrequired
Short description of the issue.
typestringrequired
URI reference identifying the problem type
An error has occured
500 Internal Server Error · application/problem+json
{"detail":"We are unable to process your request at this time","errors":[{"message":"Service offline"}],"status":500,"title":"Api error","type":"https://docs.payroc.com/api/errors#api-error"}