Complete API Spec
OVERVIEW
The OpenEdge Mobile SDK allows OpenEdge partners to develop mobile payment-processing applications, built around the OpenEdge Mobile SDK. Integrators have the freedom to design their own User Interface and transactions while using the OpenEdge Mobile SDK to handle payment authentication and processing. This solution simplifies the integration process by not requiring merchants to download, install, and run two separate applications, as has been true with previous mobile solutions. This document is the API specification for OpenEdge Mobile SDK.
This SDK uses the following resource collections: sales, auths, returns, and voids. Please note that Sales is a primary transaction resource whereas Returns and voids are follow-on transactions, sub-resources of sales. The auths resource is a primary transaction and currently supports zero-dollar authorizations only.
Integrating clients can use gateway-generated transaction identifiers, sale_id, auth_id, or return_id, depending on type of transaction to perform follow-on transactions.
If integrating clients prefer to instead use a partner- or merchant-defined identifier for follow-ons, then the API accepts an optional, unique reference (reference_id) element as an alternate transaction identifier. This reference_id can also be used to perform follow-on transactions using an alternate set of end-points. Please note that if a reference_id is not sent by the client for a primary transaction, the payment gateway will generate one and send it back in the response.
Refer to the table below for transaction resources. Bolded resources indicate primary transactions. Non-bolded resources indicate follow-on transactions.
Sales transactions are used to purchase goods and services. When a sale occurs, the cardholder credit limit is checked to see if the funds are available. If the funds are available, an approval code is transmitted to the payment gateway. If approved, the transaction is flagged for inclusion in the settlement batch.
Sample createSale Transaction Request and Response
Below are sample createSale request and response payloads. Note that this sample includes all required and optional fields. Not all fields below are required for a successful createSale transaction request.
{
"header":{
"Authorization":"AuthToken [AuthToken]",
"X-GP-Api-Key":"[API Key]",
"X-GP-Request-Id": "SDK-f5f96b02-a083-470d-88ae-35a329bcf779",
"X-GP-Source-App-Name":"EEMSDK",
"X-GP-Source-App-Version":"1.0",
"X-GP-Environment":"qa",
"X-GP-HostedPayPage":false
},
"payload":{
"card": {
"cardholder_name": "John Doe"
},
"customer": {
"title": "Mr.",
"first_name": "John",
"middle_name": "Edward",
"last_name": "Doe",
"email":"john_doe@gmail.com",
"phone": "801-111-2222",
"note": "This customer is best.",
"billing_address": {
"line1": "123 Main Street",
"line2": "Apy 456",
"city": "Lehi",
"state": "UT",
"country": "USA",
"postal_code": "84043"
}
},
"payment": {
"amount": "230.36",
"gratuity_amount": "2.00",
"invoice_number": "123456",
"reference_id": "OrderId1148170403",
"currency_code":"840",
"purchase_order":{
"destination_postal_code":"84043",
"po_number":"12345",
"tax_amount":"0.00"
}
},
"shipping": {
"address": {
"line1": "123 Main Street",
"line2": "Apy 456",
"city": "Lehi",
"state": "UT",
"country": "USA",
"postal_code": "84043"
}
},
"transaction":{
"country_code":"840",
"language": "en-US",
"soft_descriptor":"a",
"processing_indicators":{
"allow_duplicate":true,
"address_verification_service":true,
"create_token":true,
"generate_receipt":true,
"partial_approval":true
}
},
"receipt":{
"clerk_id":"1234",
"signature_line":true
}
}
}{
"header": {
"Authorization": "AuthToken [AuthToken]",
"X-GP-Api-Key": "[API Key]",
"X-GP-Request-Id": "SDK-152a4a0afbc3-4241-be78-5ac64c2c0064",
"X-GP-Source-App-Name": "EEMSDK",
"X-GP-Source-App-Version": "1.0",
"X-GP-Environment": "qa"
},
"payload": {
"sale_id": "000000155974",
"payment": {
"amount": "87.10",
"gratuity_amount": "5.0",
"invoice_number": "123456",
"purchase_order": {
"destination_postal_code": "84043",
"po_number": "12345",
"tax_amount": "0.00"
}
},
"transaction": {
"processing_indicators": {
"allow_duplicate": false,
"generate_receipt": true
}
},
"receipt": {
"signature_format": "PNG",
"signature_image": "[Base64 signature image]"
}
}
}{
"header": {
"Authorization":"AuthToken [AuthToken]",
"X-GP-Api-Key":"[API Key]",
"X-GP-Request-Id": "SDK-216dadce-721d46b7-bd12-0e2bd61879ec",
"X-GP-Source-App-Name":"EEMSDK",
"X-GP-Source-App-Version":"1.0",
"X-GP-Environment":"qa",
"X-GP-HostedPayPage":false
},
"payload": {
"sale_id":"000000155633",
"payment": {
},
"transaction": {
"processing_indicators": {
"generate_receipt": true{
"header": {
"Authorization":"AuthToken [AuthToken]",
"X-GP-Api-Key":"[API Key]",
"X-GP-Request-Id": "SDK-565ab78c-82a4-
471f-bac3-dcde3e4f4149",
"X-GP-Source-App-Name":"EEMSDK",
"X-GP-Source-App-Version":"1.0",
"X-GP-Environment":"qa",
"X-GP-HostedPayPage":false
},
"payload": {
"sale_id":"000000155633",
"payment": {
"amount": "89.10",
"invoice_number": "123456"
},
"customer": {
"title": "Mr.",
"middle_name": "Edward",
"first_name": "John",
"last_name": "Doe",
"email": "john_doe@gmail.com",
"phone": "8017778888",
"billing_address": {
"line1": "123 Main Street",
"line2": "Apy 456",
"city": "Lehi",
"state": "UT",
"country": "USA",
"postal_code": "84043"
},
"note": "This is the best customer"
},
"transaction": {
"soft_descriptor": "b",
"processing_indicators": {
"allow_duplicate": true,
"generate_receipt": true
}
},
"receipt":
{
"clerk_id": "CLK1",
"signature_format": "PNG",
"signature_image": "[Base64 image of
signature]",
"signature_line": true
}
}
}{
"header":{
"Authorization":"AuthToken [AuthToken]",
"X-GP-Api-Key":"[API Key]",
"X-GP-Request-Id": "SDK-09b859ea-1c3c4d94-81e0-c1a4611069f0",
"X-GP-Source-App-Name":"EEMSDK",
"X-GP-Source-App-Version":"1.0",
"X-GP-Environment":"qa",
"X-GP-HostedPayPage":false
},
"payload":{
"payment": {
"amount": "223.76",
"invoice_number": "123456",
"reference_id": "OrderId1417130506",
"currency_code":"840",
"purchase_order":{
"destination_postal_code":"84043",
"po_number":"12345",
"tax_amount":"0.00"
}
},
"customer": {
"title": "Mr.",
"first_name": "John",
"middle_name": "Edward",
"last_name": "Doe",
"email":
"john_doe@gmail.com",
"phone": "801-111-2222",
"note": "This is the best customer",
"billing_address": {
"line1": "123 Main
Street",
"line2": "Apy 456",
"city": "Lehi",
"state": "UT",
"country": "USA",
"postal_code": "84043"
}
},
"shipping": {
"address": {
"line1": "123 Main
Street",
"line2": "Apy 456",
"city": "Lehi",
"state": "UT",
"country": "USA",
"postal_code": "84043"
}
},
"card": {
"cardholder_name": "John
Doe"
},
"transaction":{
"country_code":"840",
"language": "en-US",
"soft_descriptor":"a",
"processing_indicators":{
"address_verification_service”:true,
"create_token":true,
"generate_receipt":true,
"partial_approval":true
}
},
"receipt":{
"clerk_id":"1234",
"signature_line":true
}
}
}{
"header": {
"Authorization":"AuthToken [AuthToken]",
"X-GP-Api-Key":"[API Key]",
"X-GP-Request-Id": "SDK-fe269d5c-6948-
4711-946c-4e26b1d623b8",
"X-GP-Source-App-Name":"EEMSDK",
"X-GP-Source-App-Version":"1.0",
"X-GP-Environment":"qa",
"X-GP-HostedPayPage":false
},
"payload": {
"auth_id":"000000155639",
"payment":
{
"amount": "196.74",
"gratuity_amount": "2.00"
},
"transaction": {
"processing_indicators": {
"allow_duplicate": true,
"generate_receipt": true
}
},
"receipt":
{
"signature_format": "PNG",
"signature_image": "[Base64 image of
transaction]"
}
}
}