POST
/
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",
  "display_loyalty": false
}'
{
  "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

Body

application/json
direction
enum<string>
required

Direction of the money flow, from the perspective of the Push Account

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>

How the intent should be approved and submitted for processing

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.

display_loyalty
boolean

Shows loyalty opt-in screen if set to true

Response

200
application/json
Successful operation
url
string
required

The URL for the payment session