Payment Accounts Admin API (0)
Download OpenAPI specification:Download
Payments Administration
This association is done by assigning the same ID to the payment account and the entity it is linked to.
Payments
Represents a payment account used during order placement. It has a balance and stores the transactions and the financial instruments that modified its balance.
Use this resource to retrieve information about a payment account. A payment account can also be used to track the balance and transactions of other entities created by the NewStore platform. For example, a payment account can be associated with an entity such as a sales order, a customer, or a shopping bag by assigning the same ID to the payment account and to the entity.
Note - Currently, NewStore only supports assigning the same ID to a payment account and the related sales order.
Retry operation
Retries the financial operation (authorization, capture or refund) identified by the provided correlation identifier. To get an operation's correlation identifier, use the Get payment history method.
Authorizations:
path Parameters
account_id required | string (account ID) Unique ID of a payment account. It is the same ID as the entity the payment account is assigned to.
For example, use the internal ID ( |
Request Body schema: application/json
correlation_id required | string Identifier of the request that should be retried. Only captures and refunds are supported. |
instrument_id | string Identifier of the instrument that should be retried. |
amount | number An optional amount to override the original failed request. Can only apply to capture requests, with a single failed operation. |
Responses
Request samples
- Payload
{- "correlation_id": "43696bcc-6242-4428-b5ee-76417c539fea"
}
Response samples
- 202
- 400
- 404
- 409
- 500
{- "messages": [
- "string"
], - "request_id": "string",
- "error_code": "string"
}
Mark an operation as successful
Sets the financial operation (capture or refund) identified by the provided correlation identifier as successful. To get an operation's correlation identifier, use the Get payment history method.
Authorizations:
path Parameters
account_id required | string (account ID) Unique ID of a payment account. It is the same ID as the entity the payment account is assigned to.
For example, use the internal ID ( |
Request Body schema: application/json
correlation_id required | string Identifier of the request that should be marked as successful. Only captures and refunds are supported. |
gc_number | string Identifier of the gift card the operation was successful on. Optional for refunds to scanned gift cards, required for e-gift cards, ignored for other operations. |
Responses
Request samples
- Payload
{- "correlation_id": "43696bcc-6242-4428-b5ee-76417c539fea",
- "gc_number": 850928572937
}
Response samples
- 202
- 400
- 404
- 409
- 500
{- "messages": [
- "string"
], - "request_id": "string",
- "error_code": "string"
}
Balance an account
Balances accounts with negative balances, triggering refunds when a customer overpaid. Should be manually invoked when it is certain that it is not caused by a provider misbehavior, like emitting double successes for a capture request.
Authorizations:
path Parameters
account_id required | string (account ID) Unique ID of a payment account. It is the same ID as the entity the payment account is assigned to.
For example, use the internal ID ( |
Responses
Response samples
- 202
- 400
- 404
- 409
- 500
{- "messages": [
- "string"
], - "request_id": "string",
- "error_code": "string"
}
Process a balance account operation
Balances accounts with negative balances, triggering refunds when a customer overpaid. Should be manually invoked when it is certain that it is not caused by a provider misbehavior, like emitting double successes for a capture request.
Authorizations:
path Parameters
account_id required | string (account ID) Unique ID of a payment account. It is the same ID as the entity the payment account is assigned to.
For example, use the internal ID ( |
Responses
Response samples
- 202
- 400
- 404
- 409
- 500
{- "messages": [
- "string"
], - "request_id": "string",
- "error_code": "string"
}
Get payment history
Returns the history of the provided account.
Authorizations:
path Parameters
account_id required | string (account ID) Unique ID of a payment account. It is the same ID as the entity the payment account is assigned to.
For example, use the internal ID ( |
Responses
Response samples
- 200
- 404
- 500
{- "history": [
- {
- "operation": "string",
- "created_at": "string",
- "updated_at": "string",
- "correlation_id": "string",
- "initial_amount": 0,
- "final_amount": 0,
- "currency": "string",
- "state": "PENDING",
- "instruments": [
- {
- "created_at": "string",
- "updated_at": "string",
- "instrument_id": "string",
- "initial_amount": 0,
- "final_amount": 0,
- "payment_method": "string",
- "payment_provider": "string",
- "payment_wallet": "string",
- "payment_origin": "string",
- "transactions": [
- {
- "name": "string",
- "created_at": "string",
- "amount": 0,
- "error_message": "string",
- "error_code": "string",
- "processed_at": "2019-08-24T14:15:22Z",
- "metadata": { }
}
]
}
]
}
]
}