How to Use Visa Pay

Learn how to set up the main Visa Pay API processes for adding cards, approving transactions, and managing tokens.

This section gives you a simple overview of the steps you need to access the APIs and make calls to Visa Pay.

Visa Pay API operates through four essential processes that handle authentication, account management, credential oversight, and payment processing.

  • API Authentication
  • Signing up new Visa Pay accounts
  • Managing enrolled Visa Pay Credentials throughout their lifetime
  • Authorization handling for payment processing

Authentication Workflows

Option 1: Basic Authentication (Sandbox)

  1. Create access keys in the Control Center and save the server key and server secret.
  2. Send a POST request to /v2/s2s/access-token with your server login information.
  3. Save the access token and refresh token securely.
  4. Use the access token for verified requests to Visa Pay API endpoints.

Option 2: OpenID Authentication (Production)

  1. Create a JWT token signed by your client login information.
  2. Send a POST request to /v1/oauth2/token with your JWT in the request body.
  3. Get the access token, refresh token, and expiration time from the response.
  4. Include the access token in the Authorization header for future API calls.

Enrollment Workflow

  1. Prepare sign-up data including program ID, wallet information, and token requests.
  2. Send POST request to /v1/enroll with sign-up information.
  3. Save the returned sign-up ID for future use.
  4. Check sign-up status using GET /v1/enrollments/{externalId} endpoint.

Token Management Workflow

  1. Find tokens that need status updates (block, unblock, cancel).
  2. Send PATCH request to /v1/enrollments/{externalId}/tokens/{token_id}/status.
  3. Check that the token status changed in the response.

Transaction Approval (Webhook) Workflow

  1. Give a Webhook URL that Pismo will call for each approval API request.
  2. If certificate-based authentication is needed, share public key with Visa Pay.
  3. Set up required processing for MTI codes and available Response codes.
  4. Test approval using /v1/simulate.
  5. Parse the JWT to verify and approve the request.
  6. Process approval response and handle accept or decline situations.

 

Post Process Considerations

What successful implementation gives you: 
  • Easy card sign-up experience.
  • Real-time transaction processing abilities.
  • Complete token lifecycle management.
  • Secure payment approval.
After implementing core workflows: 
  • Add complete error handling.
  • Set up transaction monitoring and logging.
  • Test all processes in the sandbox environment.
  • Get ready for production deployment.