Charging a credit card through Assembly is quick, secure and simplifies PCI compliance implications. A charge can be created in order for a user to purchase goods or services, with the money captured being sent to your platform’s bank account.
A credit card can be captured through an Assembly client-side SDK, and then passed into a single API endpoint in order to complete the charge. The same client-side SDKs can also be used to collect the device information of the buyer for the corresponding charge.
1) Capture the Credit Card
See the guide Capturing a credit card for more information on how to capture a credit card’s details
2) (Optional) Collect Buyer Device Information
See the guide Integrating PromisePay.js for more information on how to collect device information from a user
3) Charge the Credit Card
Accepting payments from a credit card takes only one step once the credit card has been captured and a token is available. Minimal details are required in order to charge a card.
|account_id||Bank Account or Card Account ID||Required|
|amount||The cost being charged in cents.||Required|
|Email of the user associated with the account being charged.||Required (New Users only)|
|zip||Zip/Postcode of the buyer’s address||Required (New Users only)|
|country||Country (ISO 3 character code) of the User being charged.||Required (New Users only)|
|name||Optional. Simple description of the Charge.||Optional|
|retain_account||True – Enables the account to be charged in the future. False – Redacts the account after this charge.||Optional|
|device_id||Device Information provided by Assembly client-side SDKs.||Optional|
|ip_address||IP Information provided by Assembly client-side SDKs.||Optional|
|currency||Currency code. ISO 4217 – Alpha 3 code. This is an optional field and if not provided, the item will be created with the default currency of the marketplace.||Optional|
|fee_ids||A comma separated list of fee ID’s to apply.||Optional|
|user_id||The ID of the User, this can be passed through to track the created user, or to define a pre-created User.||Optional|
Use Create Charge to pass the required information.
Once the call is made, the charge either results in a completed or payment_held state.
If the charge is successful, the funds will be sent to your platform’s disbursement account (typically a bank account) within a day. If the charge has been denied, you will receive a message, determined by the card provider, that describes the reason that the payment failed. If the charge goes into payment held, this means the payment is under investigation for potential fraud, and it will be either accepted or denied following the pending investigation.
Following a successful charge, a User, Card Account and Item will have been created on your platform. These can be accessed through their respective APIs.