Card Creation

Payments

What is the Payments API?

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.

What is PCI compliance?

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.

Create a Debit Card Token

Steps to create a tokenized debit card for use within DailyPay's APIs.

1. POST debit card data to the Payments API

After you have securely collected the debit card data for a user, create a POST to the PCI compliant payments endpoint POST Generic Card with the following required parameters in this example.

{
     "first_name": "Edith",
     "last_name": "Clarke",
     "card_number": "4007589999999912",
     "expiration_year": "2027",
     "expiration_month": "02",
     "cvv": "123",
     "address_line_one": "1234 Street",
     "address_city": "Fort Lee",
     "address_state": "NJ",
     "address_zip_code": "07237",
     "address_country": "US"
}

2. Receive and handle the tokenized card data

The payments endpoint 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 and will look similar to below:

{"token":"eyJhbGciOiJSU0Et.....T0FFU}

3. POST the token to the Extend API

📘 Important Proper authorization is required to create a transfer account.

Send the encrypted token in a POST request to the transfer accounts endpoint as the value for the generic_token field. This will create a transfer account and allow a user to start taking transfers.

Obtain a card token

Obtain a PCI DSS Compliant card token. This token must be used in order to add a card to a user’s DailyPay account.

Request
Request Body schema: application/json
required
address_city
required
string

The city component of the address associated with the card.

Example: "Fort Lee"
address_country
required
string

The two-letter ISO 3166 country code component of the address associated with the card.

Example: "US"
address_line_one
required
string

The first line of the address associated with the card.

Example: "123 Kebly Street"
address_line_two
string or null

The second line of the address associated with the card.

Example: "Unit C"
address_state
required
string

The two-letter state component of the address associated with the card.

Example: "NJ"
address_zip_code
required
string

The 5 digit zip-code component of the address associated with the card.

Example: "07237"
card_number
required
string

The full card number without spaces or hyphenation.

Example: "4007589999999912"
cvv
string or null

The CVV card code.

Example: "123"
expiration_month
required
string

The two-digit month of the expiration date for the card.

Example: "02"
expiration_year
required
string

The four-digit year of expiration for the card.

Example: "2027"
first_name
required
string

The first name or given name of the cardholder.

Example: "Edith"
last_name
required
string

The last name or surname of the cardholder.

Example: "Clarke"
Responses
200

Returns an opaque string representing the card details.

Response Schema: application/json
token
required
string

This token should be supplied in the generic_token field when creating a TransferAccount with transfer_account_type of DebitCard using the Extend API "Create a transfer account" endpoint.

Example: "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.ZR3Eq5MAuS_03RopT9QWK1MUiFFIOoZoDgwkiDWzz-7S6Zeda0JdvzwI51lHxuvi6EFdXLi7-1thIpPt49JMiLtzZgcf7UCJrVOZTf88JhIL5X5rvmnpO2NADfR9PVzrSV2AwxLCRy6vRfgCHGJZy1o5AZzwaaMLCRzqb3vdCaXn9gKvGPmvHKg9PkR-Zrfs9XDsRHeCVtfvu8PBzMNO5r_Dfo-fo3l3cyV4pKFtbvjlJXm--Ko5XiJPxffnBofmlYabXHku5yuo6IsVTnd9ETksMu1tnfr4T9AC14fiZew0FJetIayf_-kmiR1t7_aU3Q_A8Uwy7kTmxrFTvu6Cgw.yT7WptQfjKXswG_N.DY77q22ZGV5efeh6LNI6bWRmhZikY0dLAyIDVrK7nite1B7T_4IL9XdM7Luf9BOpXHTscu9y6Zqun-687bclLnzOYB7nNpV_DZM-5stWz2MuQeLiokqTfrF5jfXtpLDaDEiwAY9HHTBrKoD91Wkp5aX1CsB4jFBTfFDES0BQbTrRXqLTMIItZqKFbh5btqFCskfl7JKtozo3UgMNj__HnNiF5GUN-QgiOrYZKn7d2hXPpUABPmYGFkpXSXTnnCRGTVoZHoyh5L-4Apr8yVRUxUX1rrMFjOurr8VqmQPg-9-2Z7zxmwp5joms19JdgV2FhgJnbKilwFY4IQrYbhfLdfuApH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p5aqahY1YQQmMM4VLT-05Fz53cTlJsEqnu6_2tg6v_j4cWYnHnP4IAvtJmw4BRQ.3yAMw37rs8X_gfRMqpYD1w"
500

A server error has occurred.

post/cards/generic
Request samples
application/json
{
  • "first_name": "Edith",
  • "last_name": "Clarke",
  • "card_number": "4007589999999912",
  • "expiration_year": "2027",
  • "expiration_month": "02",
  • "cvv": "123",
  • "address_line_one": "123 Kebly Street",
  • "address_line_two": "Unit C",
  • "address_city": "Fort Lee",
  • "address_state": "NJ",
  • "address_zip_code": "07237",
  • "address_country": "US"
}
Response samples
application/json
{
  • "token": "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.ZR3Eq5MAuS_03RopT9QWK1MUiFFIOoZoDgwkiDWzz-7S6Zeda0JdvzwI51lHxuvi6EFdXLi7-1thIpPt49JMiLtzZgcf7UCJrVOZTf88JhIL5X5rvmnpO2NADfR9PVzrSV2AwxLCRy6vRfgCHGJZy1o5AZzwaaMLCRzqb3vdCaXn9gKvGPmvHKg9PkR-Zrfs9XDsRHeCVtfvu8PBzMNO5r_Dfo-fo3l3cyV4pKFtbvjlJXm--Ko5XiJPxffnBofmlYabXHku5yuo6IsVTnd9ETksMu1tnfr4T9AC14fiZew0FJetIayf_-kmiR1t7_aU3Q_A8Uwy7kTmxrFTvu6Cgw.yT7WptQfjKXswG_N.DY77q22ZGV5efeh6LNI6bWRmhZikY0dLAyIDVrK7nite1B7T_4IL9XdM7Luf9BOpXHTscu9y6Zqun-687bclLnzOYB7nNpV_DZM-5stWz2MuQeLiokqTfrF5jfXtpLDaDEiwAY9HHTBrKoD91Wkp5aX1CsB4jFBTfFDES0BQbTrRXqLTMIItZqKFbh5btqFCskfl7JKtozo3UgMNj__HnNiF5GUN-QgiOrYZKn7d2hXPpUABPmYGFkpXSXTnnCRGTVoZHoyh5L-4Apr8yVRUxUX1rrMFjOurr8VqmQPg-9-2Z7zxmwp5joms19JdgV2FhgJnbKilwFY4IQrYbhfLdfuApH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