Introduction

This guide covers the integration path for card-only payments. Please ensure you have completed the Secure Debit integration guide first, then return here to enable card-only processing via Push.

Step 1: Cashier Button

Button Label and Type

Please display a separate button on your cashier for users to select card-only processing. The button should be labeled “Credit” and be branded using the design guidelines for the operator’s webpage.
If you have previously integrated Secure Debit, Push requires that you create a separate button for card-only payments (i.e. you should have both “Secure Debit” and “Credit” buttons in your cashier).

Display user credentials

Display the last 4 of the user’s card on the button. Call get-user and parse the response for card_only_credentials
{
  "id": "user_28CJjV7P4Go5PNJvfzghiD",
  "card_only_credentials": [
    {
      "primary_account_number_mask": "5999"
    }
  ],
  ... other fields omitted for brevity
}
If the user has not been previously registered with Push, you must register them. Call create-user and store the user ID in your database. Users registered for Secure Debit processing can be re-used for card-only processing.

Step 2: Display Push User Widget

Generate the widget URL. Make a request to create-user-widget-url with "type": "card_only"
curl --request POST \
	--url https://sandbox.pushcash.com/user/user_lVpbPL0K1XIiHx0DxipRbD/url \
 	--header 'Authorization: Bearer '$PUSH_API_KEY \
	--data '{
        "type": "card_only"
	}'
Return the URL in the response to your frontend.
{
   "url": "https://cdn.pushcash.com/widget/?param=1&param=2"
}
Follow the steps in Render Push User Widget and, after the user has filled in their card details, Generate the token.

Step 3: Submit payment

Submit the user’s payment for processing. Make a request to authorize-payment with the amount and token.
curl --request POST \
	--url https://sandbox.pushcash.com/authorize \
 	--header 'Authorization: Bearer '$PUSH_API_KEY \
	--data '{
           "amount": 1000,
           "currency": "USD",
           "token": "token_3r09eejo3r32rjoj3r23r3"
       }'
Handle the result from the authorization call. Parse the response for HTTP status code and payment ID
  • If status code is 200, the payment has been approved
  • If status code is 401, the payment was declined
Example authorization response
{
  "id": "intent_production_mbDRHFi3dxIZEtykHsgUGC",
  ...
}