=== get account attributes ===
Method: GET
Endpoint: /avs/get-account-attributes/:token
Content-Type: application/json
Description: Use this API to get account attributes.
URL PARAMETERS:
- token (string) - required
Token received by "get token"
SUCCESSFUL RESPONSE:
- id: Upon a successful call, this will return an array with account attributes.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/avs/get-account-attributes/:token \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{
"Card": {
"Id": "ee23f797-faa1-40bf-9821-08d7d7481deb",
"has_employer_income": "YES",
"has_employment_insurance_income": "YES",
"is_employment_insurance_income_new": "NO",
"has_employment_insurance_in_last_1_days": "NO",
"has_employment_insurance_in_last_7_days": "YES",
"has_employment_insurance_in_last_14_days": "YES",
"has_employment_insurance_in_last_30_days": "YES",
"has_employer_income_in_last_1_days": "YES",
"has_employer_income_in_last_7_days": "YES",
"has_employer_income_in_last_14_days": "YES",
"has_employer_income_in_last_30_days": "YES",
"has_government_income_in_last_1_days": "YES",
"has_government_income_in_last_7_days": "YES",
"has_government_income_in_last_14_days": "YES",
"has_government_income_in_last_30_days": "YES",
"employer_name": "Flinks Technologies",
"employer_income_frequency": "Unknown",
"micro_lender_name": "NONE_DETECTED",
"micro_loan_payment_frequency": "Unknown",
"sum_utility_payments_2_months_ago": 750,
"sum_utility_payments_3_months_ago": 750,
"sum_utility_payments_4_months_ago": 750,
"sum_utility_payments_5_months_ago": 750,
"sum_utility_payments_6_months_ago": 750,
"sum_utility_payments_7_months_ago": 750,
"sum_utility_payments_8_months_ago": 750,
"sum_utility_payments_9_months_ago": 750,
"sum_utility_payments_10_months_ago": 750,
"sum_utility_payments_11_months_ago": 750,
"sum_utility_payments_12_months_ago": 1000,
"sum_telecom_payments_current_month": 250,
"sum_telecom_payments_previous_month": 750,
"sum_telecom_payments_2_months_ago": 750,
"sum_telecom_payments_3_months_ago": 750,
"sum_telecom_payments_4_months_ago": 750,
"sum_telecom_payments_5_months_ago": 750,
"sum_telecom_payments_6_months_ago": 750,
"sum_telecom_payments_7_months_ago": 750,
"sum_telecom_payments_8_months_ago": 750,
"sum_telecom_payments_9_months_ago": 750,
"sum_telecom_payments_10_months_ago": 750,
"sum_telecom_payments_11_months_ago": 750,
"sum_telecom_payments_12_months_ago": 1000,
"sum_mortgage_payments_current_month": 500,
"sum_mortgage_payments_previous_month": 1500,
"sum_mortgage_payments_2_months_ago": 1500,
"sum_mortgage_payments_3_months_ago": 1500,
"sum_mortgage_payments_4_months_ago": 1500,
"sum_mortgage_payments_5_months_ago": 1500,
"sum_mortgage_payments_6_months_ago": 1500,
"sum_mortgage_payments_7_months_ago": 1500,
"sum_mortgage_payments_8_months_ago": 1500,
"sum_mortgage_payments_9_months_ago": 1500,
"sum_mortgage_payments_10_months_ago": 1500,
"sum_mortgage_payments_11_months_ago": 1500,
"sum_mortgage_payments_12_months_ago": 2000,
"sum_auto_loan_payments_current_month": 500,
"sum_auto_loan_payments_previous_month": 1500,
"sum_auto_loan_payments_2_months_ago": 1500,
"sum_auto_loan_payments_3_months_ago": 1500,
"sum_auto_loan_payments_4_months_ago": 1500,
"sum_auto_loan_payments_5_months_ago": 1500,
"sum_auto_loan_payments_6_months_ago": 1500,
"sum_auto_loan_payments_7_months_ago": 1500,
"sum_auto_loan_payments_8_months_ago": 1500,
"sum_auto_loan_payments_9_months_ago": 1500,
"sum_auto_loan_payments_10_months_ago": 1500,
"sum_auto_loan_payments_11_months_ago": 1500,
"sum_auto_loan_payments_12_months_ago": 2000,
"sum_insurance_payments_90_days": 400,
"sum_insurance_payments_180_days": 850,
"sum_insurance_payments_365_days": 1800,
"sum_auto_loan_payments_90_days": 4000,
"sum_auto_loan_payments_180_days": 8500,
"sum_auto_loan_payments_365_days": 18000,
"sum_total_debits_current_month": 1950,
"sum_total_debits_previous_month": 5850,
"sum_total_debits_2_months_ago": 5850,
"sum_total_debits_3_months_ago": 5850,
"sum_total_debits_4_months_ago": 5850,
"sum_total_debits_5_months_ago": 5850,
"sum_total_debits_6_months_ago": 5850,
"sum_total_debits_7_months_ago": 5850,
"sum_total_debits_8_months_ago": 5850,
"sum_total_debits_9_months_ago": 5850,
"sum_total_debits_10_months_ago": 5850,
"sum_total_debits_11_months_ago": 5850,
"sum_total_debits_12_months_ago": 7800,
"sum_total_debits_90_days": 15600,
"sum_total_debits_180_days": 33150,
"sum_total_debits_365_days": 70200,
"sum_total_credits_90_days": 35600,
"sum_total_credits_180_days": 75650,
"sum_total_credits_365_days": 160200,
"sum_transfers_in_90_days": 1600,
"sum_transfers_out_and_cash_withdrawals_90_days": 3200,
"sum_other_loan_payments": 0,
"average_monthly_other_loan_payments": 0,
"average_monthly_other_loan_payments_complex": 0,
"sum_insurance_payments": 1950,
"average_monthly_insurance_payments": 151.16,
"average_monthly_insurance_payments_complex": 154.17,
"sum_telecom_payments": 9750,
"average_monthly_telecom_payments": 755.81,
"average_monthly_telecom_payments_complex": 770.83,
"sum_telecom_payments_30_days": 500,
"sum_telecom_payments_60_days": 1250,
"sum_telecom_payments_90_days": 2000,
"sum_telecom_payments_180_days": 4250,
"sum_telecom_payments_365_days": 9000,
"sum_total_income_6_months": 72250,
"sum_total_income": 165750,
"average_monthly_total_income": 12848.84,
"average_monthly_total_income_complex": 13104.17,
"average_monthly_free_cash_flow": 7558.14,
"sum_utility_payments": 9750,
"average_monthly_utility_payments": 755.81,
"average_monthly_utility_payments_complex": 770.83,
"sum_utility_payments_30_days": 500,
"sum_utility_payments_60_days": 1250,
"sum_utility_payments_90_days": 2000,
"sum_utility_payments_180_days": 4250,
"sum_utility_payments_365_days": 9000,
"unusual_recent_credit_activity": 0.66,
"credit_activity_trend_simple": "DECREASING",
"unusual_recent_debit_activity": 0.66,
"debit_activity_trend_simple": "DECREASING",
"unusual_recent_activity": 0.66,
"overall_activity_trend_simple": "DECREASING",
"count_active_days": 71,
"count_active_days_30_days": 4,
"average_monthly_active_days": 5.5,
"active_days_trend": 0.73,
"active_days_trend_simple": "DECREASING",
"count_stop_payment_reversals_30_days": 0,
"count_stop_payment_reversals_60_days": 0,
"count_stop_payment_reversals_90_days": 0,
"average_closing_balance_day_of_employer_income": 18515.38,
"average_closing_balance_day_after_employer_income": 18743.59,
"average_closing_balance_day_of_income": 19390.14,
"average_closing_balance_day_after_income": 20712.68,
"sum_total_income_current_month": 4250,
"sum_total_income_previous_month": 12750,
"sum_total_income_2_months_ago": 12750,
"sum_total_income_3_months_ago": 12750,
"sum_total_income_4_months_ago": 12750,
"sum_total_income_5_months_ago": 12750,
"sum_total_income_6_months_ago": 12750,
"sum_total_income_7_months_ago": 12750,
"sum_total_income_8_months_ago": 12750,
"sum_total_income_9_months_ago": 12750,
"sum_total_income_10_months_ago": 12750,
"sum_total_income_11_months_ago": 12750,
"sum_total_income_12_months_ago": 17000,
"sum_total_income_90_days": 34000,
"sum_total_income_180_days": 72250,
"sum_total_income_365_days": 153000,
"sum_insurance_income_90_days": 800,
"sum_insurance_income_180_days": 1700,
"sum_insurance_income_365_days": 3600,
"sum_child_support_income_non_government_90_days": 800,
"sum_child_support_income_non_government_180_days": 1700,
"sum_child_support_income_non_government_365_days": 3600,
"sum_child_support_income_government_90_days": 4800,
"sum_child_support_income_government_180_days": 10200,
"sum_child_support_income_government_365_days": 21600,
"sum_other_income_180_days": 8500,
"sum_other_income_365_days": 18000,
"sum_utility_payments_current_month": 250,
"sum_utility_payments_previous_month": 750,
"sum_loan_deposits_90_days": 0,
"sum_loan_payments": 39000,
"average_monthly_loan_payments": 3023.26,
"average_monthly_loan_payments_complex": 3083.33,
"count_loan_payments_30_days": 4,
"count_loan_payments_60_days": 10,
"count_loan_payments_90_days": 16,
"sum_loan_payments_30_days": 2000,
"sum_loan_payments_60_days": 5000,
"sum_loan_payments_90_days": 8000,
"count_micro_loan_deposits_30_days": 0,
"count_micro_loan_deposits_60_days": 0,
"count_micro_loan_deposits_90_days": 0,
"sum_micro_loan_deposits_30_days": 0,
"sum_micro_loan_deposits_60_days": 0,
"sum_micro_loan_deposits_90_days": 0,
"average_micro_loan_payment": 0,
"average_loan_payment": 500,
"sum_micro_loan_payments": 0,
"average_monthly_micro_loan_payments": 0,
"average_monthly_micro_loan_payments_complex": 0,
"count_micro_loan_payments_30_days": 0,
"count_micro_loan_payments_60_days": 0,
"count_micro_loan_payments_90_days": 0,
"sum_micro_loan_payments_30_days": 0,
"sum_micro_loan_payments_60_days": 0,
"sum_micro_loan_payments_90_days": 0,
"sum_mortgage_payments": 19500,
"average_monthly_mortgage_payments": 1511.63,
"average_monthly_mortgage_payments_complex": 1541.67,
"count_mortgage_payments_30_days": 2,
"count_mortgage_payments_60_days": 5,
"count_mortgage_payments_90_days": 8,
"sum_mortgage_payments_30_days": 1000,
"sum_mortgage_payments_60_days": 2500,
"sum_mortgage_payments_90_days": 4000,
"sum_mortgage_payments_180_days": 8500,
"sum_mortgage_payments_365_days": 18000,
"sum_mortgage_payments_6_months": 8500,
"sum_non_employer_income_total": 68250,
"average_monthly_non_employer_income": 5290.7,
"average_monthly_non_employer_income_complex": 5395.83,
"sum_non_employer_income_30_days": 3500,
"sum_non_employer_income_60_days": 8750,
"sum_non_employer_income_90_days": 14000,
"non_employer_income_trend": 0.66,
"non_employer_income_trend_simple": "DECREASING",
"count_nsf": 0,
"average_monthly_nsf_fees_count": 0,
"average_monthly_nsf_fees_count_complex": 0,
"count_nsf_30_days": 0,
"count_nsf_60_days": 0,
"count_nsf_90_days": 0,
"count_nsf_6_months": 0,
"sum_nsf_30_days": 0,
"sum_nsf_60_days": 0,
"sum_nsf_90_days": 0,
"sum_nsf_fees": 0,
"count_stop_payment_30_days": 0,
"count_stop_payment_60_days": 0,
"count_stop_payment_90_days": 0,
"sum_stop_payment_30_days": 0,
"sum_stop_payment_60_days": 0,
"sum_stop_payment_90_days": 0,
"sum_student_loan_payments": 0,
"average_monthly_student_loan_payments": 0,
"average_monthly_student_loan_payments_complex": 0,
"sum_auto_loan_payments": 19500,
"average_monthly_auto_loan_payments": 1511.63,
"average_monthly_auto_loan_payments_complex": 1541.67,
"sum_employer_income_6_months_ago": 7500,
"sum_employer_income_7_months_ago": 7500,
"sum_employer_income_8_months_ago": 7500,
"sum_employer_income_9_months_ago": 7500,
"sum_employer_income_10_months_ago": 7500,
"sum_employer_income_11_months_ago": 7500,
"sum_employer_income_12_months_ago": 10000,
"count_employer_income_current_month": 1,
"count_employer_income_previous_month": 3,
"count_employer_income_2_months_ago": 3,
"count_employer_income_3_months_ago": 3,
"count_employer_income_4_months_ago": 3,
"count_employer_income_5_months_ago": 3,
"count_employer_income_6_months_ago": 3,
"count_employer_income_7_months_ago": 3,
"count_employer_income_8_months_ago": 3,
"count_employer_income_9_months_ago": 3,
"count_employer_income_10_months_ago": 3,
"count_employer_income_11_months_ago": 3,
"count_employer_income_12_months_ago": 4,
"average_government_income_deposit": 193.75,
"sum_government_income_total": 60450,
"average_monthly_government_income": 4686.05,
"average_monthly_government_income_complex": 4779.17,
"sum_government_income_30_days": 3100,
"sum_government_income_60_days": 7750,
"sum_government_income_90_days": 12400,
"sum_government_income_180_days": 26350,
"sum_government_income_365_days": 55800,
"count_government_income_current_month": 8,
"count_government_income_previous_month": 24,
"count_government_income_2_months_ago": 24,
"count_government_income_3_months_ago": 24,
"count_government_income_4_months_ago": 24,
"count_government_income_5_months_ago": 24,
"count_government_income_6_months_ago": 24,
"count_government_income_7_months_ago": 24,
"count_government_income_8_months_ago": 24,
"count_government_income_9_months_ago": 24,
"count_government_income_10_months_ago": 24,
"count_government_income_11_months_ago": 24,
"count_government_income_12_months_ago": 32,
"sum_government_income_current_month": 1550,
"sum_government_income_previous_month": 4650,
"sum_government_income_2_months_ago": 4650,
"sum_government_income_3_months_ago": 4650,
"sum_government_income_4_months_ago": 4650,
"sum_government_income_5_months_ago": 4650,
"sum_government_income_6_months_ago": 4650,
"sum_government_income_7_months_ago": 4650,
"sum_government_income_8_months_ago": 4650,
"sum_government_income_9_months_ago": 4650,
"sum_government_income_10_months_ago": 4650,
"sum_government_income_11_months_ago": 4650,
"sum_government_income_12_months_ago": 6200,
"sum_pension_income_90_days": 800,
"sum_pension_income_180_days": 1700,
"sum_pension_income_365_days": 3600,
"sum_wsib_income_90_days": 800,
"sum_wsib_income_180_days": 1700,
"sum_wsib_income_365_days": 3600,
"sum_employment_insurance_income_90_days": 400,
"sum_employment_insurance_income_180_days": 850,
"sum_employment_insurance_income_365_days": 1800,
"sum_social_assistance_income_90_days": 800,
"sum_social_assistance_income_180_days": 1700,
"sum_social_assistance_income_365_days": 3600,
"sum_other_income_90_days": 4000,
"sum_overdraft_fees": 0,
"sum_bank_fees": 0,
"sum_loan_deposits": 0,
"average_monthly_loan_deposits": 0,
"average_monthly_loan_deposits_complex": 0,
"sum_loan_deposits_30_days": 0,
"sum_loan_deposits_60_days": 0,
"account_age_days": 387,
"account_age": 12,
"balance_current": 104100,
"balance_trend": 1.17,
"balance_trend_simple": "INCREASING",
"balance_90_days_ago": 84100,
"balance_min": 72100,
"balance_max": 104100,
"nbr_nsf": 0,
"nbr_overdraft": 0,
"has_overdraft": false,
"deposits_total": 35600,
"account_age_90_days": 82,
"count_days_negative_balance_90_days": 0,
"sum_credits_total": 173550,
"sum_credits_30_days": 8900,
"average_monthly_credit": 13453.49,
"total_deposits_trend": 0.66,
"total_deposits_trend_simple": "DECREASING",
"average_daily_credits": 448.45,
"average_daily_credits_30_days": 296.67,
"avg_monthly_deposit": 13024.39,
"total_credits_30_days": 8900,
"sum_total_credits_current_month": 4450,
"sum_total_credits_previous_month": 13350,
"sum_total_credits_2_months_ago": 13350,
"sum_total_credits_3_months_ago": 13350,
"sum_total_credits_4_months_ago": 13350,
"sum_total_credits_5_months_ago": 13350,
"sum_total_credits_6_months_ago": 13350,
"sum_total_credits_7_months_ago": 13350,
"sum_total_credits_8_months_ago": 13350,
"sum_total_credits_9_months_ago": 13350,
"sum_total_credits_10_months_ago": 13350,
"sum_total_credits_11_months_ago": 13350,
"sum_total_credits_12_months_ago": 17800,
"sum_debits_30_days": 3900,
"sum_debits_90_days": 15600,
"total_debits_30_days": 3900,
"sum_debits_total": 76050,
"average_monthly_debit": 5895.35,
"average_monthly_recurring_payments": 1511.62,
"average_monthly_recurring_payments_complex": 1541.66,
"average_daily_debits": 196.51,
"average_daily_debits_30_days": 130,
"sum_disability_30_days": 200,
"sum_disability_60_days": 500,
"sum_disability_90_days": 800,
"sum_disability_180_days": 1700,
"sum_disability_365_days": 3600,
"sum_disability_income_90_days": 800,
"average_employer_income_deposit": 2500,
"sum_employer_income": 97500,
"average_monthly_employer_income": 7558.14,
"average_monthly_employer_income_complex": 7708.33,
"count_employer_income_30_days": 2,
"count_employer_income_60_days": 5,
"count_employer_income_90_days": 8,
"sum_employer_income_30_days": 5000,
"sum_employer_income_60_days": 12500,
"sum_employer_income_90_days": 20000,
"sum_employer_income_180_days": 42500,
"sum_employer_income_365_days": 90000,
"employer_income_30_days_to_average": 0.66,
"employer_income_30_days_to_average_complex": 7708.33,
"employer_income_trend_simple": "DECREASING",
"sum_employer_income_current_month": 2500,
"sum_employer_income_previous_month": 7500,
"sum_employer_income_2_months_ago": 7500,
"sum_employer_income_3_months_ago": 7500,
"sum_employer_income_4_months_ago": 7500,
"sum_employer_income_5_months_ago": 7500,
"nbr_deposits_over500": 8,
"nbr_withdrawals_over500": 0,
"AttributesDetail": {
"Attribute": "sum_government_income_current_month",
"Transactions": {
"TransactionId": "e0eca7c0-50db-44e1-a4f2-ed0cf2c0a062",
"AccountId": "6d5bab92-c49a-45d7-a274-20c21cf0cc31",
"Date": "2020/08/10",
"Description": "CHILD TAX BENEFIT -CANADA",
"Debit": null,
"Credit": 500
}
}
},
"Login": {
"Username": "auston_matthews",
"IsScheduledRefresh": false,
"LastRefresh": "2020-08-10T15:49:01.2437806",
"Type": "Personal",
"Id": "ee23f797-faa1-40bf-9821-08d7d7481deb"
},
"RequestId": "be887912-035a-4490-bdf5-2b3cd0efa495"
}
=== get token ===
Method: POST
Endpoint: /avs/get-token
Content-Type: application/json
Description: Use this API to get token.
REQUEST PARAMETERS:
- bankName (string) - Optional
Bank name
- accountNumber (string) - Optional
Account Number
- phone (phone) - Optional
Phone
- email (email) - Optional
Email
- expiration (int) - Optional
Specifies the validity period of the AVS Session to connect the end user's bank account. The default value is 30 days. You can set this parameter to any value between 1 and 180 days. After expiration the end user will no longer be able to go through the session and connect their bank account.
Default 30
SUCCESSFUL RESPONSE:
- id: Upon a successful call, this will return a token.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/avs/get-token \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
---data '{
"email": "test@test.com"
}'
RESPONSE EXAMPLE:
{"token":"Ij8v34a2xGznyWjBkUq5WrGLyRSNJdQBw42ZDZ6wG9Z7d5L6E80yukjwe6O9Lkjv","url":"https:\/\/accountverification.mydisbursements.com\/Ij8v34a2xGznyWjBkUq5WrGLyRSNJdQBw42ZDZ6wG9Z7d5L6E80yukjwe6O9Lkjv"}
=== get verification report ===
Method: GET
Endpoint: /avs/verification-report
Content-Type: application/json
Description: Use this API to get the report.
REQUEST PARAMETERS:
- dateFrom (date) - Optional
Default: -1 month
- dateTo (date) - Optional
Default: today
- format (string) - Optional
json or csv
Default: json
SUCCESSFUL RESPONSE:
- token: Token
- date: Date when the token was requested
- status: Pending or Completed
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/avs/verification-report \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
[
{
"id": 281,
"token": "50gAcODMZYB9z67Ii7WodrSWfvRdeOritaYQZuOdLixXydXIWQv4v00SscOSvjsZ",
"date": "2024-03-26 20:00:49",
"type": "Verification",
"status": "Completed"
},
{
"id": 283,
"token": "hpC9QkuUdp6EPXsmmbniEpaQDzI7jtzhUOAjHNEBEEdgG7wDDCFwkDhY2FjPXgfO",
"date": "2024-04-04 01:09:01",
"type": "Verification",
"status": "Completed"
},
{
"id": 284,
"token": "HQs9POwUizWETKtGN2mk29VznkbQ7T3OphZnSe9S35muGbNtkORDtCoFXdTqtXM7",
"date": "2024-04-04 13:05:31",
"type": "Verification",
"status": "Completed"
}
]
=== get verification status report ===
Method: GET
Endpoint: /avs/report
Content-Type: application/json
Description: Use this API to get the report.
REQUEST PARAMETERS:
- dateFrom (date) - Optional
Default: -1 month
- dateTo (date) - Optional
Default: today
- format (string) - Optional
json or csv
Default: json
SUCCESSFUL RESPONSE:
- token: Token
- date: Date when the token was requested
- status: Pending or Completed
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/avs/report \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{
"OSudchO7u9Gzpser9hIM0uzxUfRJMfh7XLtf64873CzEc4gdq8XZL6b5h4mSQ4Az": {
"token": "OSudchO7u9Gzpser9hIM0uzxUfRJMfh7XLtf64873CzEc4gdq8XZL6b5h4mSQ4Az",
"date": "2024-01-30 14:34:14",
"status": "Pending"
},
"xXOAtqFPrSjtuRDofYtJCM2KjUM0NUk0SMTyQaIC4j0OAuOxsczoJiHW4AdMDG8X": {
"token": "xXOAtqFPrSjtuRDofYtJCM2KjUM0NUk0SMTyQaIC4j0OAuOxsczoJiHW4AdMDG8X",
"date": "2024-01-30 15:44:10",
"status": "Completed"
}
}
=== retrieve account details ===
Method: POST
Endpoint: /avs/get-account-details
Content-Type: application/json
Description: Use this API to retrieve account details.
REQUEST PARAMETERS:
- token (string) - Required
Token received by "get token"
- daysOfTransactions (int) - Optional
Number of days that you want to see transaction data for. Either 90 or 365.
By default, the value is set to 90 days.
- withKYC (bool) - Optional
Specifies if you want to include customer information in the account details.
By default, the value is set to true.
- withTransactions (bool) - Optional
Specifies if you want to include transaction data in the account details.
By default, the value is set to false.
SUCCESSFUL RESPONSE:
While you receive the response HTTP 404 Code: NOT_FOUND, you need to keep calling this endpoint every 10 seconds for maximum of 30 minutes.
- id: Upon a successful call, this will return an array with accunt details.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/avs/get-account-details \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
---data '{
"token": "Ij8v34a2xGznyWjBkUq5WrGLyRSNJdQBw42ZDZ6wG9Z7d5L6E80yukjwe6O9Lkjv"
}'
RESPONSE EXAMPLE:
{
"account": {
"Transactions": [
{
"Date": "2023-05-29",
"Code": null,
"Description": "TrxChe@De27.06",
"Debit": 27.06,
"Credit": null,
"Balance": 49972.51,
"Id": "f5edc3a5-2084-47df-9d0c-1a0be7619446"
},
{
"Date": "2023-05-28",
"Code": null,
"Description": "TrxChe@Cr27.05",
"Debit": null,
"Credit": 27.05,
"Balance": 49999.57,
"Id": "d211940c-42d4-46d2-ad06-0816ceef2d8e"
},
{
"Date": "2023-05-27",
"Code": null,
"Description": "TrxChe@De27.04",
"Debit": 27.04,
"Credit": null,
"Balance": 49972.52,
"Id": "3543729f-1443-4874-a498-031638aa96e3"
},
{
"Date": "2023-05-26",
"Code": null,
"Description": "TrxChe@Cr27.03",
"Debit": null,
"Credit": 27.03,
"Balance": 49999.56,
"Id": "58753f22-c9a3-4f9e-b9e6-065307016be2"
}
],
"TransitNumber": "77777",
"InstitutionNumber": "777",
"OverdraftLimit": 0,
"Title": "Chequing CAD",
"AccountNumber": "1111000",
"LastFourDigits": null,
"Balance": {
"Available": 50286.04,
"Current": 49972.08,
"Limit": null
},
"Category": "Operations",
"Type": "Chequing",
"Currency": "CAD",
"Holder": {
"Name": "John Doe",
"Address": {
"CivicAddress": "1275 avenue des Canadiens-de-Montr\\u00e9al",
"City": "Montr\\u00e9al",
"Province": "QC",
"PostalCode": "H3B 5E8",
"POBox": null,
"Country": "CA"
},
"Email": "johndoe@flinks.io",
"PhoneNumber": "(514) 333-7777"
},
"Id": "cd3c3583-2f3a-4219-872c-0e9aa3eaf778",
"routingNumber": "77777"
}
}
=== create transaction ===
Method: POST
Endpoint: /pull-card/create
Content-Type: application/json
Description: Use this API to create an pull form card transaction.
REQUEST PARAMETERS:
- identityId (int) - Required
ID of the identity (received as a response from successfully adding identity)
- amount (double) - Required
Amount (monetary value) to be disbursed
- currency (string) - Defaults to the payer's country of origin.
The currency being used for the transaction. This is expressed as a three-letter currency code (ie., CAD for Canadian dollars, USD for United States dollars, etc.).
- instrumentId (string) - This is required if:
- if disbursementNumber is not defined
Provide the instrument ID. This is the ISIN and/or Common Code of the security that is the subject of the associated instruction.
- disbursementNumber (string) - This is required if:
- if instrumentId is not defined
Information inputted should be a Card or Personal Account Number (PAN) and must be 15-19 digits in length.
- expirationDate (string) - Optional
Provide card expiration date
Format: YYYY-MM
- cvc (string) - Optional
card verification code (CVC or CVV) is a 3 digit number found on card
- referenceId (string) - Required
Reference transaction ID
- authorization (int) - Optional
0 - no validation
1 - email validation
2 - sms validation
3 - sms and email validation
If true authorization is required.
Default: false
- authorizationExpiry (int) - Optional
How many hours the authorization email is valid for.
- custom1 (string) - Optional
Custom parameter
- custom2 (string) - Optional
Custom parameter
- custom3 (string) - Optional
Custom parameter
- custom4 (string) - Optional
Custom parameter
- custom5 (string) - Optional
Custom parameter
SUCCESSFUL RESPONSE:
- id: Upon a successful call, this will return a transaction ID. This is a unique reference to track the transaction and serves as proof that that transaction was created.
- referenceId: This will provide a reference ID to indicate that the request has been processed.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 400 D009: Duplicate reference ID detected
- 400 D008: Exceeded Payment Velocity Limit
- 400 D007: Duplicate transaction detected
- 400 D005: Transaction limit exceeded
- 400 D003: Daily limit exceeded
- 400 R003: Amount is higher than the limit:
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 D001: Unknown payee ID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/pull-card/create \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: nEfhWlkoABa9e7yQQk45HfDagPDL4R' \
-H 'body-hash: ' \
---data '{
"amount": 1.23,
"identityId": 3,
"currency": "CAD",
"instrumentId": "waM6wDJSieR2DvQdVjD6o8eVLJvZMB",
"referenceId": "a1234"
}'
RESPONSE EXAMPLE:
{"status":"ACCEPTED","id": "evwoxsslkl-0203-kww6gdmnyukhjfbh2stmmmum","referenceId": "evwoxsslkl-0203-kww6gdmnyukhjfbh2stmmmum"}
=== create bulk transactions ===
Method: POST
Endpoint: /pull-card/create-bulk
Content-Type: application/json
Description: Use this API to create multiple pull from card transactions at once.
REQUEST PARAMETERS:
Each transaction to be added will need to follow the parameters listed in the “Create Transactions” function. All transactions to be bulk added will need to be wrapped in an array. We’ve provided an example on the right as a sample of valid formatting.
SUCCESSFUL RESPONSE:
Upon a successful call, an array will be returned containing the following information for each transaction created:
- id: Returns a unique transaction ID that serves as a reference to track the record and serves as proof that that transaction was created.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 400 D009: Duplicate reference ID detected
- 400 D008: Exceeded Payment Velocity Limit
- 400 D007: Duplicate transaction detected
- 400 D005: Transaction limit exceeded
- 400 D003: Daily limit exceeded
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 D001: Unknown payee ID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/pull-card/create-bulk \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: nEfhWlkoABa9e7yQQk45HfDagPDL4R' \
-H 'body-hash: ' \
--data '[
{
"amount": 1.23,
"identityId": 3,
"currency": "CAD",
"instrumentId": "waM6wDJSieR2DvQdVjD6o8eVLJvZMB",
"referenceId": "a1234"
},
{
"amount": 1.24,
"identityId": 3,
"currency": "CAD",
"instrumentId": "zaM6wDJSieR2DvQdVjD6o8eVLJvZMB",
"referenceId": "a1235"
}
]'
RESPONSE EXAMPLE:
[{"status":"ACCEPTED","id":"lkmfigbojb-0198-ynlaznai4gw4ynzafbsz46vf"},{"status":"ACCEPTED","id":"uiaic0npcu-0198-phx8jcenimrb0yfhenth4lbv"}]
=== ancel transaction ===
Method: POST
Endpoint: /pull-card/cancel
Content-Type: application/json
Description: Use this API to cancel a pull from card transaction.
REQUEST PARAMETERS:
- id (string) - required
Transaction ID
- reason (string) - Optional
Description of the reason why the transaction was cancelled
SUCCESSFUL RESPONSE:
- HTTP Code: Upon a successful response, this will return 'HTTP Code: 204'.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 D001: Unknown payee ID
- 404 D004: Unknown disbursement ID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/pull-card/cancel \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: nEfhWlkoABa9e7yQQk45HfDagPDL4R' \
-H 'body-hash: ' \
---data '{
"id": "vwqjvg46za-0198-mtr3ia8w7yccdq7f6vdaqnwc",
"reason": "this is a test"
}'
RESPONSE EXAMPLE:
HTTP Code: 204
= create transaction ===
Method: POST
Endpoint: /eft-debit/create
Content-Type: application/json
Description: Use this API to create an EFT debit transaction.
REQUEST PARAMETERS:
- identityId (int) – Optional - Either identityId or (firstName, lastName, email) need to
be specified.
ID of the identity (received as a response from successfully adding identity).
- amount (double) – Required
Amount (monetary value) to be disbursed.
- businessName (string) – Required if identityId is not provided and the
payor is a business entity
Please provide business entity name.
- firstName (string) – Required if identityId is not provided and the
payor is an individual
Payor's first name.
- lastName (string) – Required if identityId is not provided and the
payor is an individual
Payor's last name.
- email (string) – Required if identityId is not provided
Payor's email address.
- program (int) – Optional
Program ID. This is a code to denote the use case for product, ie., why are you using AptPay? The use case will determine what additional information will be needed in order to process the transaction. This is represented as an integer, the values of which are listed below:
1. B2B Disbursements
2. B2C Disbursements
3. G2C / GBD Disbursements
4. Payroll and Pension Disbursements
5. Rapid Merchant Settlement
Default 2 - B2C
- descriptor (string) – Optional
Text that appears on the client’s balance statement sheet.
- ip (string) – Optional
Customer’s IP address.
- referenceId (string) – Required
Reference transaction ID.
- waiveFee (boolean) – Optional
true if you want to waive the fees.
- recurringPad (bool) – Optional
If you want to set this up as a pre-authorized debit (PAD) for future transactions, set this value to true.
Default: false.
- usePreviousAccountAgreement (bool) – Optional
If you want to renew a previous account agreement, set this value to true.
Default: true.
- verification (bool) – Optional
If you want the bank account to be verified for this transaction, set this value to true.If you have signed up for our smart EFT / ACH service, this will be applicable.
Default: false.
- embedVerification (bool) – Optional
If you want to embed verification in your application instead of via email. You will get verificationUrl back from the API.
Default: false.
- financialInstitutionNumber (string) – Required if verification=false
Please provide the bank number (three digits).
- branchTransitNumber (string) – Required if verification=false
Please provide the branch transit number (five digits).
- accountNumber (string) – Required if verification=false
Please provide the account number (5–12 digits).
- transactionExpirationDate (date) – Optional
Date when the transaction expires.
- custom1 (string) – Optional
Custom parameter.
- custom2 (string) – Optional
Custom parameter.
- custom3 (string) – Optional
Custom parameter.
- custom4 (string) – Optional
Custom parameter.
- custom5 (string) – Optional
Custom parameter.
SUCCESSFUL RESPONSE:
- id: This will provide a unique transaction ID to indicate that the transaction was created.
- status: This will return the current status of the submitted transaction.
- referenceId: This is a unique reference ID generated when the request is processed.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 D002: Not enough balance
- 400 P003: Merchant not configured
- 400 D009: Duplicate reference ID detected
- 400 D008: Exceeded Payment Velocity Limit
- 400 D007: Duplicate transaction detected
- 400 D006: Not enough payee balance for self-serve
- 400 D005: Transaction limit exceeded
- 400 D003: Daily limit exceeded
- 400 R003: Amount is higher than the limit
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 403 P005: This payee cannot do disbursements
- 404 D001: Unknown payee ID
- 404 E002: Unknown MID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/eft-debit/create \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
---data '{
"amount": 29,
"identityId": 971561290185,
"currency": "CAD",
"referenceId": "refid12342851",
"verification": false,
"financialInstitutionNumber": "003",
"branchTransitNumber": "00198",
"accountNumber": "47556"
}'
RESPONSE EXAMPLE:
{"id": "oxtfturgm2-0203-p8pnspgwssi3rmhb8fjvjuoz","status": "ACCEPTED","referenceId": "refid12342850" }
=== create bulk transactions ===
Method: POST
Endpoint: /eft-debit/bulk-create
Content-Type: application/json
Description: Use this API to create multiple EFT debit transactions at once.
REQUEST PARAMETERS:
Each transaction to be added will need to follow the parameters listed in the “Create Transactions” function. All transactions to be bulk added will need to be wrapped in an array. We’ve provided an example on the right as a sample of valid formatting.
SUCCESSFUL RESPONSE:
Upon a successful call, the response will return an object that contains the transaction ID of each record added with the following information:
- status: Message describing the status of the transaction
Upon a successful call, the response will return an array that contains the transaction ID of each record added. Each record will either have “ACCEPTED” listed next to the ID if the information was processed successfully, or “ERROR” if the transaction failed to be added.
- id: This will return a unique transaction ID to indicate the bulk request was processed.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 D002: Not enough balance
- 400 P003: Merchant not configured
- 400 D009: Duplicate reference ID detected
- 400 D008: Exceeded Payment Velocity Limit
- 400 D007: Duplicate transaction detected
- 400 D006: Not enough payee balance for self-serve
- 400 D005: Transaction limit exceeded
- 400 D003: Daily limit exceeded
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 403 P005: This payee cannot do disbursements
- 404 D001: Unknown payee ID
- 404 E002: Unknown MID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/eft-debit/bulk-create \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
--data '[
{
"amount": 29,
"payeeId": 971561290185,
"currency": "CAD",
"referenceId": "refid12342845",
"verification": false,
"financialInstitutionNumber": "003",
"branchTransitNumber": "00198",
"accountNumber": "47556"
},
{
"amount": 24,
"payeeId": 971561290185,
"currency": "CAD",
"referenceId": "refid2742861346",
"verification": true,
"financialInstitutionNumber": "004",
"branchTransitNumber": "17902",
"accountNumber": "4755622"
}
]'
RESPONSE EXAMPLE:
[{"status": "ACCEPTED","id": "a22vmg5r7m-0203-n4nfvper6pxqhqng7khbdazc","referenceId": "refid12342845" },{ "status": "ACCEPTED","id": "9i2bifx2up-0203-eyyixpipcbbj9lvgp3ydfj4e","referenceId": "refid2742861346"}]
=== verify bank details ===
Method: POST
Endpoint: /verify-bank-details
Content-Type: application/json
Description: Use this API to check if the card is eligible to receive funds. This request requires "aptoken" to be sent.
REQUEST PARAMETERS:
- bankNumber (string) - Required
Bank Number
- branchTransitNumber (string) - Required
Branch Transit Number
SUCCESSFUL RESPONSE:
- HTTP Code: Upon a successful response, this will return 'HTTP Code: 204'.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/verify-bank-details \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
-H 'aptoken: tok_sandbox_q9jbJTLG8Ch1KubZwkwk2D' \
--data '{
"bankNumber": 223,
"branchTransitNumber": "112233"
}'
RESPONSE EXAMPLE:
HTTP 200 OK
=== create transaction ===
Method: POST
Endpoint: /request-pay/create
Content-Type: application/json
Description: Use this API to create an Request Pay transaction.
REQUEST PARAMETERS:
- identityId (int) - Either identityId or (firstName, lastName or
businessName and email) need to be specified
ID of the identity (received as a response from successfully adding identity)
- amount (double) - Required
Amount (monetary value) to be disbursed
- firstName (string) - Required if identity ID is not specified
Payor's first name
- lastName (string) - Required if identity ID is not specified and payor is an
individual
Payor's last name
- businessName (string) - Required if identity ID is not specified and payor is an
individual
Payor's business name
- email (string) - Required if identity ID is not specified and payor is a
business entity
Payor's email address
- daysToExpire (int) - Default: 30
Transaction will expire in the provided number of days.
- memo (text) - Optional
Memo
- referenceId (string) - Required
Reference transaction ID
- interacType (int) - Optional
Interac notification type
1 - Email
2 - SMS
4 - No notification
5 - Email + SMS
Default: 1
- waiveFee (boolean)
true if you want to waive the fees
- authorization (int) - Optional
0 - no validation
1 - email validation
2 - sms validation
3 - sms and email validation
If true authorization is required.
Default: 0
- authorizationExpiry (int) - Optional
How many hours the authorization email is valid for.
- custom1 (string) - Optional
Custom parameter
- custom2 (string) - Optional
Custom parameter
- custom3 (string) - Optional
Custom parameter
- custom4 (string) - Optional
Custom parameter
- custom5 (string) - Optional
Custom parameter
SUCCESSFUL RESPONSE:
- id: Upon a successful call, this will return a transaction ID. This is a unique reference to track the transaction and serves as proof that that transaction was created.
- referenceId: This will provide a reference ID to indicate that the request has been processed.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 400 D009: Duplicate reference ID detected
- 400 D008: Exceeded Payment Velocity Limit
- 400 D007: Duplicate transaction detected
- 400 D005: Transaction limit exceeded
- 400 D003: Daily limit exceeded
- 400 R003: Amount is higher than the limit
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 D001: Unknown payee ID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/request-pay/create \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
---data '{
"amount": 10.65,
"identityId": 971561290185,
"referenceId": "evwoxsslkl-0203-kww6gdmnyukhjfbh2stmmmum"
}'
RESPONSE EXAMPLE:
{"id": "evwoxsslkl-0203-kww6gdmnyukhjfbh2stmmmum","referenceId": "evwoxsslkl-0203-kww6gdmnyukhjfbh2stmmmum"}
=== create bulk transactions ===
Method: POST
Endpoint: /request-pay/bulk-create
Content-Type: application/json
Description: Use this API to create multiple Request pay transactions at once.
REQUEST PARAMETERS:
Each transaction to be added will need to follow the parameters listed in the “Create Transactions” function. All transactions to be bulk added will need to be wrapped in an array. We’ve provided an example on the right as a sample of valid formatting.
SUCCESSFUL RESPONSE:
Upon a successful call, an array will be returned containing the following information for each transaction created:
- id: Returns a unique transaction ID that serves as a reference to track the record and serves as proof that that transaction was created.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 P003: Merchant not configured
- 400 D009: Duplicate reference ID detected
- 400 D008: Exceeded Payment Velocity Limit
- 400 D007: Duplicate transaction detected
- 400 D005: Transaction limit exceeded
- 400 D003: Daily limit exceeded
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 D001: Unknown payee ID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/request-pay/bulk-create \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
--data '[
{
"amount": 1.23,
"identityId": 3,
"firstName": "First Name",
"lastName": "Last Name",
"email": "asdf@asdf.com",
"daysToExpire": 30,
"memo": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"referenceId": "refid1234"
},
{
"amount": 1.24,
"identityId": 3,
"firstName": "First Name",
"lastName": "Last Name",
"email": "asdf@asdf.com",
"daysToExpire": 30,
"memo": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"referenceId": "refid1235"
}
]'
RESPONSE EXAMPLE:
[{"status":"ACCEPTED","id":"lkmfigbojb-0198-ynlaznai4gw4ynzafbsz46vf"},{"status":"ACCEPTED","id":"uiaic0npcu-0198-phx8jcenimrb0yfhenth4lbv"}]
=== add disbursement ===
Method: POST
Endpoint: /disbursements/add
Content-Type: application/json
Description: Use this API to make transactions to a bank account via a bank debit card, EFT, ACH, RTP or prepaid card.This request requires "aptoken" to be sent.
REQUEST PARAMETERS:
- amount (double) - Required
Provide the amount to be disbursed
- transactionType (string) - Required
Provides a descriptor that expresses what kind of payment type is being processed.
CARD: Transaction being sent to a payment card (Default)
EFT: Transaction being sent to an Electronic Funds Transfer
INTERAC: Transaction being sent to INTERAC
- program (int) - Optional
Program ID. This is a code to denote the use case for product, ie., why are you using AptPay? The use case will determine what additional information will be needed in order to process the transaction. This is represented as an integer, the values of which are listed below:
1. B2B transactions
2. B2C transactions
3. G2C / GBD transactions
4. Payroll and Pension transactions
5. Rapid Merchant Settlement
Default 2 - B2C
- disbursementNumber (string) - This is required if:
- If transactionType:CARD
- if instrumentId is not defined
The input must be a valid Personal Account Number (PAN) with 15 to 19 digits or a VGS token/alias. Using a VGS token/ alias ensures PCI compliance.
- transactionExpirationDate (date) - Optional
Applies only for INTERAC/EFT DEBIT/ACH DEBIT transactions. Date when the transaction expires.
- bankNumber (string) - This is required for EFT transfers
Provide the bank number
This is a 3-digit number
- branchTransitNumber (string) - This is required for:
- EFT transfers
ABA routing number
EFT transfers: 5-digit number
- accountNumber (string) - This is required for:
- EFT transfers
Account number
EFT transfers: 5-12 digit number
- instrumentId (string) - This is required if disbursementNumber is not defined
Provide the instrument ID. This is retreived from creating an insturment
- expirationDate (string) - Optional
Provide card expiration date
Format: YYYY-MM
- postDate (string) - Optional
disbursement transaction will be processed on the specified post date
Format: YYYY-MM-DD
- identityId (int) - Required
ID of the identity (received as a response from successfully adding identity)
- interacType (int) - Optional
Interac Type:
Default: 1
1 - email
2 - sms
3 - account deposit
- descriptor (string) - Optional
Text that appears on the client's bank statement. Max 10 Characters. Only Applies to transactionType: CARD, ACH
- avs (boolean) - Optional
Enable Apt-AVS service to verify the account. It is recommended to verify on the first transaction or changes to bank account information.
- delivery (int) - Optional
Specifies the delivery method for identity verification information. Users can choose to receive this information via email, SMS, or both.
1 - Email
2 - SMS
3 - Email and SMS
Default: 3 (Email and SMS)
- nameCheck (boolean) - Optional
Verify if the provided name matches the bank account name (Exact Match).
- addressCheck (boolean) - Optional
Verify if the provided address matches the bank account addres (Exact Match).
- addressCheck (boolean) - Optional
Verify if the provided bank account matches the bank account details from the AVS connection (Exact Match).
- deviceFingerprintType (string) - Optional
A device fingerprint is software and hardware information collected from the machine used in order to verify identity. Device fingerprint type is expressed as one of the following codes: BC, IO, CB, AU
- deviceFingerprint (string) - Optional
This provides information blob for the device fingerprint.
- cashierId (string) - Optional
Cashier ID
- referenceId (string) - Required
Use this parameter to add your own unique identifying for the transaction. This attribute is for idempotency purposes.
- waiveFee (boolean) - Optional
true if you want to waive the fees
- firstName (string) - This is required for EFT if identityId is not specified.
This is a required field for individual identities.
Provide the first name for the individual (max 50 characters).
- lastName (string) - This is required for EFT if identityId is not specified.
This is a required field for individual identities.
Provide the last name for the individual (max 50 characters).
- businessName (string) - This is required for EFT if identityId is not specified.
This is required for business entities.
Provide the business entity name.
- email (email) - Optional
Identity email if identityId is not provided
- memo (text) - Optional
This memo applies only to Interac transactions and will be displayed in the email sent by Interac.
Max Length: 140 characters
- custom1 (string) - Optional
Custom parameter
- custom2 (string) - Optional
Custom parameter
- custom3 (string) - Optional
Custom parameter
- custom4 (string) - Optional
Custom parameter
- custom5 (string) - Optional
Custom parameter
SUCCESSFUL RESPONSE:
- id: This is the transaction ID of the transaction.
- status: This provides a message that describes the status of the transaction.
- referenceId: Reference transaction ID
If a transaction is successfully accepted, the "status" value returned in the API response will be "ACCEPTED". The "ACCEPTED" status indicates that the transaction has been successfully submitted to a network (Mastercard or VISA) for processing.
Once the transaction is successfully received by a network to be processed, you will receive a webhook response with a "status" value of "OK".
Once the transaction is processed and the identity receives the transaction, you will receive a webhook response with a "status" value of "SETTLED".
To view a sample webhook response, please navigate to the Disbursement function under Sample Webhook Data.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 D002: Not enough balance
- 400 P003: Merchant not configured
- 400 D012: This type of transaction is only available for payees in the following countries:
CA
- 400 D009: Duplicate reference ID detected
- 400 D008: Exceeded Payment Velocity Limit
- 400 D007: Duplicate transaction detected
- 400 D006: Not enough payee balance for self-serve
- 400 D005: Transaction limit exceeded
- 400 D003: Daily limit exceeded
- 400 D013: Card transaction not allowed
- 400 R003: Amount is higher than the limit:
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 403 P005: This payee cannot do transactions
- 404 D001: Unknown identityId
- 404 E002: Unknown MID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/disbursements/add \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
-H 'aptoken: tok_sandbox_q9jbJTLG8Ch1KubZwkwk2D' \
--data '{
"amount": "1.82",
"transactionType": "CARD",
"disbursementNumber": "2222400012373734",
"identityId": "268447217271",
"expirationDate": "2027-06",
"referenceId": "refid728475448535"
}'
RESPONSE EXAMPLE:
{"id": "20azt3pofh-0203-zf5ceok32cvy4zpt2tazdut3","status": "ACCEPTED","referenceId": "refid728475448535"}
=== add disbursement instrument ===
Method: POST
Endpoint: /disbursement-instrument/add
Content-Type: application/json
Description: Use this API to add a disbursement instrument. Adding a disbursement instrument saves bank account and card details so that the same method of payment can be used in the future without having to re-enter the details.
REQUEST PARAMETERS:
- identityId (int) – Required
Unique identifier ID (received as a response from successfully adding identity).
- default (bool) – Required
true - if the instrument should be set as default
- disbursementNumber (string) – Required
Card number to be added. Card Alias returned from VGS Collect can also be added.
- expirationDate (string) – Optional
Card expiration date
Format: YYYY-MM
- bankNumber (string) – This is required for EFT transfers
Please provide the bank number to be used with the account. This is expressed as a three-digit number.
- branchTransitNumber (string) – Required for:
EFT type
Branch transit number:
EFT type: 5-digit number
- type (int) – Optional
Type of financial instrument to be added:
(Default value is 1)
1 - Debit Card
2 - Credit Card (not supported at this time)
4 - EFT Account
8 - Email
9 - Card proxy
- email (string) – If type equals 8, this is a required field.
Please provide the email address for the instrument to be added.
- description (string) – Optional
Please provide the description for the instrument to be added.
SUCCESSFUL RESPONSE:
- status: This message describes the status of instrument addition.
The "Created" status means the instrument was successfully added.
- id: Returns the Instrument ID assigned.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 I003: Payment instrument is not valid
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 D001: Unknown payee ID
- 409 D001: Payment instrument already exists
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/disbursement-instrument/add \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
--data '{
"identityId": 971561290185,
"disbursementNumber": 5333619503715702,
"expirationDate": "2024-04"
}'
RESPONSE EXAMPLE:
{"status":"Created","id":"dvzDQMPsFbJCt5maL4wgRWqUZiRT8y"}
=== bulk add disbursement ===
Method: POST
Endpoint: /disbursements/bulk-add
Content-Type: application/json
Description: Use this API to make multiple disbursements at once. This request requires "aptoken" to be sent.
REQUEST PARAMETERS:
Each disbursement that will be added will need to follow the parameters listed in the “Add Disbursement” function. All disbursements to be bulk added will need to be wrapped in an array. We’ve provided an example on the right as a sample of valid formatting.
SUCCESSFUL RESPONSE:
Upon a successful call, the response is an object that contains the id of the bulk disbursement.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 D002: Not enough balance
- 400 P003: Merchant not configured
- 400 D009: Duplicate reference ID detected
- 400 D008: Exceeded Payment Velocity Limit
- 400 D007: Duplicate transaction detected
- 400 D006: Not enough payee balance for self-serve
- 400 D005: Transaction limit exceeded
- 400 D003: Daily limit exceeded
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 403 P005: This payee cannot do disbursements
- 404 D001: Unknown identityId
- 404 E002: Unknown MID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/disbursements/bulk-add \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
-H 'aptoken: tok_sandbox_q9jbJTLG8Ch1KubZwkwk2D' \
-data '{
"disbursements":[
{
"amount": "1",
"transactionType": "CARD",
"disbursementNumber": "2222400012373734",
"payeeId": 971561290185,
"currency": "CAD",
"expirationDate": "2027-06",
"referenceId": "refid72965234734"
},
{
"amount": "100.27",
"currency": "CAD",
"transactionType": "CARD",
"payeeID": 155042143554,
"disbursementNumber": "4761260001241117",
"expirationDate": "2025-12",
"referenceId": "10"
}
]
}'
-X POST https://devsec.aptpaydev.com/disbursements/bulk-add \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
-F disbursements=@disbursements.csv \
RESPONSE EXAMPLE:
{"id" : 251}
After the file is processed, you will receive the following webhook containing bulk disbursement details and the status “ACCEPTED” for the transactions that succeeded. On the other hand, if a transaction fails, the status “ERROR” will be returned.
{"id":251,"entity":"bulk-disbursements","status":"BULK_DISBURSEMENT_PROCESSED","details":[{"status":"ACCEPTED","id":"adn5brjo90-0198-xjrorzuidlpuymfhjeze99xl"},{"status":"ACCEPTED","id":"r9ovtgdqpk-0198-xu87cpopl6ey72z8jlrjeasx","referenceId": "refid9876543" },{"status":"ACCEPTED","id":"6h4htgh6yp-0198-l4mtxrwsunqyv0xyttdhau2w","referenceId": "refid12345678" }]}
=== cancel transaction ===
Method: PUT
Endpoint: /transactions/:id/cancel
Content-Type: application/json
Description: Use this API to request a transaction cancellation. Note that this API can only request cancellation for ACH, EFT, and Interac transactions. EFT/ACH transactions can only be cancelled prior to submission cut-off times.
URL PARAMETERS:
- id (string) - Required
This is the ID for the transaction that you wish to cancel. Please note that if the transaction is in a 'SUBMITTED' state, this API will not be able to process the cancellation request.
SUCCESSFUL RESPONSE:
On a successful request, the API will return {“status”: “CANCELLED”}. If this is for an Interac transaction, this will return {"status":"CANCELLATION_PENDING"} instead.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
REQUEST EXAMPLE:
curl \
-X PUT https://devsec.aptpaydev.com/transactions/:id/cancel \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{
"status": "CANCELLED"
}
=== check account ===
Method: POST
Endpoint: /account/check
Content-Type: application/json
Description: Use this API to check if the card is eligible to receive funds. This request requires "aptoken" to be sent.
REQUEST PARAMETERS:
- amount (double) – Required
Amount to be disbursed
- currency (string) – Required
Currency to be used. This is expressed as a three-letter currency code (ie., CAD for Canadian dollars, USD for United States Dollars, etc.)
- program (int) – Optional
Program ID. This is a code to denote the use case for product, ie., why are you using AptPay? The use case will determine what additional information will be needed in order to process the transaction. This is represented as an integer, the values of which are listed below:
1. B2B Disbursements
2. B2C Disbursements
3. G2C / GBD Disbursements
4. Payroll and Pension Disbursements
5. Rapid Merchant Settlement
Default 2 - B2C
- disbursementNumber (string) – This is required if instrumentId is not defined
Card number or account number
- instrumentId (string) – This is required if disbursementNumber is not defined
Please provide the Instrument ID
- expirationDate (string) – Required if zip is provided
Please provide the card expiration date
Format: YYYY-MM
- cvc (string) – Optional
Card security code
- zip (string) – Optional
The card account billing postal code of 5 or 9 digits, for example '63368', '633685555' or '63368-5555'
- first_name (string) – Optional
Please provide the individual's first name (max 50 characters)
- last_name (string) – Optional
Please provide the individual's last name.
- address1 (string) – Optional
Address Line 1
- address2 (string) – Optional
Address Line 2
- city (string) – Optional
City
- state (string) – Optional
State
- country (string) – Optional
Country
SUCCESSFUL RESPONSE:
- receiving: This indicates if the card is eligible to receive funds. This will return a value of either true or false.
- sending: This indicates if the card is eligible to send funds. This will return a value of either true or false.
- network: The network the transaction takes place over (example: MasterCard)
- funds_availability: The duration of time required to send funds to the Payee's account
- type: Type of card used for disbursement (ie., debit, credit, etc.)
- country: The country in which the card was issued.
- currency: The currency available on the card
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/account/check \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
-H 'aptoken: tok_sandbox_q9jbJTLG8Ch1KubZwkwk2D' \
--data '{
"amount": 1,
"disbursementNumber": "5268156128258296",
"currency": "CAD"
}'
RESPONSE EXAMPLE:
{"receiving": true,"sending": false,"network": "MASTERCARD","funds_availability": "IMMEDIATE","type": "DEBIT","country": "CAN","currency": "CAD"}
=== get list of disbursement instruments ===
Method: GET
Endpoint: /disbursement-instrument/list/:ID
Content-Type: application/json
Description: Use this API to retrieve a list of all the disbursement instruments belonging to an identity.
URL PARAMETERS:
- id (int) - Required
Unique identifier ID assigned after successfully adding identity.
SUCCESSFUL RESPONSE:
Upon a successful call, the following properties will be returned for each disbursement instrument:
- instrumentID: Unique database identifier
- disbursementNumber: Card or bank account number
- expirationDate: Card expiry date (will be returned only if the instrument type is a card)
- bankNumber: This is a three-digit bank number that will be returned only if the instrument type provided is NOT a card.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 D001: Unknown payee ID
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/disbursement-instrument/list/:ID \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{ "nVG8fwuKmuMEKa5VXYEIDIvfiUjtLD": {
"id": "nVG8fwuKmuMEKa5VXYEIDIvfiUjtLD",
"disbursementNumber": "222240xxxxxx3734",
"expirationDate": "2024-04",
"bankNumber": "003",
"type": 1,
"description" : "sample description",
"default" : false
},
"xQ5UkMFMIueS3SUoRiW4THujWcQoSa": {
"id": "xQ5UkMFMIueS3SUoRiW4THujWcQoSa",
"disbursementNumber": "222240xxxxxx3734",
"expirationDate": "2024-02",
"bankNumber": "",
"type": 1,
"description" : "sample description",
"default" : true
},
"GbS8DUhu2YZEJF97bzVdCELZ6AMJkS": {
"id": "GbS8DUhu2YZEJF97bzVdCELZ6AMJkS",
"disbursementNumber": "411111xxxxxx1111",
"expirationDate": "2025-02",
"bankNumber": "",
"type": 1,
"description" : "sample description",
"default" : false
}
}
=== verify bank details ===
Method: POST
Endpoint: /verify-bank-details
Content-Type: application/json
Description: Use this API to check if the card is eligible to receive funds.
REQUEST PARAMETERS:
- bankNumber (string) - Required
Bank Number
- branchTransitNumber (string) - Required
Branch Transit Number
SUCCESSFUL RESPONSE:
- HTTP Code: Upon a successful response, this will return 'HTTP Code: 204'.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/verify-bank-details \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
-H 'aptoken: tok_sandbox_q9jbJTLG8Ch1KubZwkwk2D' \
--data '{
"bankNumber": 223,
"branchTransitNumber": "112233"
}'
RESPONSE EXAMPLE:
HTTP 200 OK
=== Verify Identity ===
Method: POST
Endpoint: /identity/vp/sendverificationlink
Content-Type: application/json
Description: Verify Identity
Use this API to generate a session to verify the identity of a person.
Once a session has been created it can then be distributed to the person that needs to be verified. Below are the various channels that can be used to distribute the session to the person to start the verification process.
Direct Link
You can send the URL directly to your user, through email, SMS or any other channel. You can also redirect the user from your website or mobile app to the link.
QR Code
You can display the QR Code for your users to scan with their mobile phone.
Embedding into website
The URL can be embedded into your website so it appears to the user that the identity verification is conducted without leaving your website with the following code.
REQUEST PARAMETERS:
- firstName (Sting) - Optional
Please provide the person’s first name.
- lastName (Sting) - Optional
Please provide the person’s last name.
- email (Sting) - Optional
Please provide the person’s email address.
If an email address is included, a request verification email will be sent from AptPay.
- phone (Sting) - Optional
Please provide the person’s phone number.
- requireGeoLocation (Bool) - Optional
Please provide require GeoLocation. (Default value is 0)
SUCCESSFUL RESPONSE:
- id: This returns a unique numeric integer to identify the entity.
- url: URL unique to the merchant that is used to verify the customer. This link will need to be sent to the customer to start verification.
- qrcode: A QR code containing a link, unique to the merchant, is used to verify the customer. This QR code provides a quick and easy transition from a desktop device to their mobile device.
- session: This is a unique alphanumerical string used to identify the session ID for the customer. This ID tracks the session for the customer clicking the link to start the verification process.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 G001: Unknown gateway
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/identity/vp/sendverificationlink \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
--data '{
"email": "test@mail.com",
"requireGeoLocation": true
}
RESPONSE EXAMPLE:
{
"id": 83,
"url": "https://verifypro.aptpay.com/?reference=YKZ5SZPSCWM",
"qrcode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIcAAACHAQMAAAAGKdhJAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABEklEQVRIibWUMa6EMAxEB1FQ5gi5yXKxlYK0Fws3yREoUyD8x8ku6NcMaRK/xvF4bOCxMxkPZltiHfyZdSQDcTrCDls3eCgjq+1xWrc3c23J1AQvJsQTZDqQSlWTps/qov9TTED83fTpWEe69Uha1suM9wmNQgsCyTBQqaojfjtmKdb10ZFt9E6ync3mOuJugRkxZorUxBIR/t1nJzkZS+uyhuD1rQZcJx+vR0WmHPZoOSxOOEU6wtsKC2hT+UaFjPS9Omy/l45c658ipXIO0H3ynXf7FG6SVExIsq/U+WfzCh3pGztY8azl2uEa0hxeEXovlAQtoNfjmV1AXB+OJtt5YCyAjrSeZga8F5xdvk8eO3+owBTyri0V8gAAAABJRU5ErkJggg==",
"session": "YKZ5SZPSCWM"
}
=== Get Identity Result ===
Method: GET
Endpoint: /identity/vp/verification?id=:id
Content-Type: application/json
Description: Use this API to get the results for an Identity Verification.
URL PARAMETERS:
- id (int) - Conditional
Please provide the verification ID.
- identityId (int) - Conditional
Please provide the identity ID.
SUCCESSFUL RESPONSE:
- id: This returns a unique numeric integer to identify the entity.
- email: Identity email that was provided while sending the verification link.
- startDate: The time when the verification link was send.
- endDate: The time when the verification was completed (whether it was success or failed). If this is "null", it means users has not started the verification process yet
- success: xcv
- failreason: Reason for a failed verification. It will only have a reason if "success" key is 0 otherwise null.
- failcode: xcv
- data: xcv
- face: Face verification results. Please check the response sample.
- verification: Various verification results. Please check the response sample.
- authentication: Authentication results. Please check the response sample.
- aml: Array containing list of AML matches, returns null if no match was found otherwise any array. Please check the sample response.
The AML database may not contain all the information fields listed below, in such case, the field will be omitted from the response.
- has_images: This represents if the identity verification has verification documents or not.
If it does, images could be retrieved vai "Identity Images" API call
- userIpData: The location where the verification process was completed at
- firstName: First name that may or may not be provided while sending the verification link
- lastName: Last name that may or may not be provided while sending the verification link
- phone: Phone number that may or may not be provided while sending the verification link. If it does
a verification link will be sent vai SMS too
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/identity/vp/verification?id=:id \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{
"id":8,
"email":"abc@example.com",
"startDate":"2022-10-10 06:18:03",
"endDate":"2022-11-0116:24:07",
"success":1,
"failReason":null,
"failCode":null,
"data":{
"documentNumber":"V9624-09359-10821",
"firstName":"JOHN",
"middleName":"",
"lastName":"SMITH",
"fullName":"JOHN SMITH",
"sex":"M",
"height":"178 cm",
"age":31,
"dob":"1989\/08\/21",
"dob_day":25,
"dob_month":8,
"dob_year":1989,
"expiry":"2027\/06\/20",
"expiry_day":20,
"expiry_month":6,
"expiry_year":2027,
"daysToExpiry":1693,
"issued":"2020\/08\/16",
"issued_day":16,
"issued_month":8,
"issued_year":2020,
"daysFromIssue":77,
"address1":"address 1",
"address2":"",
"postcode":"B4K 0Z2",
"optionalData":"HL4907226",
"vehicleClass":"G",
"restrictions":"X",
"documentType":"DRIVERS_LICENSE",
"documentSide":"FRONT",
"issuerOrg_region_full":"Ontario",
"issuerOrg_region_abbr":"ON",
"issuerOrg_full":"Canada",
"issuerOrg_iso2":"CA",
"issuerOrg_iso3":"CAN",
"nationality_full":"Canada",
"nationality_iso2":"CA",
"nationality_iso3":"CAN",
"internalId":"20"
},
"face":{
"isIdentical":true,
"confidence":"0.890"
},
"verification":{
"passed":true,
"result":{
"face":true,
"notexpired":true
}
},
"authentication":{
"score":0.6,
"breakdown":{
"data_visibility":{
"passed":true
},
"image_quality":{
"passed":true
},
"feature_referencing":{
"passed":true
},
"exif_check":{
"passed":true
},
"publicity_check":{
"passed":true
},
"text_analysis":{
"passed":true
},
"biometric_analysis":{
"passed":true
},
"security_feature_check":{
"passed":true
},
"recapture_check":{
"passed":false,
"code":180,
"reason":"Recaptured document",
"severity":"medium"
}
},
"warning":[
"Recaptured document"
]
},
"aml": [
{
"entity": "person",
"fullname": [
"Zulkepli Bin Marzuki"
],
"firstname": [
"Zulkepli"
],
"lastname": [
"Marzuki"
],
"alias": [
"Zulk Marzuki"
],
"dob": [
"1968-07-03"
],
"address": [
"Taman Puchong Perdana"
],
"nationality": [
"MY"
],
"gender": [
"M"
],
"documentnumber": [
{
"id": "680703-10-5821",
"id_formatted": "680703105821",
"country": "my",
"type": "I"
},
{
"id": "A 5983063",
"id_formatted": "A5983063",
"country": "my",
"type": "P"
}
],
"program": [
"Ordinance of 2 October 2000 on measures against individuals and entities"
],
"note": [
"Review pursuant to Security Council resolution 1822 (2008) was concluded on 19 Jun 2009."
],
"status": [
"Listed on: 19 Jun 2009 (Relisted on 3 Aug. 2020)"
],
"time": "2013-04-17T22:00:00.000Z",
"source": [
"url"
],
"database": "ch_seco",
"schema": "sanction"
}
],
"has_images":1,
"userIpData":{
"status":"success",
"country":"Canada",
"countryCode":"CA",
"regionName":"Ontario",
"city":"Thornhill",
"district":"",
"zip":"L4J",
"lat":43.8137,
"lon":-79.4531,
"mobile":false,
"proxy":false,
"query":"174.95.166.223",
"ipLocation": "true"
},
"firstName":null,
"lastName":null,
"phone":null
}
=== Get List of Identity Results
We recommend that this data be cached. ===
Method: GET
We recommend that this data be cached.
Endpoint: /identity/vp/verifications?dateFrom=:dateFrom&dateTo=:dateTo
We recommend that this data be cached.
Content-Type: application/json
We recommend that this data be cached.
Description: This returns a list of verifications. This API provides details on the status of the verification request, when verification requests were sent out and when the users completed verification.
We recommend that this data be cached.
URL PARAMETERS:
- dateFrom (date) - Optional
Provide the date range of when you want to begin checking verification status. This also indicates when the email verifications were sent. If there is no information provided for 'dateFrom', this value will default to one month prior to today’s date.
Format: YYYY-MM-DD
- dateTo (date) - Optional
Provide the date range of when you want to finish checking verification status. This also indicates when the user completed verification. The user will receive a Verification Completed notification on their device when the requested documents are sent. If there is no information provided for 'dateTo', it will default to today’s date.
Format: YYYY-MM-DD
SUCCESSFUL RESPONSE:
Upon a successful call, an array of identity verifications will be returned, containing the following properties for each verification:
- ID: This returns a unique numeric integer to identify the entity.
- Email: Email address of user
- startDate: Start date indicates when the verification request was sent out.
- endDate: End date indicates when the verification was completed. If this is "null", it means users has not started the verification process yet
- success: Whether the user has passed identity verification.
Possible values:
0
1
- failcode: It will have one of the following codes if "success" key is 0 otherwise null
Possible values are given below:
0 - Session expired
1 - Document not recognized or supported
2 - Authenticity check failed
3 - Biometric verification failed
4 - Document expired
5 - Name verification failed
6 - Date of birth verification failed
7 - Address verification failed
8 - Postcode verification failed
9 - Age verification failed
10 - Key information missing from document
11 - Information mismatch between front and back of document
12 - Document was not issued by one of the specified countries
13 - Document was not issued by one of the specified regions
14 - Document of this type is not accepted
15 - Phone verification failed
16 - ID number verification failed
99 - Other error
- failReason: Reason for a failed verification. It will only have a reason if "success" key is 0 otherwise null.
- data: Key-value pairs containing information on user uploaded documents. For specific details, check the sample response
Following are the possible values of "documentType" key in "data" attribute
1. DRIVERS_LICENSE
2. PASSPORT
- face: Face verification results, for specific details, check the sample response
- verification: Various verification results. Please check the response sample.
- authentication: Authentication results. Please check the response sample.
- aml: Array containing list of AML matches, returns null if no match was found otherwise any array. Please check the sample response.
The AML database may not contain all the information fields listed below, in such case, the field will be omitted from the response.
- has_images: This flag represents whether the identity verification documents are available to download.
- userIpData: The location where the verification process was completed at
- firstName: First name that may or may not be provided while sending the verification link
- lastName: Last name that may or may not be provided while sending the verification link
- phone: Phone number that may or may not be provided while sending the verification link. If it does a verification link will be sent vai SMS too
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/identity/vp/verifications?dateFrom=:dateFrom&dateTo=:dateTo \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
[
{
"id":8,
"email":"abc@example.com",
"startDate":"2022-10-10 06:18:03",
"endDate":"2022-11-0116:24:07",
"success":1,
"failReason":null,
"failCode":null,
"data":{
"documentNumber":"V9624-09359-10821",
"firstName":"JOHN",
"middleName":"",
"lastName":"SMITH",
"fullName":"JOHN SMITH",
"sex":"M",
"height":"178 cm",
"age":31,
"dob":"1989\/08\/21",
"dob_day":25,
"dob_month":8,
"dob_year":1989,
"expiry":"2027\/06\/20",
"expiry_day":20,
"expiry_month":6,
"expiry_year":2027,
"daysToExpiry":1693,
"issued":"2020\/08\/16",
"issued_day":16,
"issued_month":8,
"issued_year":2020,
"daysFromIssue":77,
"address1":"address 1",
"address2":"",
"postcode":"B4K 0Z2",
"optionalData":"HL4907226",
"vehicleClass":"G",
"restrictions":"X",
"documentType":"DRIVERS_LICENSE",
"documentSide":"FRONT",
"issuerOrg_region_full":"Ontario",
"issuerOrg_region_abbr":"ON",
"issuerOrg_full":"Canada",
"issuerOrg_iso2":"CA",
"issuerOrg_iso3":"CAN",
"nationality_full":"Canada",
"nationality_iso2":"CA",
"nationality_iso3":"CAN",
"internalId":"20"
},
"face":{
"isIdentical":true,
"confidence":"0.890"
},
"verification":{
"passed":true,
"result":{
"face":true,
"notexpired":true
}
},
"authentication":{
"score":0.6,
"breakdown":{
"data_visibility":{
"passed":true
},
"image_quality":{
"passed":true
},
"feature_referencing":{
"passed":true
},
"exif_check":{
"passed":true
},
"publicity_check":{
"passed":true
},
"text_analysis":{
"passed":true
},
"biometric_analysis":{
"passed":true
},
"security_feature_check":{
"passed":true
},
"recapture_check":{
"passed":false,
"code":180,
"reason":"Recaptured document",
"severity":"medium"
}
},
"warning":[
"Recaptured document"
]
},
"aml": [
{
"entity": "person",
"fullname": [
"Zulkepli Bin Marzuki"
],
"firstname": [
"Zulkepli"
],
"lastname": [
"Marzuki"
],
"alias": [
"Zulk Marzuki"
],
"dob": [
"1968-07-03"
],
"address": [
"Taman Puchong Perdana"
],
"nationality": [
"MY"
],
"gender": [
"M"
],
"documentnumber": [
{
"id": "680703-10-5821",
"id_formatted": "680703105821",
"country": "my",
"type": "I"
},
{
"id": "A 5983063",
"id_formatted": "A5983063",
"country": "my",
"type": "P"
}
],
"program": [
"Ordinance of 2 October 2000 on measures against individuals and entities"
],
"note": [
"Review pursuant to Security Council resolution 1822 (2008) was concluded on 19 Jun 2009."
],
"status": [
"Listed on: 19 Jun 2009 (Relisted on 3 Aug. 2020)"
],
"time": "2013-04-17T22:00:00.000Z",
"source": [
"url"
],
"database": "ch_seco",
"schema": "sanction"
}
],
"has_images":1,
"userIpData":{
"status":"success",
"country":"Canada",
"countryCode":"CA",
"regionName":"Ontario",
"city":"Thornhill",
"district":"",
"zip":"L4J",
"lat":43.8137,
"lon":-79.4531,
"mobile":false,
"proxy":false,
"query":"174.95.166.223"
},
"firstName":null,
"lastName":null,
"phone":null
}
]
=== Identity Images ===
Method: GET
Endpoint: /identity/vp/images?id=:id
Content-Type: application/json
Description: Returns a list of identity verification documents
URL PARAMETERS:
- id (int) - Required
Please provide the identity ID.
SUCCESSFUL RESPONSE:
- Images: Upon a successful call, this will return the image of the identity document in base64.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/identity/vp/images?id=:id \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{
"images": {
"documentImages": [
{
"side": "FRONT",
"type": "jpg",
"content": ""
}
],
"faceImages": [
{
"type": "jpg",
"content": ""
}
]
}
}
=== ADD IDENTITY ===
Method: POST
Content-Type: application/json
Endpoint: /identities/add
Description: Use this API to add an identity. An identity refers to an individual person or a business entity who receive or make payments. In some cases, fields marked as optional may become required if the identity is used for specific payment services. Please ensure you provide the necessary data for any payment service you intend to use under this identity.
REQUEST PARAMETERS:
- individual (bool) - Required
If this is an individual, set this parameter to True. If this is a business entity, set this to False.
Default = true
- name (string) - This is required if individual is set to false
Please provide business entity name
- first_name (string) - This is required if individual is set to true
Please provide the individual's first name (max 50 characters)
- middle_name (string) - Optional
Please provide the individual's middle name.
- last_name (string) - This is required if individual is set to true
Please provide the individual's last name.
- street (string) - Required for CARD
Address
- street_line_2 (string) - Optional
Address line 2
- city (string) - Required for CARD
City
- zip (string) - Required for CARD
Zip/Postal code
- province (string) - Required for CARD
Please provide the province or state in which the indivdual or business resides.
- country (string) - Required for CARD
Please provide merchant’s country of origin. This is expressed as a two-letter country code (ie., CA for Canada, US for United States, etc.).
- dateOfBirth (string) - Optional
Please provide the individual’s date of birth. This is represented as YYYY-MM-DD.
- phone (string) - Either phone or email is required
Please provide a contact's phone number.
- email (email) - Either phone or email is required
Please provide a contact email address.
- occupation (string) - Required for prepaid cards
Please provide contact’s occupation.
- nationalIdentityNumber (string) - Optional
Please provide contact's National Identity Number (ie., Social Security Number, Social Insurance Number, etc.).
- nonTaxResident (bool) - Optional
If the identity is not a tax resident of their country of residence, set this to True.
- jurisdictionOfTaxResidence (string) - Optional
Please provide the jurisdiction of tax residence. This is expressed as a two-letter country code.
- taxID (string) - Optional
Taxpayer identification number
- noTaxIDReason (string) - Optional
If the identity does not have a TIN, please provide a reason
- sin (string) - Optional
Social Insurance Number - 9 Characters
- dbaName (string) - Optional
Please provide Doing Business As name
- url (string) - Optional
Please provide a Website Address/URL, if applicable
- typeOfBusiness (string) - Optional
Please describe what type of business this is. This will be defined as one of the following below:
- Corporation
- LLC
- Sole Proprietorship
- Medical or legal corporation
- Association/Estate/Trust
- Partnership
- Tax Exempt Organization (501c)
- Charity
- International organization
- Government/Municipality
- Not for Profit
- Trust
- Professional Association
- natureOfBusiness (string) - Optional
Please briefly describe the nature of the business
- dateOfIncorporation (date) - Optional
Please provide Date of Incorporation
- countryOfRegistration (string) - Optional
Please provide the country in which the business was registered. This is expressed as a two-letter country code (ie., US for United States, CA for Canada, etc.).
- provinceOfRegistration (string) - Optional
Please provide the Province or State of registration This is the province where the business was established
- businessTaxId (string) - Required for Interac if individual is set to false
Nine digit Business Identification Number (BIN) or Employer Identification Number (EIN)
- stockSymbol (string) - Optional
Stock Symbol for the business, if applicable.
- clientId (string) - Required
Please provide the client ID for the business. Reference client ID from your database.
- thirdParty (bool) - Optional
Set this to True if you are not acting on behalf of a third party.
- privacyPolicy (bool) - Optional
Set this to True to if Privacy Policy is accepted.
- termsAndConditions (bool) - Optional
Set this to True if Terms and Conditions are accepted.
- legalBindingAuthority (bool) - Optional
Set this to True if the applicant is authorized to represent the business.
- patriotAct (bool) - Optional
Set this to True to consent to the Patriot Act agreement.
- eSign (bool) - Optional
Set this to true if this will include an electronic signature (eSign).
- percentageOfOwnershipBelow25 (bool) - Optional
Set this to True if no owners own 25% or more of the business.
- selfVerify (bool) - Optional
Set this to True if you are using the selfVerify model. Default: false
- validation (int) - Optional
0 - no validation
1 - email validation
2 - sms validation
3 - sms and email validation
If true an will receive containing to confirm access to the email address/phone.
Default: 0
Upon choosing Option 3, the user is required to complete a two-step verification process, which involves authentication via email and SMS.
- validationExpiry (int) - Optional
Length of time in hours the validation link will be valid.
- custom1 (string) - Optional
Custom parameter
- custom2 (string) - Optional
Custom parameter
- custom3 (string) - Optional
Custom parameter
- custom4 (string) - Optional
Custom parameter
- custom5 (string) - Optional
Custom parameter
SUCCESSFUL RESPONSE:
- id: Unique numeric string to identify the identity.
- status: Message describing status of the identity.
ERRORS:
400 C001 - Constraint check failed. List of errors will be returned
400 J001 - JSON format mismatch
401 - Not authorized
401 H001 - Body hash does not match
403 P001 - Account disabled
500 - Internal server error. Please contact us when you encounter this problem
REQUEST EXAMPLE
curl \
-X POST https://devsec.aptpaydev.com/identities/add \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: vzjGUYVah0z6OAV9opVCccyOm76EqN' \
-H 'body-hash: ' \
--data '{
"individual": true,
"first_name": "James",
"last_name": "Howlett",
"street": "123 street",
"city": "Toronto",
"zip": "L4K 0J7",
"country": "CA",
"email": "ria3k658@yopmail.com",
"clientId": "456",
"province": "ON"
}'
RESPONSE EXAMPLE
{ "id": 847212832896,
"status": "AML check in progress"
}
=== bulk add identities ===
Method: POST
Endpoint: /identities/bulk-add
Content-Type: application/json
Description: Use this API to add multiple identities at once.
REQUEST PARAMETERS:
The request parameters for this API are the same as the ones listed in Add Identity. Each identity, however, will need to be wrapped in an array. We’ve provided an example (see the Request Parameters sample on the right) on how to add entries.
SUCCESSFUL RESPONSE:
Upon a successful call, an array will be returned containing the following information for each identity added:
- id: Unique numeric string to identify the identity.
- status: Message describing status of the identity.
If an identity is successfully added, its “status” will state “AML check in progress”. If an identity fails to be added, its “status” will state "ERROR" and a list of errors will be returned.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401: Not authorized
- 401 H001: Body hash does not match
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X POST https://devsec.aptpaydev.com/identities/bulk-add \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
--data '{
"payees": [
{
"individual": true,
"first_name": "redsfdkd",
"last_name": "fdkgg",
"street": "ABC street",
"city": "Toronto",
"zip": "L4K 0J7",
"country": "CA",
"dateOfBirth": "1982-04-04",
"email": "ridff6263@yopmail.com",
"clientId": "456",
"province": "ON"
},
{
"individual": true,
"first_name": "sdgdf",
"last_name": "ffdgdkgg",
"street": "ABC street",
"city": "Toronto",
"zip": "L4K 0J7",
"country": "CA",
"dateOfBirth": "1982-04-04",
"email": "dsf21@yopmail.com",
"clientId": "456",
"province": "ON"
}]
}'
RESPONSE EXAMPLE:
[{"status":"AML check in progress","id":141191090095, "clientId": "456"},{"status":"AML check in progress","id": 160124093568, "clientId": "456"}]
=== update identity ===
Method: PUT
Endpoint: /identities/:ID
Content-Type: application/json
Description: Use this API to update an existing identity's information.
URL PARAMETERS:
- id (int) - Required
ID of the identity (received as a response from successfully adding identity)
REQUEST PARAMETERS:
Only the information to be updated should be passed as a parameter.
- id (int) - Optional
Identity ID
- name (string) - Optional
Business entity name
- first_name (string) - Optional
Please provide the identity's first name.
- middle_name (string) - Optional
Please provide the individual's middle name.
- last_name (string) - Optional
Please provide the individual's last name.
- street (string) - Optional
Address
- street_line_2 (string) - Optional
Address line 2
- city (string) - Optional
City
- zip (string) - Optional
Zip/Postal code
- country (string) - Required
Please provide merchant’s country of origin. This is expressed as a two-letter country code (ie., CA for Canada, US for United States, etc.).
- occupation (string) - Required for prepaid cards
Please provide the identity’s occupation.
- nationalIdentityNumber (string) - Optional
Please provide the identity’s national identity number (ie., social security, social insurance number, etc.).
- nonTaxResident (bool) - Optional
If the identity is not a tax resident of their country of residence, set this to True.
- jurisdictionOfTaxResidence (string) - Optional
Please provide the jurisdiction of tax residence. This is expressed as a two-letter country code.
- taxID (string) - Optional
Taxpayer identification number
- noTaxIDReason (string) - Optional
If the identity does not have a TIN (taxpayer identity number), please provide a reason.
- sin (string) - Optional
Please provide the Social Insurance Number. This is a nine-character identification number.
- dbaName (string) - Required if individual to false
Please provide the Doing Business As (operating)name
- url (string) - Optional
Website Address/URL
- typeOfBusiness (string) - Required if individual to false
Please describe what type of business this is. This will be defined as one of the following below:
Corporation
LLC
Sole Proprietorship
Medical or legal corporation
Association/Estate/Trust
Partnership
Tax Exempt Organization (501c)
Charity
International organization
Government/Municipality
Not for Profit
Trust
Professional Association
- natureOfBusiness (string) - Optional
Please briefly describe the nature of the business.
- dateOfIncorporation (date) - Required if individual to false
Please provide Date of Incorporation.
- province (string) - Required if individual to false
Please provide the province in which the business resides.
- countryOfRegistration (string) - Required if individual to false
Please provide the country in which the business was registered. This is expressed as a two-letter country code (ie., US for United States, CA for Canada, etc.).
- businessTaxId (string)
Nine digit Business Identification Number (BIN) or Employer Identification Number (EIN)
- stockSymbol (string) - Optional
Stock Symbol for the business, if applicable.
- thirdParty (bool) - Optional
Set this to true if you are not acting on behalf of a third party.
- privacyPolicy (bool) - Optional
Set this to True to if Privacy Policy is accepted.
- termsAndConditions (bool) - Optional
Set this to True if Terms and Conditions are accepted.
- legalBindingAuthority (bool) - Optional
Set this to True if the applicant is authorized to represent the business.
- patriotAct (bool) - Optional
Set this to True to consent to the Patriot Act agreement.
- eSign (bool) - Optional
Set this to true if this will include an electronic signature (eSign).
- percentageOfOwnershipBelow25 (bool) - Optional
Set this to True if no owners own 25% or more of the business.
- selfVerify (bool) - Optional
Set this to True if you are using the selfVerify model.
Default: false
SUCCESSFUL RESPONSE:
Upon a successful update, this will return 'HTTP 200 Ok'.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401: Not authorized
- 401 H001: Body hash does not match
- 403 P001: Account disabled
- 403 P004: This payee cannot be updated. Attempting to update the dateOfBirth field more than once will also trigger this error.
- 404 D001: Unknown payee id
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X PUT https://devsec.aptpaydev.com/identities/:ID \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
--data '{
"individual": true,
"first_name": "John",
"last_name": "Doe",
"city": "Toronto",
"country": "CA"
}'
RESPONSE EXAMPLE:
200 ok
=== get identity list ===
Method: GET
Endpoint: /identities
Content-Type: application/json
Description: Use this API to retrieve list of identities.
REQUEST PARAMETERS:
- dateFrom (datetime) - Optional
Please provide the starting date for the date range desired.
- dateTo (datetime) - Optional
Please provide the ending date for the date range desired.
- country (string) - Optional
You can provide the country to which the identity belongs. This is expressed as a two-letter country code (ie. CA for Canada, US for United States, etc)
- name (string) - Optional
You can provide the name or firstname or lastname or any part of them
- email (email) - Optional
Enter payee email
- phone (phone) - Optional
Enter payee phone
Replace '+' with '%2B' in phone number for API requests. This URL encoding ensures the server correctly interprets '+'.
- kyc (int) - Optional
1 - if you want to retrieve KYC info
SUCCESSFUL RESPONSE:
Upon a successful call, this will return a list of identities, as well as recent payment information.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/identities \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{
"100487870545": {
"id": 100487870545,
"first_name": "Bryan",
"last_name": "Jarred",
"email": "",
"country": "CA",
"dateOfBirth": "1900-01-01",
"individual": 1,
"clientId": "",
"name": "",
"status": 1,
"phone": ""
},
"101171659526": {
"id": 101171659526,
"first_name": "Hoebart",
"last_name": "Hartgill",
"email": "",
"country": "CA",
"dateOfBirth": "1900-01-01",
"individual": 1,
"clientId": "",
"name": "",
"status": 1,
"phone": ""
},
"101894722511": {
"id": 101894722511,
"first_name": "Jamalia",
"last_name": "Gupta",
"email": "",
"country": "CA",
"dateOfBirth": "1900-01-01",
"individual": 1,
"clientId": "",
"name": "",
"status": 1,
"phone": ""
},
"102148672037": {
"id": 102148672037,
"first_name": "",
"last_name": "",
"email": "",
"country": "CA",
"dateOfBirth": "1900-01-01",
"individual": 0,
"clientId": "",
"name": "Enim Sit LLP",
"status": 1,
"phone":""
}
}
=== get balance ===
Method: GET
Endpoint: /balance
Content-Type: application/json
Description: Use this API to retrieve the balance of the AptPay funding account.
URL PARAMETERS:
- type (int) - Optional
Please indicate the type of account this is. This is defined as an integer between 0 and 2, the values of which are listed below:
0 - Global
1 - Prepaid
2 - CrossBorder
3 - EFT APG
4 - Billpay
Default: 0
SUCCESSFUL RESPONSE:
- balance: Balance of the funding account
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/balance \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{"balance":"4957.11","holdAmount":"1000.00","availableBalance":"3957.11"}
=== get transactions report ===
Method: GET
Endpoint: /reports/merchant-transactions-report/:date[/:dateTo]?format=json
Content-Type: application/json
Description: Use this API to retrieve a merchant transaction report.
URL PARAMETERS:
- date (date or datetime) - Optional
Please provide the starting date for the merchant transaction report range. This is expressed as YYYY-MM-DD. The time zone is in UTC. If no date is provided, this parameter will default to yesterday’s date.
In case of datetime the value needs to be URL ENCODED: 2023-07-10+01%3A00%3A00 ( original 2023-07-10 01:00:00)
Default: yesterday's date
- dateTo (date or datetime) - Optional
Please provide the ending date for the report range. This is expressed as YYYY-MM-DD. The time zone is in UTC. If no date is provided, this parameter will default to yesterday’s date.
In case of datetime the value needs to be URL ENCODED: 2023-07-10+01%3A00%3A00 ( original 2023-07-10 01:00:00)
Default: yesterday's date
GET PARAMETERS:
- format (string) - Optional
Please denote if you would like this information returned in json or csv format.
Default: csv
- legacy (int) - Optional
Please indicate if you want this to be returned in legacy format or non-legacy format. Legacy format includes a date at the beginning of the information returned. For example:
{ '2022-01-01':
[transaction1
transaction2
]
}
{
transaction1
transaction2
}
For legacy format, select 1. Otherwise, select 0.
Default: 1
- transactionType (int) - Optional
Please provide what kind of transaction reporting data you want returned:
1 - Apt-Send
2 - EFT
3 - Physical Card Issuance
4 - Digital Card Issuance
5 - Digital Card Issuance G&G
6 - AptX
11 - EFT Debit
9 - Wallet
10 - Selfpay
- aggregator (int) - Optional
1 - if you want to recieve aggregated report for all your sub-merchants
- fundingTransactions (int) - Optional
1 - if you want to include funding transactions
- balance (int) - Optional
1 - For each settled transaction, the response will include the available balance after the transaction was completed.
SUCCESSFUL RESPONSE:
Upon a successful call, the response will contain a report of transactions in either JSON or CSV format for the specified date range.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 401 H001: Body hash does not match
- 401: Not authorized
- 403 P001: Account disabled
- 404 E004: Report not found
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/reports/merchant-transactions-report/:date[/:dateTo]?format=json \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
"2022-01-05": [
{
"Date of Transaction": "2022-01-05 10:22:46",
"Transaction ID": "fudjtx2sx5-0203-km7si7yuwwmxoigdmartzsra",
"Disbursement Number": "*3734",
"Payee ID": 352321475238,
"Product Type": "APT SEND CA",
"Program Type": "B2B Disbursements",
"Disbursement Country": "CA",
"Destination Country": "CA",
"Amount": "10.00",
"Currency": "CAD",
"Status": "settled",
"Error Code": "",
"Reference ID": "fc77a229-664d-47c5-a9be-22536c1c20b2",
"Custom Field 1": "",
"Custom Field 2": "",
"Custom Field 3": "",
"Custom Field 4": "",
"Custom Field 5": "",
"Date of Settlement": "2022-01-06 13:05:04"
"Settlement Amount": "10.00",
"Fees": 0,
"Waive Fees": "No",
"Original Fee": "0.00",
"IdentityCustom Field 1": "",
"IdentityCustom Field 2": "",
"IdentityCustom Field 3": "",
"IdentityCustom Field 4": "",
"IdentityCustom Field 5": "",
"Error Description": "",
"Trace Number": "",
"Identity Name": "Scott Mullins"
},
{
"Date of Transaction": "2022-01-05 10:26:05",
"Transaction ID": "rkq9t8onpc-0203-we0yncberd0an3ovsar6mv8x",
"Disbursement Number": "*4454",
"Payee ID": 352321475238,
"Product Type": "EFT Canada",
"Program Type": "B2C Disbursements",
"Disbursement Country": "CA",
"Destination Country": "CA",
"Amount": "5.00",
"Currency": "CAD",
"Status": "settled",
"Error Code": "",
"Reference ID": "3b0509c2-b055-476a-affe-6351dd3b19d6",
"Custom Field 1": "",
"Custom Field 2": "",
"Custom Field 3": "",
"Custom Field 4": "",
"Custom Field 5": "",
"Date of Settlement": "2022-01-05 10:30:01"
"Settlement Amount": "5.00",
"Fees": 0,
"Waive Fees": "No",
"Original Fee": "0.00",
"IdentityCustom Field 1": "",
"IdentityCustom Field 2": "",
"IdentityCustom Field 3": "",
"IdentityCustom Field 4": "",
"IdentityCustom Field 5": "",
"Error Description": "",
"Trace Number": "",
"Identity Name": "Kent Clark"
}]
Section: Tokenization
overview
To collect card information, you must pass the requirements of Payment Card Industry Data Security Standard (PCI DSS). In order to process high volumes of transactions, the highest level of compliance is required (PCI Compliance Level 1).
To read more about the PCI DSS levels, this guide can help for starters.
To meet PCI compliance level 1, Very Good Security Collect (VGS Collect) is the easiest method to securely collect sensitive data. They allow customizability to the input fields so that the appearcan can be fully controlled.
To read more about VGS Collect, review the documentation available on their page.
Section: Set Up VGS Collect
To get started, simply use the boilerplate code provided in the example. It includes everything you need to load VGS Collect and render a fully functional integration within your application.
To switch to a production or live environment, replace the js variables to const form = VGSCollect.create('tnthesc0xih', 'live', function(state) {});
SCRIPT
VGS Collect
=== Retrieve the Webhook URL(s) Registered with Your AptPay Services ===
Method: GET
Endpoint: /webhooks
Content-Type: application/json
Description: Use this API to retrieve a list of all webhook URLs currently configured for your environment.
SUCCESSFUL RESPONSE:
Upon successful update, a response containing your webhook URLs.
ERRORS:
- 400 J001: JSON format mismatch
- 400 W001: Not valid URL
- 401: Not authorized
- 401 H001: Body hash does not match
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
curl \
-X GET https://devsec.aptpaydev.com/webhooks \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
RESPONSE EXAMPLE:
{
"main": "https:\\/\\/webhook.myapitest.com\\/listener",
"gateaways": []
}
Section: webhooks authentication
Description: Webhook requests are signed with sha512 hash from the body and secret key.
The header property name is "body-hash". For sample verification refer to the sample PHP code to the right.
SCRIPT:
if ( $aHeaders['body-hash'] == hash_hmac( 'sha512', file_get_contents('php://input'), '>your secret key<' ) )
{
//Process webhook
}
=== Register Your Webhook Listener to Work with AptPay Services ===
Method: POST
Endpoint: /webhook
Content-Type: application/json
Description: Use this API to configure your webhook listener url to receive webhooks from AptPay.
REQUEST PARAMETERS:
- url (string) - Required
Please provide the URL where notifications will be sent.
- partnerGateway (int) - Optional
Please provide the partner gateway ID, if each gateway will be using its own specific webhook URL.
SUCCESSFUL RESPONSE:
Upon successful update, a response containing a { “status”: UPDATED } message will be received.
ERRORS:
- 400 C001: Constraint check failed
List of errors will be returned
- 400 J001: JSON format mismatch
- 400 W001: Not valid URL
- 401: Not authorized
- 401 H001: Body hash does not match
- 403 P001: Account disabled
- 500: Internal server error
Please contact us when you encounter this problem
REQUEST EXAMPLE:
-X POST https://devsec.aptpaydev.com/webhook \
-H 'Content-Type: application/json' \
-H 'AptPayApiKey: XxvdJZEil0fwEd0lfkzVBQtjiutqcE' \
-H 'body-hash: ' \
--data '{
"url": "https://eoonajjqs37jaj5.m.pipedream.net"
}'
RESPONSE EXAMPLE:
{
"status" : "UPDATED"
}