Create GPA Order

Action: POST
Endpoint: /gpaorders

To create an order to fund an account holder's general purpose account (GPA), issue a POST request to the /gpaorders endpoint. Include the funding details in JSON format in the body of the request. When you create any Marqeta resource, the system associates a token for referencing that resource. You can create your own token using any alpha-numeric characters, 36 chars max. If you do not include a token value, one is generated automatically.

If you don't specify a funding_source_token, the default funding source is used. If you have not specified a default funding source, the first funding source you created is used (it was automatically configured as the default).

You can assess a fee while funding a GPA by using the optional fees array to attach one or more fee resources to the GPA order. When you create a GPA order, the GPA is first credited for the fees, then debited at funding time.

Body Field Details

Name Type Required? Description Allowable Values
token string No The unique identifier of the GPA order.

If you do not include a token, the system will generate one automatically. This token is necessary for use in other calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.
36 char max
user_token

OR

business_token
string Yes Identifies the owner of the account being funded. Existing user or business token.

Issue a GET to /users to retrieve user tokens or to /businesses to retireive business tokens.
amount decimal Yes The amount to fund. 0.00
currency_code string Yes The 3-character ISO 4217 currency code. The 3-character ISO 4217 currency code.

"USD" currently supported.
funding_source_token string No Identifies the funding source to use for this order.

You don't have to supply a funding source token value in this call if you have a default funding source set up. If you have only one funding source, then this source is used as the default. If you have multiple funding sources and none are configured as the default, then an error is returned.
Existing funding source token.

Issue a GET to /fundingsources/user/{user_token} to retrieve funding source tokens for a specific user or to /fundingsources/business/{business_token} to retrieve funding source tokens for a specific business.
funding_source_address_token string No Identifies the funding source address to use for this offer.

If your funding source is an ACH account, then a funding source address is not required. If your funding source is a payment card, you must have at least one funding source address in order to create a GPA order.
Existing funding source address token.

Issue a GET to /fundingsources/addresses/user/{token} to retrieve addresses for a specific user.
tags string No Comma-delimited list of tags describing the order. 99 char max
memo string No Additional descriptive text. 255 char max
fees array of fee_model No Contains attributes that define characteristics of one or more fees.

When more than one fee is assessed, the fees are processed in the order they appear in the array.

fee_model

Name Type Required? Description Allowable Values
token string No The unique identifier of the fee. Existing fee token.

Issue a GET to /fees to retrieve fee tokens.
memo string No Additional text that describes the fee transfer. 99 char max
tags string No Comma-delimited list of tags describing the fee. 255 char max

Sample Request Body

{
"token": "my_gpaorder_01",
"user_token": "my_user_01",
"amount": "1000",
"currency_code": "USD",
"funding_source_token": "my_program_funding_source_01"
}

Sample Response Body

{
"token": "my_gpaorder_01",
"amount": 1000,
"created_time": "2017-05-10T23:00:15Z",
"last_modified_time": "2017-05-10T23:00:15Z",
"transaction_token": "156",
"state": "COMPLETION",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"funding": {
"amount": 1000,
"source": {
"type": "program",
"token": "**********e_01",
"active": true,
"name": "my_program_funding_source_01",
"is_default_account": false,
"created_time": "2017-03-31T19:13:23Z",
"last_modified_time": "2017-03-31T19:13:23Z"
}
},
"funding_source_token": "**********e_01",
"user_token": "my_user_01",
"currency_code": "USD"
}


Retrieve GPA Order

Action: GET
Endpoint: /gpaorders/{token}

To retrieve a GPA order, issue a GET request to the /gpaorders/{token} endpoint. Include the token path parameter to identify the GPA order to retrieve.

URL Path Parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the GPA order to retrieve. Existing GPA order token.

Issue a GET to /transactions?type=gpa.credit to retrieve GPA order tokens.

Sample Response Body

{
"token": "my_gpaorder_01",
"amount": 1000,
"created_time": "2017-05-10T23:00:15Z",
"last_modified_time": "2017-05-10T23:00:15Z",
"transaction_token": "156",
"state": "COMPLETION",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"funding": {
"amount": 1000,
"source": {
"type": "program",
"token": "**********e_01",
"active": true,
"name": "my_program_funding_source_01",
"is_default_account": false,
"created_time": "2017-03-31T19:13:23Z",
"last_modified_time": "2017-03-31T19:13:23Z"
}
},
"funding_source_token": "**********e_01",
"user_token": "my_user_01",
"currency_code": "USD"
}


Unload GPA Order

Action: POST
Endpoint: /gpaorders/unloads

Unloading a GPA order returns funds to the funding source. A GPA unload must be tied to an original GPA order and can be used to return the amount of the orginal order or a lesser amount.

To unload a GPA order, issue a POST request to the /gpaorders/unloads endpoint. Include the order details in JSON format in the body of the request. When you create any Marqeta resource, the system associates a token for referencing that resource. You can create your own token using any alpha-numeric characters, 36 chars max. If you do not include a token value, one is generated automatically.

Body Field Details

Name Type Required? Description Allowable Values
token string No The unique identifier of the GPA unload.

If you do not include a token, the system will generate one automatically. This token is necessary for use in other calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.
36 char max
amount decimal Yes The amount of funds to unload (return to funding source). 0.00
original_order_token string Yes Identifies the original GPA order. Existing GPA order token
tags string No Comma-delimited list of tags describing the order. 99 char max
memo string No Additional descriptive text. 255 char max

Sample Request Body

{
"token": "my_unload_01",
"original_order_token": "my_gpaorder_01",
"amount": 500
}

Sample Response Body

{
"token": "my_unload_01",
"amount": 500,
"created_time": "2017-05-10T23:14:50Z",
"last_modified_time": "2017-05-10T23:14:50Z",
"transaction_token": "158",
"state": "COMPLETION",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"funding": {
"amount": 500,
"source": {
"type": "program",
"token": "**********e_01",
"active": true,
"name": "my_program_funding_source_01",
"is_default_account": false,
"created_time": "2017-03-31T19:13:23Z",
"last_modified_time": "2017-03-31T19:13:23Z"
}
},
"funding_source_token": "**********e_01",
"original_order_token": "my_gpaorder_01"
}


Retrieve a GPA Unload

Action: GET
Endpoint: /gpaorders/unloads/{unload_token}

To retrieve a specific GPA unload, issue a GET request to the /gpaorders/unloads/{unload_token} endpoint. Include the unload_token path parameter to specify the GPA unload to retrieve.

URL Path Parameters

Name Type Required? Description Allowable Values
unload_token string Yes Identifies the GPA unload to retrieve. Existing GPA unload token.

Issue a GET to /gpaorders/unloads to return GPA unload tokens.

Sample Response Body

{
"token": "my_unload_01",
"amount": 500,
"created_time": "2017-05-10T23:14:50Z",
"last_modified_time": "2017-05-10T23:14:50Z",
"transaction_token": "158",
"state": "COMPLETION",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"funding": {
"amount": 500,
"source": {
"type": "program",
"token": "**********e_01",
"active": true,
"name": "my_program_funding_source_01",
"is_default_account": false,
"created_time": "2017-03-31T19:13:23Z",
"last_modified_time": "2017-03-31T19:13:23Z"
}
},
"funding_source_token": "**********e_01",
"original_order_token": "my_gpaorder_01"
}


List GPA Unloads

Action: GET
Endpoint: /gpaorders/unloads

To list all GPA unloads, issue a GET request to the /gpaorders/unloads endpoint.

This endpoint supports field filtering and pagination.

Query Parameters

Name Type Required? Description Allowable Values
user_token string No Identifies the user whose associated GPA unloads you want to list. Existing user token.

Issue a GET to /users to retrieve user tokens.
business_token string No Identifies the business whose associated GPA unloads you want to list. Existing business token.

Issue a GET to /businesses to retrieve business tokens.
original_order_token string No Identifies the original GPA order whose associated GPA unloads you want to list. Existing GPA order token.

Issue a GET to /transactions?type=gpa.credit to retrieve GPA order tokens.

Sample Response Body

{
"count": 2,
"start_index": 0,
"end_index": 1,
"is_more": false,
"data": [
{
"token": "my_unload_01",
"amount": 500,
"created_time": "2017-05-10T23:14:50Z",
"last_modified_time": "2017-05-10T23:14:50Z",
"transaction_token": "158",
"state": "COMPLETION",
"response": {
"code": "0000",
"memo": "Approved or completed successfully"
},
"funding": {
"amount": 500,
"source": {
"type": "program",
"token": "**********e_01",
"active": true,
"name": "my_program_funding_source_01",
"is_default_account": false,
"created_time": "2017-03-31T19:13:23Z",
"last_modified_time": "2017-03-31T19:13:23Z"
}
},
"funding_source_token": "**********e_01",
"original_order_token": "my_gpaorder_01"
},
{
"token": "3abe8539-3c61-480d-b015-539fb786a2af",
"amount": 1000,
"created_time": "2017-03-27T17:19:24Z",
"last_modified_time": "2017-03-27T17:19:24Z",
"transaction_token": "2",
"state": "COMPLETION",
"funding": {
"amount": 1000,
"source": {
"type": "program",
"token": "**********ding",
"active": true,
"name": "Marqeta Program Funding",
"is_default_account": false,
"created_time": "2017-03-13T22:36:53Z",
"last_modified_time": "2017-03-13T22:36:53Z"
}
},
"funding_source_token": "**********ding",
"original_order_token": "b9c48f46-0614-442e-8e91-5ce457851b8d"
}
]
}


Create MSA Order

Action: POST
Endpoint: /msaorders

To create an MSA order resource, send a POST request to the /msaorders endpoint and include the merchant details in JSON format in the body of the request. When you create any Marqeta resource, the system associates a token for referencing that resource. You can create your own token using any alpha-numeric characters, 36 chars max. If you do not include a token value, one is generated automatically.

As a result of issuing a POST to /msaorders, Marqeta automatically calculates values for balance and available_balance (purchase amount minus any transactions) and includes them in the response object, in addition to the last transaction date.

Body Field Details

Name Type Required? Description Allowable Values
token string No The unique identifier of the msaorder.

If you do not include a token, the system will generate one automatically. This token is necessary for use in other calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.
36 char max
campaign_token string Yes The unique identifier of a campaign. Existing campaign token.

Issue a GET to /campaigns to retrieve existing campaign tokens.
user_token

OR

business_token
string Yes Identifies the account holder whose MSA is credited. Existing user or business token.

Issue a GET to /users to retrieve user tokens or to /businesses to retrieve business tokens.
currency_code string Yes The 3-character ISO 4217 currency code. The 3-character ISO 4217 currency code.

"USD" currently supported.
purchase_amount decimal Yes The amount of the order. 0.00
reward_amount decimal No The amount to be awarded the account holder if the trigger amount is exceeded. 0.00
reward_trigger_amount decimal No The amount the account holder must spend in order to receive the reward amount. 0.00
funding_source_token string No The unique identifier of the funding source to use for this order.

You don't have to supply a funding source token value in this call if you have a default funding source set up. If you have only one funding source, then this source is used as the default. If you have multiple funding sources and none are configured as the default, then an error is returned.
Existing funding source token.

Issue a GET to /fundingsources/user/{user_token} to retrieve funding sources for a user or to /fundingsources/business/{business_token} to retrieve funding sources for a business.
funding_source_address_token string No The unique identifier of the funding sources address to use for this offer.

If your funding source is an ACH account, then a funding_source_address_token is not required. If your funding source is a payment card, you must have at least one funding source address in order to create an MSA order.
Existing funding source address token.

Issue a GET to /fundingsources/addresses/user/{token} to retrieve addresses for a specific user or to /fundingsources/addresses/business/{business_token} to retrieve addresses for a specific business.
start_date string No The start of the valid date range for the msa order.

The start_date field on the response object always includes the time. If the time is omitted from the request, it defaults to midnight.
yyyy-MM-dd, yyyy-DD-mmT00:00:00Z
end_date string No The end of the valid date range for the msaorder.

The end_date field on the response object always includes the time. If the time is omitted from the request, it defaults to midnight.
yyyy-MM-dd, yyyy-DD-mmT00:00:00Z

Sample Request Body

{
"campaign_token": "my_campaign_01",
"user_token": "my_user_01",
"token": "my_msaorder_test_01",
"currency_code": "USD",
"purchase_amount": "100.00",
"funding_source_token": "my_program_funding_source_01"
}

Sample Response Body

{
"token": "my_msaorder_test_01",
"user_token": "my_user_01",
"order_balances": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": 100,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": 100
}
}
},
"purchase_amount": 100,
"currency_code": "USD",
"active": true,
"reward_amount": 0,
"reward_trigger_amount": 0.01,
"campaign_token": "my_campaign_01",
"funding": {
"amount": 100,
"source": {
"type": "program",
"token": "**********e_01",
"active": true,
"name": "my_program_funding_source_01",
"is_default_account": false,
"created_time": "2017-03-31T19:13:23Z",
"last_modified_time": "2017-03-31T19:13:23Z"
}
},
"created_time": "2017-05-10T19:11:24Z",
"last_modified_time": "2017-05-10T19:11:24Z",
"aggregated_balances": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0
}
}
},
"transaction_token": "152"
}


Retrieve MSA Order

Action: GET
Endpoint: /msaorders/{token}

To retrieve a specific MSA order, issue a GET request to the /msaorders/{token} endpoint. Include the token path parameter to specify the MSA order to retrieve.

URL Path Parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the MSA order to retrieve. Existing MSA order token.

Issue a GET to /transactions?type=msa.credit to retrieve MSA order tokens.

Sample Response Body

{
"token": "my_msaorder_test_01",
"user_token": "my_user_01",
"order_balances": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": 100,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": 100
}
}
},
"purchase_amount": 100,
"currency_code": "USD",
"active": true,
"reward_amount": 0,
"reward_trigger_amount": 0.01,
"campaign_token": "my_campaign_01",
"funding": {
"amount": 100,
"source": {
"type": "program",
"token": "**********e_01",
"active": true,
"name": "my_program_funding_source_01",
"is_default_account": false,
"created_time": "2017-03-31T19:13:23Z",
"last_modified_time": "2017-03-31T19:13:23Z"
}
},
"created_time": "2017-05-10T19:11:24Z",
"last_modified_time": "2017-05-10T19:11:24Z",
"aggregated_balances": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0
}
}
},
"transaction_token": "152"
}


Update MSA Order

Action: PUT
Endpoint: /msaorders/{token}

To update an MSA order, issue a PUT request to the /msaorders/{token} endpoint. Include the MSA order token path parameter to specify the MSA order to update.

URL Path Parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the MSA order to update. Existing MSA order token.

Issue a GET to /transactions?type=msa.credit to retrieve MSA orders.

Body Field Details

Name Type Required? Description Allowable Values
active boolean No Determines whether the msa order is active or inactive. true | false;

Default: true
start_date string No The start of the valid date range for the MSA order.

The start_date field on the response object always includes the time. If the time is omitted from the request, it defaults to midnight.
yyyy-MM-dd, yyyy-DD-mmT00:00:00Z
end_date string No The end of the valid date range for the MSA order.

The end_date fields on the response object always includes the time. If the time is omitted from the request, it defaults to midnight.
yyyy-MM-dd, yyyy-DD-mmT00:00:00Z

Sample Request Body

{
"active": false
}

Sample Response Body

{
"token": "my_msaorder_test_01",
"user_token": "my_user_01",
"order_balances": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": 100,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": 100
}
}
},
"purchase_amount": 100,
"currency_code": "USD",
"active": false,
"reward_amount": 0,
"reward_trigger_amount": 0.01,
"campaign_token": "my_campaign_01",
"funding": {
"amount": 100,
"source": {
"type": "program",
"token": "**********e_01",
"active": true,
"name": "my_program_funding_source_01",
"is_default_account": false,
"created_time": "2017-03-31T19:13:23Z",
"last_modified_time": "2017-03-31T19:13:23Z"
}
},
"created_time": "2017-05-10T19:11:24Z",
"last_modified_time": "2017-05-10T23:28:38Z",
"aggregated_balances": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 100,
"available_balance": 100,
"credit_balance": 0,
"pending_credits": 0
}
}
},
"transaction_token": "152"
}


Unload MSA Order

Action: POST
Endpoint: /msaorders/unloads

To unload an MSA order, send a POST request to the /msaorders/unloads endpoint and include the details in JSON format in the body of the request. When you create any Marqeta resource, the system associates a token for referencing that resource. You can create your own token using any alpha-numeric characters, 36 chars max. If you do not include a token value, one is generated automatically.

Body Field Details

Name Type Required? Description Allowable Values
token string No The unique identifier of the MSA order unload.

If you do not include a token, the system will generate one automatically. This token is necessary for use in other calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.
36 char max
amount decimal Yes Specifies the amount of the MSA order to unload. 0.00

Must be less than or equal to the amount of the order.
original_order_token string Yes Identifies the MSA order to unload. Existing MSA order token.

Issue a GET to /transactions?type=msa.credit to retrieve MSA orders.
tags string No Comma-delimited list of tags describing the MSA order unload. 255 char max
memo string No Memo or note describing the MSA order unload. 255 char max

Sample Request Body

{
"token": "my_msaunload_01",
"amount": "3.00",
"original_order_token": "my_msaorder_test_01"
}

Sample Response Body

{
"token": "my_msaunload_01",
"user_token": "my_user_01",
"order_balances": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": -3
},
"amount": 3,
"currency_code": "USD",
"active": true,
"campaign_token": "my_campaign_01",
"created_time": "2017-05-10T23:32:59Z",
"last_modified_time": "2017-05-10T23:32:59Z",
"aggregated_balances": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0
}
}
},
"original_order_token": "my_msaorder_test_01",
"transaction_token": "159"
}


Retrieve MSA Unload

Action: GET
Endpoint: /msaorders/unloads/{unload_token}

To retrieve a specific MSA order unload, issue a GET request to the /msaorders/unloads/{unload_token} endpoint. Include the unload_token path parameter to specify the unload to return.

URL Path Parameters

Name Type Required? Description Allowable Values
unload_token string Yes Identifies the MSA order unload to retrieve. Existing MSA order unload token.

Issue a GET to /msaorders/unloads to retrieve MSA order unload tokens.

Sample Response Code

{
"token": "my_msaunload_01",
"user_token": "my_user_01",
"order_balances": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": -3
},
"amount": 3,
"currency_code": "USD",
"active": true,
"campaign_token": "my_campaign_01",
"created_time": "2017-05-10T23:32:59Z",
"last_modified_time": "2017-05-10T23:32:59Z",
"aggregated_balances": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0
}
}
},
"original_order_token": "my_msaorder_test_01",
"transaction_token": "159"
}


List MSA Unloads

Action: GET
Endpoint: /msaorders/unloads

To list MSA order unloads, issue a GET request to the /msaorders/unloads endpoint.

To narrow your result set to unloads associated with a particular account holder or MSA order, include the appropriate parameters from the following Query Parameters table. This endpoint also supports query parameters for field filtering, pagination, and sorting.

Query Parameters

Name Type Required? Description Allowable Values
user_token string No Identifies the user whose associated MSA unloads you want to list. Existing user token.

Issue a GET to /users to retrieve user tokens.
business_token string No Identifies the business whose associated MSA unloads you want to list. Existing business token.

Issue a GET to /businesses to retrieve business tokens.
original_order_token string No Identifies the original MSA order whose associated GPA unloads you want to list. Existing MSA order token.

Issue a GET to /transactions?type=msa.credit to retrieve MSA orders.

Sample Response Body

{
"count": 1,
"start_index": 0,
"end_index": 0,
"is_more": false,
"data": [
{
"token": "my_msaunload_01",
"user_token": "my_user_01",
"order_balances": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0,
"impacted_amount": -3
},
"amount": 3,
"currency_code": "USD",
"active": true,
"campaign_token": "my_campaign_01",
"created_time": "2017-05-10T23:32:59Z",
"last_modified_time": "2017-05-10T23:32:59Z",
"aggregated_balances": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 97,
"available_balance": 97,
"credit_balance": 0,
"pending_credits": 0
}
}
},
"original_order_token": "my_msaorder_test_01",
"transaction_token": "159"
}
]
}


Create Offer Order

Action: POST
Endpoint: /offerorders

To create an offer order, send a POST request to the /offerorders endpoint and include the offer order details in JSON format in the body of the request. When you create any Marqeta resource, the system associates a token for referencing that resource. You can create your own token using any alpha-numeric characters, 36 chars max. If you do not include a token value, one is generated automatically.

Body Field Details

Name Type Required? Description Allowable Values
token string No The unique identifier of the offer order.

If you do not include a token, the system will generate one automatically. This token is necessary for use in other calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.
36 char max
user_token

OR

business_token
string Yes Identifies the account holder whose MSA will be credited. Existing user or business token.

Issue a GET to /users to retreive user tokens or to /businesses to retrieve business tokens.
offer_token string Yes Identifies the offer funded by this order. Existing offer token.

Issue a GET to /offers to retrieve offer tokens.
funding_source_token string No The unique identifier of the funding source to use for this order.

You must have at least one funding source in order to create an order. You don't have to supply a funding_source_token value in this call if you have a default funding source set up. If you have only one funding source, then this source is used as the default. If you have multiple funding sources and none are configured as the default, then an error is returned.
Existing funding source token.

Issue a GET to /fundingsources/user/{user_token} to retrieve funding sources for a specific user or to /fundingsources/business/{business_token} to retrieve retrieve funding sources for a specific business.
funding_source_address_token string No The unique identifier of the funding sources address to use for this offer.

If your funding source is an ACH account, then a funding_source_address_token is not required. If your funding source is a payment card, you must have at least one funding source address in order to create an offer order. If you have multiple funding source addresses and none are configured as the default, then an error is returned.
Existing funding source address token.

Issue a GET to /fundingsources/addresses/user/{token} to retrieve addresses for a specific user or to /fundingsources/addresses/business/{business_token} to retrieve addresses for a specific business.

Sample Request Body

{
"token": "my_offerorder_0100",
"user_token": "my_user_01",
"offer_token": "may_offer",
"funding_source_token": "my_program_funding_source_01"
}

Sample Response Body

{
"created_time": "2017-05-10T23:49:14Z",
"last_modified_time": "2017-05-10T23:49:14Z",
"user_token": "my_user_01",
"token": "my_offerorder_0100",
"order_balances": {
"currency_code": "USD",
"ledger_balance": 200,
"available_balance": 250,
"credit_balance": 50,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 200,
"available_balance": 250,
"credit_balance": 50,
"pending_credits": 0
}
}
},
"order_aggregated_balances": {
"currency_code": "USD",
"ledger_balance": 297,
"available_balance": 347,
"credit_balance": 50,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 297,
"available_balance": 347,
"credit_balance": 50,
"pending_credits": 0
}
}
},
"offer": {
"token": "may_offer",
"active": true,
"name": "May_offer",
"purchase_amount": 200,
"reward_amount": 50,
"reward_trigger_amount": 200,
"campaign_token": "my_campaign_01",
"currency_code": "840",
"created_time": "2017-05-10T23:46:44Z",
"last_modified_time": "2017-05-10T23:46:44Z"
}
}


Retrieve Offer Order

Action: GET
Endpoint: /offerorders/{token}

To retrieve a specific offer order, issue a GET request to the /offerorders/{token} endpoint. Include the offer order token path parameter to specify the offer order to return.

URL Path Parameters

Name Type Required? Description Allowable Values
token string Yes Identifies the offer order to retrieve. Existing offer order token

Sample Response Body

{
"created_time": "2017-05-10T23:49:14Z",
"last_modified_time": "2017-05-10T23:49:14Z",
"user_token": "my_user_01",
"token": "my_offerorder_0100",
"order_balances": {
"currency_code": "USD",
"ledger_balance": 200,
"available_balance": 250,
"credit_balance": 50,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 200,
"available_balance": 250,
"credit_balance": 50,
"pending_credits": 0
}
}
},
"order_aggregated_balances": {
"currency_code": "USD",
"ledger_balance": 297,
"available_balance": 347,
"credit_balance": 50,
"pending_credits": 0,
"balances": {
"USD": {
"currency_code": "USD",
"ledger_balance": 297,
"available_balance": 347,
"credit_balance": 50,
"pending_credits": 0
}
}
},
"offer": {
"token": "my_offer",
"active": true,
"name": "May_offer",
"purchase_amount": 200,
"reward_amount": 50,
"reward_trigger_amount": 200,
"campaign_token": "my_campaign_01",
"currency_code": "840",
"created_time": "2017-05-10T23:46:44Z",
"last_modified_time": "2017-05-10T23:46:44Z"
}
}