Introduction

Authentication

Test cards

Establishments

Users

Customers

Cards

Payment links

Error codes

Payment Split

Products

Discount Coupons

Sales

Signatures

Webhooks

Financial


On this page:


POST Create a credit card sale

https://api.premepay.com/v1/stores/:id/orders

Parameters List

Parameter Type Description Required
customerId integer Customer identifier Yes
fingerprint string User session unique identifier No
includeFeeTransfer boolean Indicates whether fees should be passed on to the consumer No
amount decimal Total amount to be charged Yes
description string Sale Description Yes
voucher string Discount coupon No
payment object Payment information Yes
type string Payment type (credit) Yes
installments string Number of installments Yes
cardId integer Credit card identifier Yes
payLater boolean Use it if you want to pre-authorize and reserve the amount for up to 28 days, and then capture it. No
splits array<object> Divisões No
splitRuleId int It can be one or more Yes
metadata dictionary<key, value> Used to save miscellaneous information in dictionary format <key, value> No
warrantyDays int Service Warranty Time in Days No
whenShouldIssueNfe object When to issue the NFe Yes, if send Nft To Customer property is used
0 At the time of sale
1 After warranty
2 Do not issue
sendNfeToCustomer boolean Send invoice to consumer Yes, if when Should InsuraNce property is used

<aside> <img src="/icons/alert_red.svg" alt="/icons/alert_red.svg" width="40px" /> The NFe properties are only available in the case of integration with eNotas.

</aside>

Status related to Order

Status Meaning
New Temporary status, if this status persists, contact support
Succeded Order created successfully
Canceled Order canceled
Failed Failed during order creation

Status related to Payment

Status Meaning
New Temporary status, if this status persists, contact support
Pending Pending payment
Succeded Payment made successfully
Canceled Payment Canceled
Dispute Payment in Dispute
Failed Payment Failure
ChargedBack Lost Dispute
DisputeSucceeded Dispute Overdue
PreAuthorized Pre-authorized payment

<aside> 💡 Important: the discount coupon changes the final value of the Payment Order.

</aside>

Request example

This is an example of how your request to create a new Payment Order with the Credit Card payment method might look like.

Responses

If your request has invalid creation parameters - for example, specifying an invalid field or value - you may receive an error response. Below is the complete list of possible error responses:


Related Content

<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/52c5ff42-e8bf-45d3-81d1-b6e05786a688/POST.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/52c5ff42-e8bf-45d3-81d1-b6e05786a688/POST.png" width="40px" /> POST - Capture Pre-Authorized Amount on the Credit Card

</aside>

<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/52c5ff42-e8bf-45d3-81d1-b6e05786a688/POST.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/52c5ff42-e8bf-45d3-81d1-b6e05786a688/POST.png" width="40px" /> POST - Add Card

</aside>