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
direction
enum<string>
required

Direction of the payment.

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

Push's unique identifier for the user

amount
integer
required

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

currency
enum<string>
required

Currency associated with the amount

Available options:
USD
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
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.

type
enum<string>

The payment flow type for the intent

Available options:
bank_transfer

Response

Successful operation

id
string
required

The payment intent ID

Example:

"intent_sandbox_dMggQ93ZYH6DH9LBhVeijE"

url
string
required

The URL for the payment session