Skip to main content
POST
/
user
/
{id}
/
credential
Create credential
curl --request POST \
  --url https://api.pushcash.com/user/{id}/credential \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "token": "token_mbDRHFi3dxIZEtykHsgUGC"
}
'
{
  "id": "cred_9AmC1KkUn0WabPyPUdHclX",
  "created_at": "2023-05-26T14:35:45.456Z",
  "card_last4": "4444",
  "authenticated": true,
  "type": "card_only_debit",
  "account_last4": null,
  "bank_name": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The push identifier for the user

Example:

"user_28CJjV7P4Go5PNJvfzghiD"

Body

application/json
token
string
required

The token generated by the Push Cash SDK's tokenize method.

Example:

"token_mbDRHFi3dxIZEtykHsgUGC"

Response

Credential created successfully

id
string
required

The unique identifier assigned by Push

created_at
string<date-time>
required

When the payment credential was created (ISO 8061 date string)

card_last4
string
required

The last 4 digits of the card number

authenticated
boolean
required

For secure_debit credentials, whether the user has authenticated with the bank.

type
enum<string>
required

The type of payment credential:

  • secure_debit: A debit card which can be used for withdrawals and deposits
  • card_only_credit: A credit card which can be used for deposits alone
  • card_only_debit: A debit card which can be used for deposits alone
Available options:
secure_debit,
card_only_credit,
card_only_debit
account_last4
string | null
required

For authenticated secure_debit credentials, the last 4 digits of the bank account number for the user's account. This field is null otherwise.

bank_name
string | null
required

For secure_debit credentials, the name of the user's bank. This field is null otherwise.