Orishare
API reference
GET
/store_credit/wallets

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/store_credit/wallets"
{  "wallets": [    {      "currency_id": "string",      "currency": "string",      "name": "string",      "iso_currency": "string",      "minor_unit": 0,      "hold_days": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ]}
POST
/store_credit/wallets

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/store_credit/wallets" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "currency": "credit",    "iso_currency": "USD",    "minor_unit": 2  }'
{  "currency_id": "string",  "currency": "string",  "name": "string",  "iso_currency": "string",  "minor_unit": 0,  "hold_days": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
GET
/customers/{id}/store_credit

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/customers/string/store_credit"
{  "balances": [    {      "currency_id": "string",      "currency": "string",      "iso_currency": "string",      "minor_unit": 0,      "available": 0,      "held": 0,      "formatted": "string"    }  ]}
GET
/customers/{id}/store_credit/quote

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Query Parameters

currency*string
Length1 <= length <= 64
order_total*number
amount?number

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/customers/string/store_credit/quote?currency=string&order_total=0"
{  "customer_id": "string",  "currency": "string",  "iso_currency": "string",  "minor_unit": 0,  "balance": 0,  "order_total": 0,  "applicable_amount": 0,  "remaining_to_pay": 0}
GET
/store_credit/applications

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50
cursor?string
Lengthlength <= 2048
customer_id?string
order_ref?string
status?string

Value in

  • "applied"
  • "captured"
  • "partially_refunded"
  • "refunded"
  • "voided"

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/store_credit/applications"
{  "data": [    {      "id": "string",      "customer_id": "string",      "currency_id": "string",      "currency": "string",      "iso_currency": "string",      "minor_unit": 0,      "order_ref": "string",      "order_total": 0,      "amount": 0,      "captured": 0,      "refunded": 0,      "status": "applied",      "void_reason": "string",      "applied_at": "2019-08-24T14:15:22Z",      "hold_until": "2019-08-24T14:15:22Z",      "captured_at": "2019-08-24T14:15:22Z",      "voided_at": "2019-08-24T14:15:22Z",      "revision": 0    }  ],  "next_cursor": "string",  "has_more": true}
POST
/store_credit/applications

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/store_credit/applications" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "customer_id": "cust_00000000000000000000000000000042",    "currency": "credit",    "order_ref": "order_1001",    "order_total": 4200,    "amount": 1500  }'
{  "id": "string",  "customer_id": "string",  "currency_id": "string",  "currency": "string",  "iso_currency": "string",  "minor_unit": 0,  "order_ref": "string",  "order_total": 0,  "amount": 0,  "captured": 0,  "refunded": 0,  "status": "applied",  "void_reason": "string",  "applied_at": "2019-08-24T14:15:22Z",  "hold_until": "2019-08-24T14:15:22Z",  "captured_at": "2019-08-24T14:15:22Z",  "voided_at": "2019-08-24T14:15:22Z",  "revision": 0}
GET
/store_credit/applications/{id}

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/store_credit/applications/string"
{  "id": "string",  "customer_id": "string",  "currency_id": "string",  "currency": "string",  "iso_currency": "string",  "minor_unit": 0,  "order_ref": "string",  "order_total": 0,  "amount": 0,  "captured": 0,  "refunded": 0,  "status": "applied",  "void_reason": "string",  "applied_at": "2019-08-24T14:15:22Z",  "hold_until": "2019-08-24T14:15:22Z",  "captured_at": "2019-08-24T14:15:22Z",  "voided_at": "2019-08-24T14:15:22Z",  "revision": 0}
POST
/store_credit/applications/{id}/capture

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/store_credit/applications/string/capture" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "customer_id": "string",  "currency_id": "string",  "currency": "string",  "iso_currency": "string",  "minor_unit": 0,  "order_ref": "string",  "order_total": 0,  "amount": 0,  "captured": 0,  "refunded": 0,  "status": "applied",  "void_reason": "string",  "applied_at": "2019-08-24T14:15:22Z",  "hold_until": "2019-08-24T14:15:22Z",  "captured_at": "2019-08-24T14:15:22Z",  "voided_at": "2019-08-24T14:15:22Z",  "revision": 0}
POST
/store_credit/applications/{id}/void

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/store_credit/applications/string/void" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "reason": "abandoned"  }'
{  "id": "string",  "customer_id": "string",  "currency_id": "string",  "currency": "string",  "iso_currency": "string",  "minor_unit": 0,  "order_ref": "string",  "order_total": 0,  "amount": 0,  "captured": 0,  "refunded": 0,  "status": "applied",  "void_reason": "string",  "applied_at": "2019-08-24T14:15:22Z",  "hold_until": "2019-08-24T14:15:22Z",  "captured_at": "2019-08-24T14:15:22Z",  "voided_at": "2019-08-24T14:15:22Z",  "revision": 0}
POST
/store_credit/applications/{id}/refunds

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Path Parameters

id*string
Length1 <= length

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/store_credit/applications/string/refunds" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "refund_ref": "refund_1",    "amount": 500  }'
{  "id": "string",  "application_id": "string",  "refund_ref": "string",  "amount": 0,  "created_at": "2019-08-24T14:15:22Z",  "application": {    "id": "string",    "customer_id": "string",    "currency_id": "string",    "currency": "string",    "iso_currency": "string",    "minor_unit": 0,    "order_ref": "string",    "order_total": 0,    "amount": 0,    "captured": 0,    "refunded": 0,    "status": "applied",    "void_reason": "string",    "applied_at": "2019-08-24T14:15:22Z",    "hold_until": "2019-08-24T14:15:22Z",    "captured_at": "2019-08-24T14:15:22Z",    "voided_at": "2019-08-24T14:15:22Z",    "revision": 0  }}
POST
/store_credit/release_stale

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

Idempotency-Key*string

Required. Official clients generate a UUID when omitted by the caller.

Length1 <= length <= 255
X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/store_credit/release_stale" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "released": [    "string"  ],  "skipped": [    "string"  ],  "has_more": true}
GET
/store_credit/reconciliation

Authorization

AuthorizationBearer <token>

Secret API key bound to an environment.

In: header

Header Parameters

X-Orishare-Environment?string

Required for selected-environment authorization branches; API keys use their bound environment.

Length1 <= length
X-Orishare-Audit-Reason?string

Required for staff authorization. Records the reason for staff access.

Length1 <= length

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/store_credit/reconciliation"
{  "currencies": [    {      "currency_id": "string",      "currency": "string",      "iso_currency": "string",      "minor_unit": 0,      "issued_net": 0,      "movements": {        "issued": 0,        "manual_reductions": 0,        "spent": 0,        "expired": 0,        "reversed": 0,        "restored": 0      },      "application_net": 0,      "held": 0,      "captured": 0,      "returned": 0,      "refunded": 0,      "outstanding": 0,      "unexplained": 0,      "applications": 0    }  ],  "mismatches": [    {      "application_id": "string",      "status": "string",      "expected_net": 0,      "ledger_net": 0    }  ],  "mismatches_truncated": true}