Skip to main content

Charge


The Charge API enables organizations to securely process transactions with Matbia, requiring details such as organization information, credit card information, transaction amount, and date. It will return a standardized response including error handling and a reference ID.

Endpoint#

v1/Matbia/Charge

Http Request Method#

POST

Request Header#

See Authorization

Request Body#

note
* Indicates required field.
* Either orgUserHandle or the combination of orgTaxId, orgName, and orgEmail is required. See examples of both scenarios below. Visit the organization identification page to learn more about the organization matching process.
NameTypeDescription
orgUserHandle*stringThe API key from the organization's profile page.
orgTaxId*stringOrganization Tax Id
orgName*stringOrganization Name
orgEmail*stringOrganization Email
orgPhoneNumberstringOrganization Phone Number
orgStreetstringOrganization Street Address
orgCitystringOrganization City
orgStatestringOrganization State
orgZipstringOrganization Zip Code
cardNum*stringMatbia Card Number
exp*stringMatbia Card Expiration Number
amount*doubleTransaction/Payment Amount
transDate*string - ISO 8601 formatDate and time of the transaction, in UTC time, can be any valid ISO_8601 format.
notestringReference/Additional Text
externalTransactionIdstringTransactionId - from your system

Response#

error"" - See list of possible errors.
status"Success", “Error”, “Declined”, or “Failed”.
referenceId“XXXXXXXX”
cardHolderName""

Example using orgUserHandle:#

cURL:

    curl -X POST ^    "https://sandbox.api.matbia.org/v1/Matbia/Charge" ^    -H "accept: application/json" ^    -H "Authorization: DA8874A1-9393-4D59-8A79-5E436F2538A0" ^    -H "Content-Type: application/json-patch+json" ^    -d "{ \"orgUserHandle\": \"e542199755e04395b6a5c5bafb7c40be\", \"orgTaxId\": null, \"orgName\": null, \"orgEmail\": null, \"orgPhoneNumber\": \"800-555-1212\", \"orgStreet\": \"123 Main Street\", \"orgCity\": \"Anytown\", \"orgState\": \"US\", \"orgZip\": \"11111\", \"cardNum\": \"8628249448173425\", \"exp\": \"1228\", \"amount\": 1.00, \"transDate\": \"2024-05-03T03:19:57.831Z\", \"note\": null, \"externalTransactionId\": \"10002242528\"}"

Payload:

    {          "orgUserHandle": "e542199755e04395b6a5c5bafb7c40be",        "orgTaxId": null,        "orgName": null,        "orgEmail": null,        "orgPhoneNumber": "800-555-1212",        "orgStreet": "123 Main Street",        "orgCity": "Anytown",        "orgState": "US",        "orgZip": "11111",        "cardNum": "8628249448173425",        "exp": "1228",        "amount": 1.00,        "transDate": "2024-05-03T03:19:57.831Z",        "note": null,        "externalTransactionId": "10002242528"    }

Response:

    {        "error": null,        "status": "Success",        "referenceId": "PO0TB2E3",        "cardHolderName": null    }

Example using orgTaxId, orgName, and orgEmail:#

cURL:

    curl -X POST ^    "https://sandbox.api.matbia.org/v1/Matbia/Charge" ^    -H "accept: application/json" ^    -H "Authorization: DA8874A1-9393-4D59-8A79-5E436F2538A0 " ^    -H "Content-Type: application/json-patch+json" ^    -d "{\"orgUserHandle\": null, \"orgTaxId\": \"112233448\", \"orgName\": \"ABC Charity\", \"orgEmail\": \"test@test.com\", \"orgPhoneNumber\": \"800-555-1212\", \"orgStreet\": \"123 Main Street\", \"orgCity\": \"Anytown\", \"orgState\": \"US\", \"orgZip\": \"11111\", \"cardNum\": \"8628249448173425\", \"exp\": \"1228\", \"amount\": 1.00, \"transDate\": \"2024-05-03T03:19:57.831Z\", \"note\": null, \"externalTransactionId\": \"10002242528\"}"

Payload:

    {          "orgUserHandle": null,        "orgTaxId": "112233448",        "orgName": "ABC Charity",        "orgEmail": "test@test.com",        "orgPhoneNumber": "800-555-1212",        "orgStreet": "123 Main Street",        "orgCity": "Anytown",        "orgState": "US",        "orgZip": "11111",        "cardNum": "8628249448173425",        "exp": "1228",        "amount": 1.00,        "transDate": "2024-05-03T03:19:57.831Z",        "note": null,        "externalTransactionId": "10002242528"    }

Response:

    {        "error": null,        "status": "Success",        "referenceId": "TX28RJ0W",        "cardHolderName": null    }