Change recurrence data

EnvironmentMethodEndpoint
Sandboxhttps://apisandbox.braspag.com.br/v2/RecurrentPayment/{RecurrentPaymentId}/Payment
Productionhttps://api.braspag.com.br/v2/RecurrentPayment/{RecurrentPaymentId}/Payment

During the recurrence lifecycle, it is possible to update:

  • Acquirer (e.g., from Rede to Cielo)
  • Card (in case of an expired card)
⚠️

This update affects all data in the "Payment" node. To keep previous data, you must provide these fields using the already saved values to be retained.

Request

{  
   "Type":"CreditCard",
   "Amount":"20000",
   "Installments":3,
   "Country":"USA",
   "Currency":"USD",
   "SoftDescriptor":"Mensagem",
   "Provider":"Simulado",
   "CreditCard":{  
      "Brand":"Master",
      "Holder":"Nome do Portador",
      "CardNumber":"5412217070050381",
      "ExpirationDate":"05/2019"
   },
   "Credentials": {
      "Code": "9999999",
      "Key": "D8888888",
      "Password": "LOJA9999999",
      "Username": "#Braspag2018@NOMEDALOJA#",
      "Signature": "001"
   }
}
--request PUT "https://apisandbox.braspag.com.br/v2/RecurrentPayment/{RecurrentPaymentId}/Payment"
--header "Content-Type: application/json"
--header "MerchantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
--header "MerchantKey: 0123456789012345678901234567890123456789"
--header "RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
--data-binary
{  
   "Type":"CreditCard",
   "Amount":"20000",
   "Installments":3,
   "Country":"USA",
   "Currency":"USD",
   "SoftDescriptor":"Mensagem",
   "Provider":"Simulado",
   "CreditCard":{  
      "Brand":"Master",
      "Holder":"Nome do Portador",
      "CardNumber":"5412217070050381",
      "ExpirationDate":"05/2019"
   },
   "Credentials": {
      "Code": "9999999",
      "Key": "D8888888",
      "Password": "LOJA9999999",
      "Username": "#Braspag2018@NOMEDALOJA#",
      "Signature": "001"
   }
}
--verbose

Below are the header field properties for this request:

Property (header)TypeSizeRequiredDescription
MerchantIdGuid36YesMerchant identifier in Split de Pagamento
MerchantKeyText40YesPublic key for Dual Authentication in Split de Pagamento
Content-TypeHeader40YesApplication/json
RequestIdGUID36NoRequest identifier defined by the merchant, used when the merchant uses different servers for each GET/POST/PUT request.
Property (body)DescriptionTypeSizeRequired?
RecurrentPaymentIdRecurrence identification number.Text50Yes (sent in the endpoint)
ProviderPayment method provider name.Text15Yes
TypePayment method type.Text100Yes
AmountOrder amount, in cents.Number15Yes
InstallmentsNumber of installments.Number2Yes
SoftDescriptorText that will appear on the cardholder's statement.Text13No
CreditCard.CardNumberShopper's card number.Text16Yes
CreditCard.HolderShopper's name printed on the card. Note: Field size rules may vary depending on the acquirer.Text25Yes
CreditCard.ExpirationDateExpiration date printed on the card.Text7Yes
CreditCard.SecurityCodeSecurity code printed on the back of the card.Text4Yes
CreditCard.BrandCard brand.Text10Yes
Credentials.CodeAffiliation generated by the acquirer.Text100Conditional*
Credentials.KeyAffiliation key/token generated by the acquirer.Text100Conditional*
Credentials.UsernameUsername generated during onboarding with the acquirer (providers such as Rede and Getnet use username and password in communications, so this field must be sent).Text50Conditional*
Credentials.PasswordPassword generated during onboarding with the acquirer (providers such as Rede and Getnet use username and password in communications, so this field must be sent).Text50Conditional*
Credentials.SignatureSend the acquirer Global Payments TerminalID (e.g., 001). For Safra, provide the merchant name, city, and state concatenated with semicolons ";". Example: StoreName;São Paulo;SP.Text--Conditional*
  • **Required if the affiliation is not preconfigured in the payment methods of the MerchantID used.
  • In the sandbox environment using the Simulated provider, it is not necessary to send the Credentials node.

Resppnse

HTTP Status 200

Refer to the HTTP status codes list to see all status codes that may be returned by the API.