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.
#
Endpointv1/Matbia/Charge
#
Http Request MethodPOST
#
Request HeaderSee Authorization
#
Request Bodynote
* 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.
* 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.
Name | Type | Description |
---|---|---|
orgUserHandle* | string | The API key from the organization's profile page. |
orgTaxId* | string | Organization Tax Id |
orgName* | string | Organization Name |
orgEmail* | string | Organization Email |
orgPhoneNumber | string | Organization Phone Number |
orgStreet | string | Organization Street Address |
orgCity | string | Organization City |
orgState | string | Organization State |
orgZip | string | Organization Zip Code |
cardNum* | string | Matbia Card Number |
exp* | string | Matbia Card Expiration Number |
amount* | double | Transaction/Payment Amount |
transDate* | string - ISO 8601 format | Date and time of the transaction, in UTC time, can be any valid ISO_8601 format. |
note | string | Reference/Additional Text |
externalTransactionId | string | TransactionId - from your system |
#
Responseerror | "" - 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 }