Note: You may also process debit card data and obtain a token using the Debit Card Tokenization Element
The Payments API is a PCI compliant endpoint and allows for secure debit card token creation. These tokens are used within DailyPay's APIs. When a tokenized debit card is added to a user’s account they can begin to take instant transfers.
How does this work? A user's debit card data is sent via POST request to the Payments API. The debit card data is encrypted and tokenized before being returned. This tokenized card data is used for instant transfers via the Extend API.
It’s how we keep card data secure. DailyPay has a responsibility and legal requirement to protect debit card data therefore the Payments API endpoint complies with the Payment Card Industry Data Security Standards PCI DSS.
📘 Info DailyPay only handles card data during encryption and tokenization The Payments server is DailyPay’s only PCI compliant API.
Steps to create a tokenized debit card for use within DailyPay's APIs.
After you have securely collected the debit card data for a user, create a POST to the PCI-compliant Cards API with the following required parameters in this example.
Show parameters
The first name or given name of the cardholder.
The last name or surname of the cardholder.
The full card number without spaces or hyphenation.
The four-digit year of expiration for the card.
The two-digit month of the expiration date for the card.
The CVV card code.
The first line of the address associated with the card.
The second line of the address associated with the card.
The city component of the address associated with the card.
The two-letter state component of the address associated with the card.
The 5 digit zip-code component of the address associated with the card.
The two-letter ISO 3166 country code component of the address associated with the card.
- https://payments.dailypay.com/v2/cards/generic
- JavaScript
- Go
- C#
- Java
- Python
- Ruby
- cURL
import { SDK } from "@dailypay/dailypay";
const sdk = new SDK();
async function run() {
const result = await sdk.cardTokenization.create({
firstName: "Edith",
lastName: "Clarke",
cardNumber: "4007589999999912",
expirationYear: "2027",
expirationMonth: "02",
cvv: "123",
addressLineOne: "123 Kebly Street",
addressLineTwo: "Unit C",
addressCity: "Fort Lee",
addressState: "NJ",
addressZipCode: "07237",
addressCountry: "US",
});
console.log(result);
}
run();The Cards API returns an opaque string representing the card details. This token is encrypted and complies with PCI DSS. You will need the token for step 3, after which it can be discarded. The token is a long string with a structure similar to a JWT:
{"token":"s7dydhd7ih......jhfijuf245"}Proper authorization is required to create a debit card account.
Send the encrypted token in a POST request to the accounts endpoint as the value for the token field in the details object. This will create a transfer account and allow a user to start taking transfers.
- DailyPay REST API serverhttps://api.dailypay.com/rest/accounts
- JavaScript
- Go
- C#
- Java
- Python
- Ruby
- cURL
import { SDK } from "@dailypay/dailypay";
const sdk = new SDK({
version: 3,
security: {
oauthUserToken: "<YOUR_OAUTH_USER_TOKEN_HERE>",
},
});
async function run() {
const result = await sdk.accounts.create({
data: {
type: "accounts",
attributes: {
name: "Acme Bank Checking Account",
accountType: "DEPOSITORY",
subtype: "CHECKING",
depositoryAccountDetails: {
firstName: "Edith",
lastName: "Clarke",
routingNumber: "XXXXX2021",
accountNumber: "XXXXXX4321",
},
},
relationships: {
person: {
data: {
type: "people",
id: "3fa8f641-5717-4562-b3fc-2c963f66afa6",
},
},
},
},
});
console.log(result);
}
run();DailyPay provides test accounts to support your development and QA processes. In addition, DailyPay's UAT environment restricts the bank accounts and debit cards that may be used.
DailyPay's UAT environment requires bank accounts that meet the following rules:
- Routing number must be
021000021 - Account number must be any integer with
eight or more digits
The following test debit card numbers may be used and are compatible with the UAT environment:
555555555555444441111111111111114111171111111115
Note: Each of the cards above may be added to multiple users. DailyPay's duplicate card checks and fraud prevention measures will not be triggered.