Skip to main content
POST
/
intent
Create intent
curl --request POST \
  --url https://api.pushcash.com/intent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "direction": "cash_in",
  "user_id": "user_28CJjV7P4Go5PNJvfzghiD",
  "account_id": "account_28CJjV7P4Go5PNJvfzghiD",
  "amount": 1450,
  "currency": "USD"
}'
{
  "id": "intent_sandbox_dMggQ93ZYH6DH9LBhVeijE",
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

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

Headers

X-Idempotency-Key
string

Setting the idempotency key header to a unique value for each request ensures that transactions are never duplicated. Push recommends storing your internal transaction identifier in this field.

Maximum length: 255
Example:

"f1bbb85"

Body

application/json
user_id
string
required

Push's unique identifier for the user

redirect_url
string

The url to which the user will be redirected after completing the payment session.

If this parameter is omitted, the UX will use postMessage to notify the wrapping browser that the payment session has been completed.

webhook_url
string

The url to which Push will deliver webhooks for the payment intent. See our Webhooks Guide for details on what webhooks will be delivered.

approval_mode
enum<string>

Enable manual review of payouts or redemptions through this parameter. See Manual Review for details.

Available options:
automatic,
manual
direction
enum<string>

Direction of the payment.

  • Submit cash_in for deposits or purchases
  • Submit cash_out for withdrawals or redemptions
Available options:
cash_in,
cash_out
account_id
string

The settlement account which should be used for the transaction. If your program with Push utilizes multiple settlement accounts, this field is required to be set.

amount
integer

Amount for the transaction, in smallest unit of specified currency (ie if currency is USD, the unit would be cents)

currency
enum<string>

Currency associated with the amount

Available options:
USD
token
string

The token ID. When supplied, amount, direction, and currency fields are not in the intent creation request.

Example:

"token_abc123def456"

Response

Successful operation

id
string
required

The payment intent ID

Example:

"intent_sandbox_dMggQ93ZYH6DH9LBhVeijE"

url
string

The URL for the payment session