Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Step 1.
curl "https://apigateway.payfirma.com/customer-service/customer" 
--request POST  
--header "Content-Type: application/json"       
--header "Authorization: Bearer {BEARER_TOKEN}"      
--data "{  
         "email": "brandon@stark.com",  
         "first_name": "Brandon",  
         "last_name": "Stark",  
         "company": "Payfirma",  
         "bcc_emails": "john.snow@stark.com",  
         "telephone": "1234567891",  
         "address1": "No. 1 Road",  
         "address2": "Street 2",  
         "city": "Vancouver",  
         "province": "BC",  
         "country": "Canada",  
         "postal_code": "V6E 1B2", 
         "custom_id": "Internal456"}"
Step 2. 
curl "https://apigateway.payfirma.com/customer-service/customer/{CUSTOMER_LOOKUP_ID/card/"
--request POST  
--header "Content-Type: application/json"  
--header "Authorization: Bearer {BEARER_TOKEN}"
 
--data '{
  
    "card_expiry_month": 11,
       "card_expiry_year": 16,
       "card_number": "4111111111111111",
       "cvv2": "595",
       "is_default": true,
       "card_description": 
       "test card"
}'

Making a payment on a stored card

...

Code Block
Step 1.
curl " https://apigateway.payfirma.com/plan-service/plan/"
--request POST      
--header "Content-Type: application/json"     
--header "Authorization: Bearer {BEARER_TOKEN}"      
--data "'{
 {   "name": "Sample Daily Plan",
    "amount": 10.99,
    "currency": "CAD",
    "frequency": "DAILY",
    "number_of_payments": 10,
    "send_receipt": false
}'

}"
Step 3. 
curl " https://apigateway.payfirma.com/customer-service/customer/{CUSTOMER_LOOKUP_ID}/subscription "
--request POST      
--header "Content-Type: application/json"   
--data '{
{  "plan_lookup_id": "{PLAN_LOOKUP_ID}",
  "card_lookup_id": "{CARD_LOOKUP_ID}",
  "amount": 10.99,
  "start_date": 1467760023000,
  "email": "brandon@stark.com",
  "description": "My test subscription"
}'

Reporting

Transaction reporting can be accessed through the PayHQ web application or through the PayHQ API.

...

merchants using your application.

Sandbox Environment:

Create a Sandbox Account:

To create a sandbox account for testing, kindly proceed by completing the form accessible through the following link: Sandbox PayHQ Select "Request one today!" during the process.

...

https://sandbox-xxxx.payfirma.com, which will start pointing to the sandbox environment.

Test Processor:

The Test Processor is a simulated processor designed for testing purposes, featuring placeholder processing logic. Specific outcomes are triggered based on the following conditions:

  1. All transactions with an odd amount (digits before decimals) will be approved.

  2. All transactions with an even amount (digits before decimals) will be declined.

  3. Refunds exceeding the actual sale amount will be declined.

  4. Captures with an even amount will also be declined.

Special Cases:

  • $2.10 will result in a decline with the reason "Failed to tokenize card information."

  • $2.20 will result in a decline with the reason "Email is required."

  • $2.30 will result in a decline with the reason "Missing mandatory card information field(s) in the request."

  • $2.40 will result in a decline with the reason "Transaction Not Supported."

  • $2.50 will result in a decline with the reason "Failed to de-tokenize card information."

  • $2.60 will result in a decline with the reason "Failed to authorize."

Important info:

...